Readded sleep code to make it work

This commit is contained in:
Hogthrob
2019-08-28 17:40:40 +02:00
committed by Martin Jaeger
parent 4764e0a5d0
commit 41f142c112
+7 -1
View File
@@ -164,7 +164,13 @@ int main()
control_timer_start(CONTROL_FREQUENCY);
wait(0.1); // necessary to prevent MCU from randomly getting stuck here if PV panel is connected before battery
// sleep_manager_lock_deep_sleep();
sleep_manager_lock_deep_sleep(); // required to have sleep returning.
/*
The mBed Serial class calls this internal during "attach", this is why it work with ThingSet Serial enabled even
without this statement. Might be an issue of the particular STM32F072 mBed code or may affect
also STM32L073 platforms on mBed
*/
// the main loop is suitable for slow tasks like communication (even blocking wait allowed)
time_t last_call = timestamp;