summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2019-03-20 11:52:47 +0000
committerdakkar <dakkar@thenautilus.net>2019-03-20 11:52:47 +0000
commite92ae19c4e8c2a8e4c46a027334d1901524f1114 (patch)
treea79429929b14e4cad482ce4aa23a978e7d820825
parentfix serial comms (diff)
downloadthermostat-e92ae19c4e8c2a8e4c46a027334d1901524f1114.tar.gz
thermostat-e92ae19c4e8c2a8e4c46a027334d1901524f1114.tar.bz2
thermostat-e92ae19c4e8c2a8e4c46a027334d1901524f1114.zip
full reboot on watchdog
-rw-r--r--sensor/thermostat.ino3
1 files changed, 2 insertions, 1 deletions
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 <esp_bt.h>
#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() {