BUG:10614 自动关机倒计时5秒后不能打断问题

This commit is contained in:
xiehongyan 2023-12-29 17:13:19 +08:00
parent f6e9ed6ab3
commit 92aa1909ba
6 changed files with 48 additions and 18 deletions

View File

@ -167,7 +167,7 @@ BOOL UIStorageCheck_DCIMWritable(void)
} }
{ {
ret = TRUE; //ret = TRUE;
DBG_IND("check_DCIM_writable: uiStatus=%d\r\n", uiStatus); DBG_IND("check_DCIM_writable: uiStatus=%d\r\n", uiStatus);
} }
return ret; return ret;
@ -216,7 +216,18 @@ static BOOL UIStrgCheckFull(UINT32 *pFreeCount)
*pFreeCount = uiCountTmp; *pFreeCount = uiCountTmp;
} }
if (uiCountTmp == 0) { if (uiCountTmp == 0) {
return TRUE; #if (USE_DCF == ENABLE)
if (DCF_GetDBInfo(DCF_INFO_TOL_FILE_COUNT))
{
return FALSE;
}
else
{
return TRUE;
}
#else
return TRUE;
#endif
} else { } else {
return FALSE; return FALSE;
} }
@ -248,7 +259,13 @@ static BOOL UIStrgCheckErr(MMC_DEV_TYPE dev_id)
DBG_ERR("UIStorageCheck: %d Card Error\r\n", System_GetState(SYS_STATE_FS)); DBG_ERR("UIStorageCheck: %d Card Error\r\n", System_GetState(SYS_STATE_FS));
return TRUE; return TRUE;
} else { } else {
return FALSE; if (UIStorageCheck_DCIMWritable() == FALSE)
{
return TRUE;
}
else{
return FALSE;
}
} }
} }

View File

@ -726,18 +726,20 @@ static void update_camera_message(void)
UINT32 cardStatus = System_GetState(SYS_STATE_CARD); UINT32 cardStatus = System_GetState(SYS_STATE_CARD);
if (cardStatus != CARD_REMOVED) if (cardStatus != CARD_REMOVED)
{ {
//if (g_SysStrg_Chg) if (g_SysStrg_Chg)
//{
//static int cnt = 0;
//if(cnt++<3){
// lv_label_set_text(label_6_scr_uiflowphoto, "wait");
//}else{
//g_SysStrg_Chg = false;
//cnt = 0;
//}
//} else
if (UIStorageCheck(STORAGE_CHECK_ERROR, NULL) == TRUE)
{ {
static int cnt = 0;
if(cnt++<1){
lv_label_set_text(label_6_scr_uiflowphoto, "Loarding...");
}else{
g_SysStrg_Chg = false;
cnt = 0;
}
} else if (UIStorageCheck(STORAGE_CHECK_ERROR, NULL) == TRUE)
{
if(UIStorageCheck_DCIMWritable() == FALSE){
lv_label_set_text(label_6_scr_uiflowphoto, "SD CARD ERROR");
}
// lv_label_set_text(label_6_scr_uiflowphoto, "SD CARD ERROR"); // lv_label_set_text(label_6_scr_uiflowphoto, "SD CARD ERROR");
} else if (UIStorageCheck(STORAGE_CHECK_FULL, NULL) == TRUE) } else if (UIStorageCheck(STORAGE_CHECK_FULL, NULL) == TRUE)
{ {
@ -1860,7 +1862,7 @@ static void UIFlowPhoto_NVTMSG(lv_obj_t* obj, const LV_USER_EVENT_NVTMSG_DATA* m
{ {
g_SysStrg_Chg = false; g_SysStrg_Chg = false;
UIStorageCheck(STORAGE_CHECK_FULL, &g_uiFreePicNum); UIStorageCheck(STORAGE_CHECK_FULL, &g_uiFreePicNum);
printf("[*x]===================================================================================\n"); printf("[*x]====UI_StorageCheck: g_uiFreePicNum = 0x%ld\r\n", g_uiFreePicNum);
DBG_DUMP("UI_StorageCheck: g_uiFreePicNum = 0x%ld\r\n", g_uiFreePicNum); DBG_DUMP("UI_StorageCheck: g_uiFreePicNum = 0x%ld\r\n", g_uiFreePicNum);
lv_label_set_text(label_6_scr_uiflowphoto, Get_FreePicNumString(g_uiFreePicNum)); lv_label_set_text(label_6_scr_uiflowphoto, Get_FreePicNumString(g_uiFreePicNum));
break; break;

View File

@ -23,6 +23,10 @@ extern void UIFlowPhoto_update_selftimer_cnt(UINT32 time);
CHAR *Get_FreePicNumString(UINT32 uiValue) CHAR *Get_FreePicNumString(UINT32 uiValue)
{ {
if (System_GetState(SYS_STATE_FS) != FS_INIT_OK)
{
return 0;
}
unsigned long fileCount = 0; unsigned long fileCount = 0;
fileCount = DCF_GetDBInfo(DCF_INFO_TOL_FILE_COUNT); fileCount = DCF_GetDBInfo(DCF_INFO_TOL_FILE_COUNT);
snprintf(g_cFreePicNumStr, sizeof(g_cFreePicNumStr), "%05ld/%05ld", fileCount, uiValue); snprintf(g_cFreePicNumStr, sizeof(g_cFreePicNumStr), "%05ld/%05ld", fileCount, uiValue);

View File

@ -42,8 +42,15 @@ 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);
if (6000 == autoClose)
{
sf_set_pir_statu_flag(1);
}
if (0 == autoClose || autoOffTime <= 10) if (0 == autoClose || autoOffTime <= 10)
{ {
//sf_set_pir_statu_flag(0);
lv_task_del(msgbox_timer); lv_task_del(msgbox_timer);
msgbox_timer = NULL; msgbox_timer = NULL;
if (msgbox) if (msgbox)

View File

@ -289,8 +289,8 @@ void sf_mode_detect(void)
} }
else if(pwroffcnt == 6) else if(pwroffcnt == 6)
{ {
//LCD_BACKLIGHT_OFF; sf_sys_status_led_set(SF_LED_SYS_STATE_EXIT_GO_TO_PIR);
sf_sys_status_led_set(SF_LED_SYS_STATE_POWER_OFF); /*
printf("[power off] %s(%d) AutoOfftime:%d\n", __FUNCTION__, __LINE__, AutoOfftime); printf("[power off] %s(%d) AutoOfftime:%d\n", __FUNCTION__, __LINE__, AutoOfftime);
#define DO_NOT_SHOW_POWER_OFF 0 #define DO_NOT_SHOW_POWER_OFF 0
if(AutoOfftime >= KeepAliveTime_s) if(AutoOfftime >= KeepAliveTime_s)
@ -305,7 +305,7 @@ void sf_mode_detect(void)
Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 2, APP_POWER_OFF_APO, DO_NOT_SHOW_POWER_OFF); //shutdown start Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 2, APP_POWER_OFF_APO, DO_NOT_SHOW_POWER_OFF); //shutdown start
#endif #endif
} }
sf_set_power_off_flag(1); sf_set_power_off_flag(1);*/
} }
} }
else else

View File