summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhubmartin <hub.martin@gmail.com>2021-10-08 16:53:49 +0200
committerhubmartin <hub.martin@gmail.com>2021-10-08 16:53:49 +0200
commitfc2241fbf47d90510c8c01c3666f9fae5e56754b (patch)
tree125749ff6a9330540d1c09176d535cd213725326 /src
parent90fdea29b80016c6d0e6d518853c9251555ea695 (diff)
Add wake on charge event
Diffstat (limited to 'src')
-rw-r--r--src/systemtask/SystemTask.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp
index 5441c162..59c73d96 100644
--- a/src/systemtask/SystemTask.cpp
+++ b/src/systemtask/SystemTask.cpp
@@ -347,6 +347,9 @@ void SystemTask::Work() {
case Messages::OnChargingEvent:
batteryController.Update();
motorController.RunForDuration(15);
+ if (isSleeping && !isWakingUp) {
+ GoToRunning();
+ }
break;
case Messages::MeasureBatteryTimerExpired:
sendBatteryNotification = true;