Restrict hardware reactivation when not sleeping
This commit is contained in:
parent
06b721a71f
commit
8a2ee437f5
|
@ -386,6 +386,7 @@ void SystemTask::GoToRunning() {
|
||||||
if (state == SystemTaskState::Running) {
|
if (state == SystemTaskState::Running) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (state == SystemTaskState::Sleeping || state == SystemTaskState::AODSleeping) {
|
||||||
// SPI only switched off when entering Sleeping, not AOD or GoingToSleep
|
// SPI only switched off when entering Sleeping, not AOD or GoingToSleep
|
||||||
if (state == SystemTaskState::Sleeping) {
|
if (state == SystemTaskState::Sleeping) {
|
||||||
spi.Wakeup();
|
spi.Wakeup();
|
||||||
|
@ -397,6 +398,7 @@ void SystemTask::GoToRunning() {
|
||||||
}
|
}
|
||||||
|
|
||||||
spiNorFlash.Wakeup();
|
spiNorFlash.Wakeup();
|
||||||
|
}
|
||||||
|
|
||||||
displayApp.PushMessage(Pinetime::Applications::Display::Messages::GoToRunning);
|
displayApp.PushMessage(Pinetime::Applications::Display::Messages::GoToRunning);
|
||||||
heartRateApp.PushMessage(Pinetime::Applications::HeartRateTask::Messages::WakeUp);
|
heartRateApp.PushMessage(Pinetime::Applications::HeartRateTask::Messages::WakeUp);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user