mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-05-05 12:54:16 +00:00
add ability to reboot from timer - so when asked to reboot, we can confirm it will happen.
This commit is contained in:
@ -6,9 +6,10 @@
|
||||
|
||||
// comment out to remove component
|
||||
|
||||
|
||||
// comment out to remove littlefs
|
||||
#define BK_LITTLEFS
|
||||
|
||||
// add further app wide defined here, and used them to control build inclusion.
|
||||
|
||||
|
||||
#endif
|
||||
@ -60,6 +60,12 @@ static int g_secondsElapsed = 0;
|
||||
|
||||
static int g_openAP = 0;
|
||||
|
||||
// reset in this number of seconds
|
||||
int g_reset = 0;
|
||||
// from wlan_ui.c
|
||||
void bk_reboot(void);
|
||||
|
||||
|
||||
int Time_getUpTimeSeconds() {
|
||||
return g_secondsElapsed;
|
||||
}
|
||||
@ -173,6 +179,14 @@ static void app_led_timer_handler(void *data)
|
||||
setup_wifi_open_access_point();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (g_reset){
|
||||
g_reset--;
|
||||
if (!g_reset){
|
||||
bk_reboot();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void app_on_generic_dbl_click(int btnIndex)
|
||||
|
||||
Reference in New Issue
Block a user