From 76475b7c33abcfa7b112bacc921ae8ceb1e35eb6 Mon Sep 17 00:00:00 2001 From: Kai Lauterbach Date: Wed, 14 Sep 2022 12:18:58 +0200 Subject: [PATCH] Fixed battery mode main function call. Disabled some debug messages. --- firmware/firmware.ino | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/firmware/firmware.ino b/firmware/firmware.ino index cc5a882..84ea6c7 100644 --- a/firmware/firmware.ino +++ b/firmware/firmware.ino @@ -110,10 +110,7 @@ void setup() #ifdef BATTERY_POWERED debug("battery powered"); - do { - _battery_mode_main(); - } while (fsm_state != FSM_STATE_1); - + _battery_mode_main(); digitalWrite(STATUS_LED_PIN, LOW); @@ -128,9 +125,9 @@ void setup() // sleep the system will run into the setup routine ESP.deepSleep(POWERSAVING_SLEEP_S * 1000000, WAKE_RF_DEFAULT); delay(100); -#endif -#ifndef BATTERY_POWERED +#else // not in battery mode + #ifdef ENABLE_WATCHDOG // Enable the internal watchdog ESP.wdtEnable(WATCHDOG_TIMEOUT_MS); @@ -485,7 +482,7 @@ void _fsm_loop() //debug("wait for wind sensor finish"); fsm_state = FSM_STATE_9; // stay here until the wind measurement is done } else { - debug("wind sensor read finish"); + //debug("wind sensor read finish"); fsm_state = FSM_STATE_10; } #else @@ -514,7 +511,7 @@ void _fsm_loop() //debug("wait for wind sensor finish"); fsm_state = FSM_STATE_11; // stay here until the wind measurement is done } else { - debug("wind sensor read finish"); + //debug("wind sensor read finish"); fsm_state = FSM_STATE_12; } #else