Skip to content

Commit a1922a0

Browse files
committed
Fix chimes
1 parent fa1af55 commit a1922a0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/systemtask/SystemTask.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,12 @@ void SystemTask::Work() {
342342
if (settingsController.GetNotificationStatus() != Controllers::Settings::Notification::Sleep &&
343343
settingsController.GetChimeOption() == Controllers::Settings::ChimesOption::Hours &&
344344
alarmController.State() != AlarmController::AlarmState::Alerting) {
345+
// if sleeping, we can't send a chime to displayApp yet (SPI flash switched off)
346+
// request running first and repush the chime message
345347
if (state == SystemTaskState::Sleeping) {
346348
GoToRunning();
349+
PushMessage(msg);
350+
} else {
347351
displayApp.PushMessage(Pinetime::Applications::Display::Messages::Chime);
348352
}
349353
}
@@ -353,8 +357,12 @@ void SystemTask::Work() {
353357
if (settingsController.GetNotificationStatus() != Controllers::Settings::Notification::Sleep &&
354358
settingsController.GetChimeOption() == Controllers::Settings::ChimesOption::HalfHours &&
355359
alarmController.State() != AlarmController::AlarmState::Alerting) {
360+
// if sleeping, we can't send a chime to displayApp yet (SPI flash switched off)
361+
// request running first and repush the chime message
356362
if (state == SystemTaskState::Sleeping) {
357363
GoToRunning();
364+
PushMessage(msg);
365+
} else {
358366
displayApp.PushMessage(Pinetime::Applications::Display::Messages::Chime);
359367
}
360368
}

0 commit comments

Comments
 (0)