aboutsummaryrefslogtreecommitdiffstats
path: root/src/systemtask
diff options
context:
space:
mode:
authormark9064 <30447455+mark9064@users.noreply.github.com>2024-02-13 00:33:31 +0000
committerJF <JF002@users.noreply.github.com>2024-03-12 19:08:17 +0100
commit70f6604878e58ce7d052825cf44e960b263309d4 (patch)
tree792538bbadda17668225044590a443ba99a4c844 /src/systemtask
parent004b2bf3a019fa63e18b0b2d5bd912ebf82c8c76 (diff)
Fix chimes
Diffstat (limited to 'src/systemtask')
-rw-r--r--src/systemtask/SystemTask.cpp8
1 files changed, 8 insertions, 0 deletions
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);
}
}