From e92ae19c4e8c2a8e4c46a027334d1901524f1114 Mon Sep 17 00:00:00 2001 From: dakkar Date: Wed, 20 Mar 2019 11:52:47 +0000 Subject: full reboot on watchdog --- sensor/thermostat.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sensor/thermostat.ino b/sensor/thermostat.ino index 9dbccf8..36058d2 100644 --- a/sensor/thermostat.ino +++ b/sensor/thermostat.ino @@ -4,6 +4,7 @@ #include #include "BLEDevice.h" #include "Ticker.h" +#include "esp_system.h" static BLEUUID thermo_service_uuid("11111111-2222-3333-4444-000000000000"); static BLEUUID thermo_temp_uuid("11111111-2222-3333-4444-000000000001"); @@ -128,7 +129,7 @@ void teardown_and_sleep(int next_time) { void watchdog_cb() { Serial.println("watchdog"); - teardown_and_sleep(ON_ERROR_SLEEP_TIME); + esp_restart(); } void loop() { -- cgit v1.2.3