summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJF <JF002@users.noreply.github.com>2021-10-09 20:04:27 +0200
committerGitHub <noreply@github.com>2021-10-09 20:04:27 +0200
commitc99feeea312f911e17b133a93c208caa88cb7b03 (patch)
treeb92ac18ab5b8d068592e5c802ae786053a5e2725 /src
parent1d0943bb30d4e765d266f520fbb6491e3f0a6ef5 (diff)
parent98e74a32179420a74527532c902516db28795c29 (diff)
Merge pull request #728 from hubmartin/charge-wake
Add wake-up on charge event
Diffstat (limited to 'src')
-rw-r--r--src/systemtask/SystemTask.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp
index 5441c162..09c7e88d 100644
--- a/src/systemtask/SystemTask.cpp
+++ b/src/systemtask/SystemTask.cpp
@@ -347,6 +347,10 @@ void SystemTask::Work() {
case Messages::OnChargingEvent:
batteryController.Update();
motorController.RunForDuration(15);
+ ReloadIdleTimer();
+ if (isSleeping && !isWakingUp) {
+ GoToRunning();
+ }
break;
case Messages::MeasureBatteryTimerExpired:
sendBatteryNotification = true;