From dbed27fb32745d2ea15daf6058779572653b4755 Mon Sep 17 00:00:00 2001 From: Verkehrsrot Date: Wed, 25 Dec 2019 23:22:11 +0100 Subject: [PATCH] cyclic.cpp bugfix battery low --- src/cyclic.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cyclic.cpp b/src/cyclic.cpp index 6a23c08d..89f8e3e2 100644 --- a/src/cyclic.cpp +++ b/src/cyclic.cpp @@ -22,11 +22,11 @@ void doHousekeeping() { // check if update mode trigger switch was set if (RTC_runmode == RUNMODE_UPDATE) { // check battery status if we can before doing ota - if (batt_sufficient()) + if (batt_sufficient()) { do_reset(true); // warmstart to runmode update - else { + } else { ESP_LOGE(TAG, "Battery voltage %dmV too low for OTA", batt_voltage); - RTC_runmode == RUNMODE_NORMAL; // keep running in normal mode + RTC_runmode = RUNMODE_NORMAL; // keep running in normal mode } } @@ -82,8 +82,8 @@ void doHousekeeping() { ESP_LOGI(TAG, "BME280 Temp: %.2f°C | Humidity: %.2f | Pressure: %.0f", bme_status.temperature, bme_status.humidity, bme_status.pressure); #elif defined HAS_BMP180 - ESP_LOGI(TAG, "BMP180 Temp: %.2f°C | Pressure: %.0f", - bme_status.temperature, bme_status.pressure); + ESP_LOGI(TAG, "BMP180 Temp: %.2f°C | Pressure: %.0f", bme_status.temperature, + bme_status.pressure); #endif #endif