From fc2241fbf47d90510c8c01c3666f9fae5e56754b Mon Sep 17 00:00:00 2001 From: hubmartin Date: Fri, 8 Oct 2021 16:53:49 +0200 Subject: [PATCH 1/2] Add wake on charge event --- src/systemtask/SystemTask.cpp | 3 +++ 1 file changed, 3 insertions(+) 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; From 98e74a32179420a74527532c902516db28795c29 Mon Sep 17 00:00:00 2001 From: hubmartin Date: Fri, 8 Oct 2021 17:01:27 +0200 Subject: [PATCH 2/2] Call also ReloadIdleTimer --- src/systemtask/SystemTask.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index 59c73d96..09c7e88d 100644 --- a/src/systemtask/SystemTask.cpp +++ b/src/systemtask/SystemTask.cpp @@ -347,6 +347,7 @@ void SystemTask::Work() { case Messages::OnChargingEvent: batteryController.Update(); motorController.RunForDuration(15); + ReloadIdleTimer(); if (isSleeping && !isWakingUp) { GoToRunning(); }