Fixed bug number 10057.

This commit is contained in:
xiaojiazhu 2023-11-23 14:26:05 +08:00
parent 9b5295f7be
commit 866df35bd6
4 changed files with 21 additions and 4 deletions

View File

@ -1929,7 +1929,7 @@ static UINT32 EnterWorkMode(void)
printf(" EnterWorkMode \n");
// Reset_MenuInfo();
// sf_sleep_ms(500);
Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 1, APP_POWER_OFF_NORMAL);
Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 1, APP_POWER_OFF_APO);
return TRUE;
}

View File

@ -1,4 +1,9 @@
#include "UIFlowLVGL/UIFlowLVGL.h"
#include "PrjInc.h"
#include "ImageApp/ImageApp_Photo.h"
#include "UIFlowLVGL/UIFlowCommon/UIFlowCommon.h"
#include "sf_common.h"
#include "sf_mcu.h"
#include <stdio.h>
#include <unistd.h>
#define UPDATE_TIMEER_MS 200
@ -30,6 +35,15 @@ static void task_update_timer_cb(lv_task_t* task)
lv_label_set_text_fmt(label_1_scr_uiflowclose, "%ds", time_ms / 1000);
time_ms -= UPDATE_TIMEER_MS;
closing_index ++;
if (time_ms == 0)
{
Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 1, APP_POWER_OFF_APO);
if(update_timer){
lv_task_del(update_timer);
update_timer = NULL;
// update_selftimer();
}
}
}
void OpenClosingScreen(void)
{

View File

@ -3,6 +3,7 @@
#include "UIApp/Play/UIPlayComm.h"
#include "UIFlowLVGL/UIFlowMenuCommonConfirm/UIFlowMenuCommonConfirmAPI.h"
#include "UIFlowLVGL/UIFlowWrnMsg/UIFlowWrnMsgAPI.h"
#include "UIFlowLVGL/UIFlowClose/UIFlowCloseEventCallback.h"
#include <kwrap/debug.h>
#include "kwrap/nvt_type.h"
#include "sf_sd_common.h"
@ -520,8 +521,9 @@ static void UIFlowMenuCommonConfirm_MessageBox_ValueChanged(lv_obj_t* obj, uint3
BKG_PostEvent(gBKGEvt);
} else if (gBKGEvt == NVTEVT_BKW_ENTER_WORK_MODE)
{
BKG_PostEvent(gBKGEvt);
UIFlowMenuCommonConfirm_CloseScr();
OpenClosingScreen();
// BKG_PostEvent(gBKGEvt);
// UIFlowMenuCommonConfirm_CloseScr();
} else if (gBKGEvt) {
DBG_FUNC("gBKGEvt=%d\r\n",gBKGEvt);
lv_plugin_scr_open(wait_moment_scr, &string_id_please_wait);

View File

@ -1706,7 +1706,8 @@ void UIFlowPhtot_KeyLongPress(lv_obj_t* obj, uint32_t key)
KeyLeftPressingTimeMs += LONG_PRESS_INTERVAL;
if (3 * 1000 <= KeyLeftPressingTimeMs)
{
Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 1, APP_POWER_OFF_APO);
// Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 1, APP_POWER_OFF_APO);
OpenClosingScreen();
KeyLeftPressingTimeMs = 0;
}
break;