Fixed bug about auto shutdown.
This commit is contained in:
parent
105521f234
commit
3e1ec06d9c
|
@ -376,7 +376,7 @@ UINT32 DrvKey_DetNormalKey(void)
|
||||||
|
|
||||||
// }
|
// }
|
||||||
if (gpio_getPin(GPIO_KEY_DATAREADY)) {
|
if (gpio_getPin(GPIO_KEY_DATAREADY)) {
|
||||||
uiKeyCode |= FLGKEY_DATAREADY;
|
// uiKeyCode |= FLGKEY_DATAREADY;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
|
@ -387,6 +387,10 @@ UINT32 DrvKey_DetNormalKey(void)
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
DBG_IND("KEY= %08x\r\n", uiKeyCode);
|
DBG_IND("KEY= %08x\r\n", uiKeyCode);
|
||||||
|
if (0 != uiKeyCode)
|
||||||
|
{
|
||||||
|
sf_set_auto_off_time(0);
|
||||||
|
}
|
||||||
// DBG_DUMP("KEY= %d\r\n", gpio_getPin(GPIO_KEY_LEFT));
|
// DBG_DUMP("KEY= %d\r\n", gpio_getPin(GPIO_KEY_LEFT));
|
||||||
|
|
||||||
DrvKey_DetKeyDelay();
|
DrvKey_DetKeyDelay();
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include <kwrap/debug.h>
|
#include <kwrap/debug.h>
|
||||||
#include "sf_sd_common.h"
|
#include "sf_sd_common.h"
|
||||||
#include "sf_commu_mcu_reg.h"
|
#include "sf_commu_mcu_reg.h"
|
||||||
|
#include "sf_common.h"
|
||||||
|
|
||||||
/**************************************************************
|
/**************************************************************
|
||||||
* static variables
|
* static variables
|
||||||
|
@ -36,6 +37,14 @@ static void task_msgbox_timer_cb(lv_task_t* task)
|
||||||
// LV_PLUGIN_STRING_ID_STRID_PLEASE_INSERT_SD
|
// LV_PLUGIN_STRING_ID_STRID_PLEASE_INSERT_SD
|
||||||
if(LV_PLUGIN_STRING_ID_STRING_ENTER_WORK == msgID)
|
if(LV_PLUGIN_STRING_ID_STRING_ENTER_WORK == msgID)
|
||||||
{
|
{
|
||||||
|
UINT16 autoOffTime = sf_get_auto_off_time();
|
||||||
|
if (autoOffTime < 160)
|
||||||
|
{
|
||||||
|
lv_task_del(msgbox_timer);
|
||||||
|
msgbox_timer = NULL;
|
||||||
|
lv_msgbox_start_auto_close(msgbox, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
const lv_plugin_string_t* string = lv_plugin_get_string(msgID);
|
const lv_plugin_string_t* string = lv_plugin_get_string(msgID);
|
||||||
|
|
||||||
if(string){
|
if(string){
|
||||||
|
|
Loading…
Reference in New Issue
Block a user