Merge branch 'Branch_S550_Fast_Emmc' of gitlab.sifar.tech:linux-em-group/s530-ntk into Branch_S550_Fast_Emmc
This commit is contained in:
commit
75bda39328
|
@ -384,6 +384,43 @@ void hidde_MaxNum_page(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Option_MaxNum_Key_Long_Press(lv_obj_t* obj, uint32_t key)
|
||||||
|
{
|
||||||
|
if(MaxNumTitleLabel == NULL || MaxNumValueLabel == NULL)
|
||||||
|
{
|
||||||
|
printf("MaxNum is NULL");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
char result[3];
|
||||||
|
UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
||||||
|
printf("key:%d\n",key);
|
||||||
|
|
||||||
|
switch(key)
|
||||||
|
{
|
||||||
|
case LV_USER_KEY_NEXT:
|
||||||
|
printf("\033[33m[Option_MaxNum_Key]s\033[0m\n");
|
||||||
|
if(puiPara->SendMaxNum > 1 && puiPara->SendMaxNum <= 99)
|
||||||
|
puiPara->SendMaxNum--;
|
||||||
|
else
|
||||||
|
puiPara->SendMaxNum = 99;
|
||||||
|
sprintf(result, "%02d", puiPara->SendMaxNum);
|
||||||
|
lv_label_set_text(MaxNumValueLabel, result);
|
||||||
|
break;
|
||||||
|
case LV_USER_KEY_PREV:
|
||||||
|
printf("\033[33m[Option_MaxNum_Key]w\033[0m\n");
|
||||||
|
if(puiPara->SendMaxNum >= 1 && puiPara->SendMaxNum < 99)
|
||||||
|
puiPara->SendMaxNum++;
|
||||||
|
else
|
||||||
|
puiPara->SendMaxNum = 1;
|
||||||
|
sprintf(result, "%02d", puiPara->SendMaxNum);
|
||||||
|
lv_label_set_text(MaxNumValueLabel, result);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Option_MaxNum_Key(lv_obj_t* obj, uint32_t key)
|
void Option_MaxNum_Key(lv_obj_t* obj, uint32_t key)
|
||||||
{
|
{
|
||||||
if(MaxNumTitleLabel == NULL || MaxNumValueLabel == NULL)
|
if(MaxNumTitleLabel == NULL || MaxNumValueLabel == NULL)
|
||||||
|
|
|
@ -18,6 +18,7 @@ extern void show_send_time_page(lv_obj_t* obj, const int sendType);
|
||||||
extern void hidde_send_time_page(void);
|
extern void hidde_send_time_page(void);
|
||||||
|
|
||||||
extern void Option_MaxNum_Key(lv_obj_t* obj, uint32_t key);
|
extern void Option_MaxNum_Key(lv_obj_t* obj, uint32_t key);
|
||||||
|
void Option_MaxNum_Key_Long_Press(lv_obj_t* obj, uint32_t key);
|
||||||
extern void Option_send_time_Key(lv_obj_t* obj, uint32_t key);
|
extern void Option_send_time_Key(lv_obj_t* obj, uint32_t key);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1750,6 +1750,11 @@ void UIFlowMenuCommonOptionEventCallback(lv_obj_t* obj, lv_event_t event)
|
||||||
if(KeyPressingTimeMs > 1 * 1000)
|
if(KeyPressingTimeMs > 1 * 1000)
|
||||||
Option_DateTime_Key_Long_Press(obj, *key);
|
Option_DateTime_Key_Long_Press(obj, *key);
|
||||||
break;
|
break;
|
||||||
|
case IDM_MAX_NUM_DAY:
|
||||||
|
KeyPressingTimeMs += LONG_PRESS_INTERVAL;
|
||||||
|
if(KeyPressingTimeMs > 1 * 1000)
|
||||||
|
Option_MaxNum_Key_Long_Press(obj, *key);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2540,6 +2540,40 @@ static void UIFlowPlay_Key(lv_obj_t* obj, uint32_t key)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void UIFlowPlay_Key_Long_Press(lv_obj_t* obj, uint32_t key)
|
||||||
|
{
|
||||||
|
switch(key)
|
||||||
|
{
|
||||||
|
|
||||||
|
case LV_USER_KEY_LEFT:
|
||||||
|
{
|
||||||
|
UINT32 uiFileSeq;
|
||||||
|
PB_GetParam(PBPRMID_CURR_FILESEQ, &uiFileSeq);
|
||||||
|
//FlowPB_SetMovPlayTime(0);
|
||||||
|
if (0 != uiFileSeq)
|
||||||
|
{
|
||||||
|
stop_play();
|
||||||
|
UIFlowPlay_OnKeyUp(obj);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case LV_USER_KEY_RIGHT:
|
||||||
|
{
|
||||||
|
UINT32 uiFileSeq;
|
||||||
|
PB_GetParam(PBPRMID_CURR_FILESEQ, &uiFileSeq);
|
||||||
|
//FlowPB_SetMovPlayTime(0);
|
||||||
|
if (0 != uiFileSeq)
|
||||||
|
{
|
||||||
|
stop_play();
|
||||||
|
UIFlowPlay_OnKeyDown(obj);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void UIFlowPlay_NVTMSG(lv_obj_t* obj, const LV_USER_EVENT_NVTMSG_DATA* msg)
|
static void UIFlowPlay_NVTMSG(lv_obj_t* obj, const LV_USER_EVENT_NVTMSG_DATA* msg)
|
||||||
{
|
{
|
||||||
switch(msg->event)
|
switch(msg->event)
|
||||||
|
@ -2643,11 +2677,11 @@ static void UIFlowPlay_NVTMSG(lv_obj_t* obj, const LV_USER_EVENT_NVTMSG_DATA* ms
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
static unsigned long KeyPressingTimeMs = 0;
|
||||||
static void UIFlowPlayBtnEventCallback(lv_obj_t* obj, lv_event_t event)
|
static void UIFlowPlayBtnEventCallback(lv_obj_t* obj, lv_event_t event)
|
||||||
{
|
{
|
||||||
DBG_IND("%s:%d\r\n", __func__, event);
|
DBG_IND("%s:%d\r\n", __func__, event);
|
||||||
|
printf("%s:%d\n", __FUNCTION__, __LINE__);
|
||||||
switch(event)
|
switch(event)
|
||||||
{
|
{
|
||||||
case LV_EVENT_CLICKED:
|
case LV_EVENT_CLICKED:
|
||||||
|
@ -2676,11 +2710,31 @@ static void UIFlowPlayBtnEventCallback(lv_obj_t* obj, lv_event_t event)
|
||||||
*
|
*
|
||||||
***********************************************************************************/
|
***********************************************************************************/
|
||||||
if(*key != LV_KEY_ENTER)
|
if(*key != LV_KEY_ENTER)
|
||||||
|
{
|
||||||
lv_indev_wait_release(lv_indev_get_act());
|
lv_indev_wait_release(lv_indev_get_act());
|
||||||
|
}
|
||||||
|
KeyPressingTimeMs = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case LV_USER_EVENT_KEY_LONG_PRESS:
|
||||||
|
{
|
||||||
|
if (SELECTION_SHOW_FALSE == gSeletionShow)
|
||||||
|
{
|
||||||
|
uint32_t* key = (uint32_t*)lv_event_get_data();
|
||||||
|
KeyPressingTimeMs += 500;
|
||||||
|
if(KeyPressingTimeMs >= 1 * 1000)
|
||||||
|
{
|
||||||
|
printf("[LV_USER_EVENT_KEY_LONG_PRESS] time : %d\n", KeyPressingTimeMs);
|
||||||
|
UIFlowPlay_Key_Long_Press(obj, *key);
|
||||||
|
KeyPressingTimeMs = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIFlowPlayEventCallback(lv_obj_t* obj, lv_event_t event)
|
void UIFlowPlayEventCallback(lv_obj_t* obj, lv_event_t event)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user