From 70f6604878e58ce7d052825cf44e960b263309d4 Mon Sep 17 00:00:00 2001 From: mark9064 <30447455+mark9064@users.noreply.github.com> Date: Tue, 13 Feb 2024 00:33:31 +0000 Subject: [PATCH] Fix chimes --- src/systemtask/SystemTask.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index 246e7cec..5a885f17 100644 --- a/src/systemtask/SystemTask.cpp +++ b/src/systemtask/SystemTask.cpp @@ -342,8 +342,12 @@ void SystemTask::Work() { if (settingsController.GetNotificationStatus() != Controllers::Settings::Notification::Sleep && settingsController.GetChimeOption() == Controllers::Settings::ChimesOption::Hours && alarmController.State() != AlarmController::AlarmState::Alerting) { + // if sleeping, we can't send a chime to displayApp yet (SPI flash switched off) + // request running first and repush the chime message if (state == SystemTaskState::Sleeping) { GoToRunning(); + PushMessage(msg); + } else { displayApp.PushMessage(Pinetime::Applications::Display::Messages::Chime); } } @@ -353,8 +357,12 @@ void SystemTask::Work() { if (settingsController.GetNotificationStatus() != Controllers::Settings::Notification::Sleep && settingsController.GetChimeOption() == Controllers::Settings::ChimesOption::HalfHours && alarmController.State() != AlarmController::AlarmState::Alerting) { + // if sleeping, we can't send a chime to displayApp yet (SPI flash switched off) + // request running first and repush the chime message if (state == SystemTaskState::Sleeping) { GoToRunning(); + PushMessage(msg); + } else { displayApp.PushMessage(Pinetime::Applications::Display::Messages::Chime); } }