完善sensitivity功能及UI
This commit is contained in:
parent
62d6ab47ff
commit
49a5c30da4
|
@ -375,7 +375,7 @@ static lv_obj_t *SensitivityContainer = NULL;
|
||||||
#define DIG_PIR_LEVEL 10
|
#define DIG_PIR_LEVEL 10
|
||||||
static char gPirSensitivity = 0;
|
static char gPirSensitivity = 0;
|
||||||
UINT8 gDigPirLevel[DIG_PIR_LEVEL] = {200, 38, 30, 24, 18, 16, 10, 9, 8, 7};
|
UINT8 gDigPirLevel[DIG_PIR_LEVEL] = {200, 38, 30, 24, 18, 16, 10, 9, 8, 7};
|
||||||
unsigned int get_dig_pir_level(void)
|
int get_dig_pir_level(void)
|
||||||
{
|
{
|
||||||
UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
||||||
int resutl = -1;
|
int resutl = -1;
|
||||||
|
@ -387,11 +387,6 @@ unsigned int get_dig_pir_level(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// lv_plugin_string_t* tmpPluginStr = NULL;
|
|
||||||
// char* tmpstr = NULL;
|
|
||||||
// tmpPluginStr = (lv_plugin_string_t*)lv_plugin_get_string(IDS_SENSITIVITY_NUMBER);
|
|
||||||
// tmpstr = (char*)tmpPluginStr->ptr;
|
|
||||||
// snprintf(tmpstr, 1, "%d", resutl);
|
|
||||||
return resutl;
|
return resutl;
|
||||||
}
|
}
|
||||||
void show_Sensitivity_page(lv_obj_t* obj)
|
void show_Sensitivity_page(lv_obj_t* obj)
|
||||||
|
|
|
@ -28,5 +28,5 @@ extern void Option_Operating_Time_Key_Long_Press(lv_obj_t* obj, uint32_t key);
|
||||||
extern void Option_DateTime_Key(lv_obj_t* obj, uint32_t key);
|
extern void Option_DateTime_Key(lv_obj_t* obj, uint32_t key);
|
||||||
extern void Option_DateTime_Key_Long_Press(lv_obj_t* obj, uint32_t key);
|
extern void Option_DateTime_Key_Long_Press(lv_obj_t* obj, uint32_t key);
|
||||||
|
|
||||||
extern unsigned int get_dig_pir_level(void);
|
extern int get_dig_pir_level(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -587,6 +587,18 @@ static void LV_MenuCommonItem_UpdateContent(TM_MENU *pMenu)
|
||||||
//#NT#2023/11/03#Eric - end
|
//#NT#2023/11/03#Eric - end
|
||||||
if(pItem->ItemId == IDM_NETWORK_SELECTION)
|
if(pItem->ItemId == IDM_NETWORK_SELECTION)
|
||||||
lv_plugin_label_set_text(label_option_1_scr_uiflowmenucommonitem, IDS_END);
|
lv_plugin_label_set_text(label_option_1_scr_uiflowmenucommonitem, IDS_END);
|
||||||
|
else if(pItem->ItemId == IDM_SENSITIVITY)
|
||||||
|
{
|
||||||
|
int tmp = get_dig_pir_level();
|
||||||
|
if(tmp >= 0 && tmp <= 9)
|
||||||
|
{
|
||||||
|
lv_plugin_label_set_text(label_option_1_scr_uiflowmenucommonitem, LV_PLUGIN_STRING_ID_STRID_0 + tmp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lv_plugin_label_set_text(label_option_1_scr_uiflowmenucommonitem, LV_PLUGIN_STRING_ID_STRID_0);
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
lv_plugin_label_set_text(label_option_1_scr_uiflowmenucommonitem, pOption->TextId);
|
lv_plugin_label_set_text(label_option_1_scr_uiflowmenucommonitem, pOption->TextId);
|
||||||
lv_plugin_label_update_font(label_option_1_scr_uiflowmenucommonitem, LV_OBJ_PART_MAIN);
|
lv_plugin_label_update_font(label_option_1_scr_uiflowmenucommonitem, LV_OBJ_PART_MAIN);
|
||||||
|
@ -708,7 +720,6 @@ static void UIFlowMenuCommonItem_ScrOpen(lv_obj_t* obj)
|
||||||
{
|
{
|
||||||
DBG_DUMP("UIFlowMenuCommonItem_ScrOpen\r\n");
|
DBG_DUMP("UIFlowMenuCommonItem_ScrOpen\r\n");
|
||||||
|
|
||||||
get_dig_pir_level();
|
|
||||||
/***********************************************************************************
|
/***********************************************************************************
|
||||||
* Add Menu Screen into group and set group to keypad indev
|
* Add Menu Screen into group and set group to keypad indev
|
||||||
***********************************************************************************/
|
***********************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user