Improve Enter work mode tips.
This commit is contained in:
parent
8f549afebd
commit
ef46d79229
|
@ -39,6 +39,7 @@ static void task_update_timer_cb(lv_task_t* task)
|
||||||
closing_index ++;
|
closing_index ++;
|
||||||
if (time_ms == 0)
|
if (time_ms == 0)
|
||||||
{
|
{
|
||||||
|
printf("task_update_timer_cb gPowerOff = %d\n", gPowerOff);
|
||||||
Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 2, APP_POWER_OFF_APO, gPowerOff);
|
Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 2, APP_POWER_OFF_APO, gPowerOff);
|
||||||
if(update_timer){
|
if(update_timer){
|
||||||
lv_task_del(update_timer);
|
lv_task_del(update_timer);
|
||||||
|
|
|
@ -47,9 +47,9 @@ static CHAR g_cSelftimerCntStr[8] = {0};
|
||||||
static lv_group_t* gp = NULL;
|
static lv_group_t* gp = NULL;
|
||||||
static lv_task_t* task_selftimer = NULL;
|
static lv_task_t* task_selftimer = NULL;
|
||||||
static lv_task_t* update_icons_timer = NULL;
|
static lv_task_t* update_icons_timer = NULL;
|
||||||
#define GO_TO_WORK_MODE_TIME 57
|
#define GO_TO_WORK_MODE_TIME 59
|
||||||
#define PASSWORD_GO_TO_WORK_MODE_TIME_S 62
|
#define PASSWORD_GO_TO_WORK_MODE_TIME_S 62
|
||||||
#define MENU_GO_TO_WORK_MODE_TIME_S 27
|
#define MENU_GO_TO_WORK_MODE_TIME_S 29
|
||||||
static unsigned int ShutDownTime = GO_TO_WORK_MODE_TIME;
|
static unsigned int ShutDownTime = GO_TO_WORK_MODE_TIME;
|
||||||
static lv_task_t* task_qview = NULL;
|
static lv_task_t* task_qview = NULL;
|
||||||
|
|
||||||
|
@ -1913,7 +1913,6 @@ static void UIFlowPhoto_Key(lv_obj_t* obj, uint32_t key)
|
||||||
case LV_USER_KEY_RIGHT:
|
case LV_USER_KEY_RIGHT:
|
||||||
{
|
{
|
||||||
//SF_WIFI_STATUS_E status = sf_get_wifi_status();
|
//SF_WIFI_STATUS_E status = sf_get_wifi_status();
|
||||||
ShutDownTime = MENU_GO_TO_WORK_MODE_TIME_S;
|
|
||||||
if(TRUE == sf_get_send_statu())
|
if(TRUE == sf_get_send_statu())
|
||||||
{
|
{
|
||||||
printf("\r\n[%s] line:%d %d running\n", __FUNCTION__, __LINE__,key);
|
printf("\r\n[%s] line:%d %d running\n", __FUNCTION__, __LINE__,key);
|
||||||
|
|
|
@ -41,26 +41,46 @@ static void task_msgbox_timer_cb(lv_task_t* task)
|
||||||
UINT16 autoOffTime = sf_get_auto_off_time();
|
UINT16 autoOffTime = sf_get_auto_off_time();
|
||||||
const lv_plugin_string_t* string = lv_plugin_get_string(msgID);
|
const lv_plugin_string_t* string = lv_plugin_get_string(msgID);
|
||||||
|
|
||||||
autoClose = autoClose - 1000;
|
|
||||||
if (0 == autoClose || autoOffTime <= 10)
|
if (0 == autoClose || autoOffTime <= 10)
|
||||||
{
|
{
|
||||||
lv_task_del(msgbox_timer);
|
lv_task_del(msgbox_timer);
|
||||||
msgbox_timer = NULL;
|
msgbox_timer = NULL;
|
||||||
if (msgbox)
|
if (msgbox)
|
||||||
{
|
{
|
||||||
lv_msgbox_start_auto_close(msgbox, 0);
|
printf("msg box close delay 1000.\n");
|
||||||
|
lv_msgbox_start_auto_close(msgbox, 1000);
|
||||||
}
|
}
|
||||||
if (0 == autoClose)
|
if (0 == autoClose)
|
||||||
{
|
{
|
||||||
OpenClosingScreen(DISPLAY_FINAL_SHOW_POWER_OFF);
|
// OpenClosingScreen(DISPLAY_FINAL_DO_NOT_SHOW_POWER_OFF);
|
||||||
|
#define DO_NOT_SHOW_POWER_OFF 0
|
||||||
|
Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 2, APP_POWER_OFF_APO, DO_NOT_SHOW_POWER_OFF);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
autoClose = autoClose - 1000;
|
||||||
if(string){
|
if(string){
|
||||||
snprintf(buf, BUF_LENGTH, "%s\n\n%ds\r\n", string->ptr, autoClose/1000);
|
snprintf(buf, BUF_LENGTH, "%s\n\n%ds\r\n", string->ptr, autoClose/1000);
|
||||||
// lv_msgbox_set_text(msgbox, buf);
|
// lv_msgbox_set_text(msgbox, buf);
|
||||||
lv_label_set_text_fmt(label_msg_scr_uiflowwrnmsg, "%s", buf);
|
lv_label_set_text_fmt(label_msg_scr_uiflowwrnmsg, "%s", buf);
|
||||||
}
|
}
|
||||||
|
if (0 == autoClose || autoOffTime <= 10)
|
||||||
|
{
|
||||||
|
// lv_task_del(msgbox_timer);
|
||||||
|
// msgbox_timer = NULL;
|
||||||
|
// if (msgbox)
|
||||||
|
// {
|
||||||
|
// printf("msg box close delay 1000.\n");
|
||||||
|
// lv_msgbox_start_auto_close(msgbox, 1000);
|
||||||
|
// }
|
||||||
|
// if (0 == autoClose)
|
||||||
|
// {
|
||||||
|
// // OpenClosingScreen(DISPLAY_FINAL_DO_NOT_SHOW_POWER_OFF);
|
||||||
|
// #define DO_NOT_SHOW_POWER_OFF 0
|
||||||
|
// Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 2, APP_POWER_OFF_APO, DO_NOT_SHOW_POWER_OFF);
|
||||||
|
// }
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// update_icons();
|
// update_icons();
|
||||||
return;
|
return;
|
||||||
|
@ -109,6 +129,9 @@ void UIFlowWrnMsgAPI_Open_StringID(lv_plugin_res_id id, uint16_t auto_close_time
|
||||||
{
|
{
|
||||||
lv_plugin_msgbox_set_text(msgbox, id);
|
lv_plugin_msgbox_set_text(msgbox, id);
|
||||||
}
|
}
|
||||||
|
if(auto_close_time_ms){
|
||||||
|
lv_msgbox_start_auto_close(msgbox, auto_close_time_ms);
|
||||||
|
}
|
||||||
|
|
||||||
// if(LV_PLUGIN_STRING_ID_STRING_UPGRADING == msgID)
|
// if(LV_PLUGIN_STRING_ID_STRING_UPGRADING == msgID)
|
||||||
// {
|
// {
|
||||||
|
@ -128,6 +151,9 @@ void UIFlowWrnMsgAPI_Open_StringID(lv_plugin_res_id id, uint16_t auto_close_time
|
||||||
{
|
{
|
||||||
snprintf(buf, BUF_LENGTH, "%s\n\n%ds\r\n", tmpstr1->ptr, autoClose/1000);
|
snprintf(buf, BUF_LENGTH, "%s\n\n%ds\r\n", tmpstr1->ptr, autoClose/1000);
|
||||||
lv_label_set_text_fmt(label_msg_scr_uiflowwrnmsg, "%s", buf);
|
lv_label_set_text_fmt(label_msg_scr_uiflowwrnmsg, "%s", buf);
|
||||||
|
if(auto_close_time_ms){
|
||||||
|
lv_msgbox_start_auto_close(msgbox, auto_close_time_ms + 1000 * 2);
|
||||||
|
}
|
||||||
} else if (LV_PLUGIN_STRING_ID_STRING_UPGRADING == msgID)
|
} else if (LV_PLUGIN_STRING_ID_STRING_UPGRADING == msgID)
|
||||||
{
|
{
|
||||||
lv_label_set_text_fmt(label_msg_scr_uiflowwrnmsg, "Upgrading...\nCamera will automatically restart after upgrade complete");
|
lv_label_set_text_fmt(label_msg_scr_uiflowwrnmsg, "Upgrading...\nCamera will automatically restart after upgrade complete");
|
||||||
|
@ -161,9 +187,9 @@ void UIFlowWrnMsgAPI_Open_StringID(lv_plugin_res_id id, uint16_t auto_close_time
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(auto_close_time_ms){
|
// if(auto_close_time_ms){
|
||||||
lv_msgbox_start_auto_close(msgbox, auto_close_time_ms);
|
// lv_msgbox_start_auto_close(msgbox, auto_close_time_ms);
|
||||||
}
|
// }
|
||||||
|
|
||||||
set_indev_keypad_group(msgbox);
|
set_indev_keypad_group(msgbox);
|
||||||
if(msgbox_timer == NULL){
|
if(msgbox_timer == NULL){
|
||||||
|
|
Loading…
Reference in New Issue
Block a user