add ability to reboot from timer - so when asked to reboot, we can confirm it will happen.

This commit is contained in:
btsimonh
2022-02-12 11:07:20 +00:00
parent 4032df547d
commit cd0db3a262
2 changed files with 16 additions and 1 deletions

View File

@ -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

View File

@ -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)