summaryrefslogtreecommitdiff
path: root/src/systemtask
diff options
context:
space:
mode:
authorMichele Bini <michele.bini@gmail.com>2022-04-17 11:06:18 (GMT)
committerMichele Bini <michele.bini@gmail.com>2022-04-17 13:11:09 (GMT)
commit94db51bba103c6b70475209c05a10911f4a005c7 (patch)
tree5a12dbe8cd6347ffe45072bcb2588805d9094dff /src/systemtask
parent2607c3d79947e900ce4c5ded296f649677511a34 (diff)
Use FreeRTOS timer for AlarmController
Diffstat (limited to 'src/systemtask')
-rw-r--r--src/systemtask/SystemTask.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp
index 38c728f..9105d89 100644
--- a/src/systemtask/SystemTask.cpp
+++ b/src/systemtask/SystemTask.cpp
@@ -319,6 +319,7 @@ void SystemTask::Work() {
break;
case Messages::StopRinging:
motorController.StopRinging();
+ alarmController.OnStopRinging();
break;
case Messages::BleConnected:
ReloadIdleTimer();
@@ -402,7 +403,8 @@ void SystemTask::Work() {
break;
case Messages::OnNewHour:
using Pinetime::Controllers::AlarmController;
- if (settingsController.GetChimeOption() == Controllers::Settings::ChimesOption::Hours && alarmController.State() != AlarmController::AlarmState::Alerting) {
+ if (settingsController.GetChimeOption() == Controllers::Settings::ChimesOption::Hours &&
+ alarmController.State() != AlarmController::AlarmState::Alerting) {
if (isSleeping && !isWakingUp) {
GoToRunning();
displayApp.PushMessage(Pinetime::Applications::Display::Messages::Clock);
@@ -412,7 +414,8 @@ void SystemTask::Work() {
break;
case Messages::OnNewHalfHour:
using Pinetime::Controllers::AlarmController;
- if (settingsController.GetChimeOption() == Controllers::Settings::ChimesOption::HalfHours && alarmController.State() != AlarmController::AlarmState::Alerting) {
+ if (settingsController.GetChimeOption() == Controllers::Settings::ChimesOption::HalfHours &&
+ alarmController.State() != AlarmController::AlarmState::Alerting) {
if (isSleeping && !isWakingUp) {
GoToRunning();
displayApp.PushMessage(Pinetime::Applications::Display::Messages::Clock);
@@ -442,7 +445,7 @@ void SystemTask::Work() {
displayApp.PushMessage(Pinetime::Applications::Display::Messages::ShowPairingKey);
break;
case Messages::BleRadioEnableToggle:
- if(settingsController.GetBleRadioEnabled()) {
+ if (settingsController.GetBleRadioEnabled()) {
nimbleController.EnableRadio();
} else {
nimbleController.DisableRadio();