diff options
| author | mark9064 <30447455+mark9064@users.noreply.github.com> | 2024-09-22 22:37:30 +0100 |
|---|---|---|
| committer | JF <JF002@users.noreply.github.com> | 2024-10-27 16:56:47 +0100 |
| commit | 8a2ee437f52312cbe22741023cbbe9cec7b4e8f6 (patch) | |
| tree | e17dbd8bda2242e2b54e73505b367d9cdbf04c12 /src/systemtask/SystemTask.cpp | |
| parent | 06b721a71fabc2213498dfc50a36681eb300a129 (diff) | |
Restrict hardware reactivation when not sleeping
Diffstat (limited to 'src/systemtask/SystemTask.cpp')
| -rw-r--r-- | src/systemtask/SystemTask.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index ba12535c..1bfae4c6 100644 --- a/src/systemtask/SystemTask.cpp +++ b/src/systemtask/SystemTask.cpp @@ -386,17 +386,19 @@ void SystemTask::GoToRunning() { if (state == SystemTaskState::Running) { return; } - // SPI only switched off when entering Sleeping, not AOD or GoingToSleep - if (state == SystemTaskState::Sleeping) { - spi.Wakeup(); - } + if (state == SystemTaskState::Sleeping || state == SystemTaskState::AODSleeping) { + // SPI only switched off when entering Sleeping, not AOD or GoingToSleep + if (state == SystemTaskState::Sleeping) { + spi.Wakeup(); + } - // Double Tap needs the touch screen to be in normal mode - if (!settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::DoubleTap)) { - touchPanel.Wakeup(); - } + // Double Tap needs the touch screen to be in normal mode + if (!settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::DoubleTap)) { + touchPanel.Wakeup(); + } - spiNorFlash.Wakeup(); + spiNorFlash.Wakeup(); + } displayApp.PushMessage(Pinetime::Applications::Display::Messages::GoToRunning); heartRateApp.PushMessage(Pinetime::Applications::HeartRateTask::Messages::WakeUp); |
