Skip to content

Commit 1248138

Browse files
committed
Improve scheduled reset
1 parent 7ad61a7 commit 1248138

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

main/main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#define CA_PK "IIR7tWMp+VW9CZI3M7Q3TR4izhjOv96MsvhxKjd6wUQ="
2-
#define FW_VER 51
2+
#define FW_VER 52
33
#define PRODUCT "VIRKEY"
44
#define LOG_TAG "MAIN"
55

@@ -275,7 +275,7 @@ static time_t adv_watchdog;
275275

276276
// Scheduled reboot (Dirty hack)
277277
#ifndef SCHED_RESET
278-
#define SCHED_RESET (24 * 3600 * 10) // One day
278+
#define SCHED_RESET (3 * 24 * 3600 * 10) // 3 days
279279
#endif
280280
static int32_t sched_reset_counter = SCHED_RESET;
281281

@@ -2140,7 +2140,7 @@ void app_main(void) {
21402140
ESP_ERROR_CHECK(esp_task_wdt_reset());
21412141

21422142
// Scheduled reset
2143-
if (SCHED_RESET > 0) {
2143+
if (SCHED_RESET > 0 && !ota.start) {
21442144
sched_reset_counter --;
21452145
if (sched_reset_counter == 0) {
21462146
reboot();

0 commit comments

Comments
 (0)