Merge code of ding.

This commit is contained in:
xiaojiazhu 2023-11-04 15:56:15 +08:00
parent 576b10ede1
commit f9fddafa83
2 changed files with 11 additions and 38 deletions

View File

@ -620,6 +620,7 @@ void show_qr_picture_page(lv_obj_t* obj)
static lv_style_t labelStyle;
lv_style_init(&labelStyle);
STYLE_COLOR_PROP(0xff, 0xff, 0xff, 0xff) ; lv_style_set_text_color(&labelStyle, LV_STATE_DEFAULT, color);
lv_style_set_text_font(&labelStyle,LV_STATE_DEFAULT,&sf_ui_text_medium_16_1bpp);
label = lv_label_create(obj, NULL);
lv_label_set_long_mode(label, LV_LABEL_LONG_BREAK);
lv_label_set_text(label, "Add Camera to Tactacam App");

View File

@ -469,30 +469,9 @@ static void LV_MenuCommonItem_UpdateContent(TM_MENU *pMenu)
BOOL u_hiddenitem = false;
BOOL u_ItemSel = false;
lv_plugin_res_id img_id = LV_PLUGIN_IMG_ID_ICON_REC_TRANSPAENT;
// UIMenuStoreInfo *puiPara = sf_ui_para_get();
// UINT32 uiIcon[TAB_PAGE]; // 2 pages per menu
// UINT32 uiText[TAB_PAGE]; // 2 pages per menu
// UINT16 SelOption = 0;
// TM_ITEM u_Item[PAGE];
//#define LV_PLUGIN_STRING_ID_STRID_FRONT_3840X2160P30 522
#if 0
DBG_DUMP("\r\n %s pMenu Status= %d\r\n", __func__, pMenu->Status);
DBG_DUMP("\r\n %s pMenu SelPage= %d\r\n", __func__, pMenu->SelPage);
DBG_DUMP("\r\n %s pMenu FirstPage= %d\r\n", __func__, pMenu->FirstPage);
DBG_DUMP("\r\n %s pMenu Count= %d\r\n", __func__, pMenu->Count);
#endif
printf("update content select page = %d\n", pMenu->SelPage);
pPage = &pMenu->pPages[pMenu->SelPage];
pItem = &pPage->pItems[pPage->SelItem];
#if 1
// DBG_DUMP("\r\n %s pPage TextId= %d\r\n", __func__, pPage->TextId);
// DBG_DUMP("\r\n %s pPage IconId= %d\r\n", __func__, pPage->IconId);
// DBG_DUMP("\r\n %s pPage IconIdX= %d\r\n", __func__, pPage->IconIdX);
// DBG_DUMP("\r\n %s pPage SelItem= %d\r\n", __func__, pPage->SelItem);
// DBG_DUMP("\r\n %s pPage FirstItem= %d\r\n", __func__, pPage->FirstItem);
// DBG_DUMP("\r\n %s pPage Count= %d\r\n", __func__, pPage->Count);
#endif
#if 0
if (pMenu->Status == TMS_ON_TAB)
{
@ -533,12 +512,8 @@ static void LV_MenuCommonItem_UpdateContent(TM_MENU *pMenu)
for (i = 0; i < PER_PAGE_NUM; i++) {
//check item if disable
TM_CheckItemStatus(pMenu, &itemIndex, TRUE);
// DBG_DUMP("\r\n %s pPage SelItem= %d\r\n", __func__, pPage->SelItem);
pItem = &pPage->pItems[itemIndex];
// DBG_DUMP("\r\n %s itemIndex= %d\r\n", __func__, itemIndex);
// DBG_DUMP("\r\n %s for page = %d\r\n", __func__, pItem->TextId);
// u_Item[i] = pPage->pItems[i];
// Sel_page = pPage->SelItem;
if ((itemIndex >= pPage->Count) && (i < PER_PAGE_NUM)) {
lv_plugin_menu_set_item_string_id(menu_item, i, LV_PLUGIN_MENU_ITEM_VISIBLE_STATE_NUM, LV_PLUGIN_STRING_ID_STRID_NULL_);
lv_plugin_menu_set_item_img_id(menu_item, i, LV_PLUGIN_MENU_ITEM_VISIBLE_STATE_NUM, LV_PLUGIN_IMG_ID_ICON_REC_TRANSPAENT);
@ -555,10 +530,6 @@ static void LV_MenuCommonItem_UpdateContent(TM_MENU *pMenu)
lv_plugin_menu_set_item_hidden(menu_item, i, false);
u_ItemSel = false;
#else
//DBG_DUMP("\r\n %s pPage TextId= %d\r\n", __func__, pPage->TextId);
// DBG_DUMP("\r\n %s Sel_item= %d\r\n", __func__, Sel_item);
// DBG_DUMP("\r\n %s itemIndex= %d\r\n", __func__, itemIndex);
pOption = &pItem->pOptions[SysGetFlag(pItem->SysFlag)];
// DBG_DUMP("\r\n %s pOption TextId= %d\r\n", __func__, pOption->TextId);
@ -599,15 +570,16 @@ static void LV_MenuCommonItem_UpdateContent(TM_MENU *pMenu)
}
// SelOption = (Sel_item * PER_PAGE_NUM) + i;
// DBG_DUMP("\r\n %s SelOption F= %d\r\n", __func__, SelOption);
if(!u_hiddenitem){
if(i == 0){
lv_obj_set_hidden(image_option_01_scr_uiflowmenucommonitem, true);
// DBG_DUMP("\r\n %s Sel_item 0= %d\r\n", __func__, Sel_item);
// DBG_DUMP("\r\n %s Sel_item F= %d\r\n", __func__, (Sel_item%5));
// DBG_DUMP("\r\n %s pPage->SelItem 0= %d\r\n", __func__, pPage->SelItem);
// DBG_DUMP("\r\n %s pPage->SelItem F= %d\r\n", __func__, (pPage->SelItem%PER_PAGE_NUM));
//#NT#2023/11/03#Eric - begin
//#NT#Support IVOT_N12144_CO-148 -5
if((pPage->SelItem == 0)&&(pMenu->Status == TMS_ON_ITEM)){
if(((pPage->SelItem%PER_PAGE_NUM) == 0)&&(pMenu->Status == TMS_ON_ITEM)){
lv_plugin_img_set_src(image_option_1_scr_uiflowmenucommonitem, LV_PLUGIN_IMG_ID_SF_NEXT2);
}else{
lv_plugin_img_set_src(image_option_1_scr_uiflowmenucommonitem, LV_PLUGIN_IMG_ID_SF_NEXT1);
@ -620,7 +592,7 @@ static void LV_MenuCommonItem_UpdateContent(TM_MENU *pMenu)
lv_obj_set_hidden(image_option_02_scr_uiflowmenucommonitem, true);
//#NT#2023/11/03#Eric - begin
//#NT#Support IVOT_N12144_CO-148 -5
if((pPage->SelItem == 1)&&(pMenu->Status == TMS_ON_ITEM)){
if(((pPage->SelItem%PER_PAGE_NUM) == 1)&&(pMenu->Status == TMS_ON_ITEM)){
lv_plugin_img_set_src(image_option_2_scr_uiflowmenucommonitem, LV_PLUGIN_IMG_ID_SF_NEXT2);
}else{
lv_plugin_img_set_src(image_option_2_scr_uiflowmenucommonitem, LV_PLUGIN_IMG_ID_SF_NEXT1);
@ -633,7 +605,7 @@ static void LV_MenuCommonItem_UpdateContent(TM_MENU *pMenu)
lv_obj_set_hidden(image_option_03_scr_uiflowmenucommonitem, true);
//#NT#2023/11/03#Eric - begin
//#NT#Support IVOT_N12144_CO-148 -5
if((pPage->SelItem == 2)&&(pMenu->Status == TMS_ON_ITEM)){
if(((pPage->SelItem%PER_PAGE_NUM) == 2)&&(pMenu->Status == TMS_ON_ITEM)){
lv_plugin_img_set_src(image_option_3_scr_uiflowmenucommonitem, LV_PLUGIN_IMG_ID_SF_NEXT2);
}else{
lv_plugin_img_set_src(image_option_3_scr_uiflowmenucommonitem, LV_PLUGIN_IMG_ID_SF_NEXT1);
@ -646,7 +618,7 @@ static void LV_MenuCommonItem_UpdateContent(TM_MENU *pMenu)
lv_obj_set_hidden(image_option_04_scr_uiflowmenucommonitem, true);
//#NT#2023/11/03#Eric - begin
//#NT#Support IVOT_N12144_CO-148 -5
if((pPage->SelItem == 3)&&(pMenu->Status == TMS_ON_ITEM)){
if(((pPage->SelItem%PER_PAGE_NUM) == 3)&&(pMenu->Status == TMS_ON_ITEM)){
lv_plugin_img_set_src(image_option_4_scr_uiflowmenucommonitem, LV_PLUGIN_IMG_ID_SF_NEXT2);
}else{
lv_plugin_img_set_src(image_option_4_scr_uiflowmenucommonitem, LV_PLUGIN_IMG_ID_SF_NEXT1);
@ -659,7 +631,7 @@ static void LV_MenuCommonItem_UpdateContent(TM_MENU *pMenu)
lv_obj_set_hidden(image_option_05_scr_uiflowmenucommonitem, true);
//#NT#2023/11/03#Eric - begin
//#NT#Support IVOT_N12144_CO-148 -5
if((pPage->SelItem == 4)&&(pMenu->Status == TMS_ON_ITEM)){
if(((pPage->SelItem%PER_PAGE_NUM) == 4)&&(pMenu->Status == TMS_ON_ITEM)){
lv_plugin_img_set_src(image_option_5_scr_uiflowmenucommonitem, LV_PLUGIN_IMG_ID_SF_NEXT2);
}else{
lv_plugin_img_set_src(image_option_5_scr_uiflowmenucommonitem, LV_PLUGIN_IMG_ID_SF_NEXT1);