Skip to content

Commit

Permalink
Restrict hardware reactivation when not sleeping
Browse files Browse the repository at this point in the history
  • Loading branch information
mark9064 authored and JF002 committed Oct 27, 2024
1 parent 06b721a commit 8a2ee43
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/systemtask/SystemTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8a2ee43

Please sign in to comment.