mirror of
https://github.com/InfiniTimeOrg/InfiniTime.git
synced 2024-12-24 10:13:56 +03:00
Restrict hardware reactivation when not sleeping
This commit is contained in:
parent
06b721a71f
commit
8a2ee437f5
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user