From e509220b69c10d8133097f39e5544688b15a6c33 Mon Sep 17 00:00:00 2001 From: hat Date: Thu, 28 Oct 2021 17:03:21 +0200 Subject: [PATCH 1/5] Timer: let timer go overtime --- src/components/timer/TimerController.cpp | 32 ++++++-------- src/components/timer/TimerController.h | 23 ++++++---- src/displayapp/screens/Timer.cpp | 55 ++++++++++++++++++------ src/displayapp/screens/Timer.h | 5 +-- 4 files changed, 71 insertions(+), 44 deletions(-) diff --git a/src/components/timer/TimerController.cpp b/src/components/timer/TimerController.cpp index 79e44d6f80..aa56d29cee 100644 --- a/src/components/timer/TimerController.cpp +++ b/src/components/timer/TimerController.cpp @@ -9,18 +9,16 @@ using namespace Pinetime::Controllers; - APP_TIMER_DEF(timerAppTimer); namespace { void TimerEnd(void* p_context) { - auto* controller = static_cast (p_context); - if(controller != nullptr) + auto* controller = static_cast(p_context); + if (controller != nullptr) controller->OnTimerEnd(); } } - void TimerController::Init() { app_timer_create(&timerAppTimer, APP_TIMER_MODE_SINGLE_SHOT, TimerEnd); } @@ -31,37 +29,31 @@ void TimerController::StartTimer(uint32_t duration) { app_timer_start(timerAppTimer, APP_TIMER_TICKS(duration), this); endTicks = currentTicks + APP_TIMER_TICKS(duration); timerRunning = true; + overtime = false; } -uint32_t TimerController::GetTimeRemaining() { +int32_t TimerController::GetSecondsRemaining() { if (!timerRunning) { return 0; } auto currentTicks = xTaskGetTickCount(); - - TickType_t deltaTicks = 0; - if (currentTicks > endTicks) { - deltaTicks = 0xffffffff - currentTicks; - deltaTicks += (endTicks + 1); - } else { - deltaTicks = endTicks - currentTicks; - } - - return (static_cast(deltaTicks) / static_cast(configTICK_RATE_HZ)) * 1000; + + int32_t deltaTicks = static_cast(endTicks) - static_cast(currentTicks); + + return (deltaTicks / static_cast(configTICK_RATE_HZ)); } void TimerController::StopTimer() { app_timer_stop(timerAppTimer); timerRunning = false; + overtime = false; } -bool TimerController::IsRunning() { - return timerRunning; -} void TimerController::OnTimerEnd() { - timerRunning = false; - if(systemTask != nullptr) + overtime = true; + if (systemTask != nullptr) { systemTask->PushMessage(System::Messages::OnTimerDone); + } } void TimerController::Register(Pinetime::System::SystemTask* systemTask) { diff --git a/src/components/timer/TimerController.h b/src/components/timer/TimerController.h index fa7bc90dda..49bee5a68f 100644 --- a/src/components/timer/TimerController.h +++ b/src/components/timer/TimerController.h @@ -9,20 +9,26 @@ namespace Pinetime { class SystemTask; } namespace Controllers { - + class TimerController { public: TimerController() = default; - + void Init(); - + void StartTimer(uint32_t duration); - + void StopTimer(); - - uint32_t GetTimeRemaining(); - - bool IsRunning(); + + int32_t GetSecondsRemaining(); + + bool IsOvertime() { + return overtime; + } + + bool IsRunning() { + return timerRunning; + } void OnTimerEnd(); @@ -32,6 +38,7 @@ namespace Pinetime { System::SystemTask* systemTask = nullptr; TickType_t endTicks; bool timerRunning = false; + bool overtime = false; }; } } \ No newline at end of file diff --git a/src/displayapp/screens/Timer.cpp b/src/displayapp/screens/Timer.cpp index a5e4019522..0b65e66d34 100644 --- a/src/displayapp/screens/Timer.cpp +++ b/src/displayapp/screens/Timer.cpp @@ -54,9 +54,17 @@ Timer::Timer(DisplayApp* app, Controllers::TimerController& timerController) time = lv_label_create(lv_scr_act(), nullptr); lv_obj_set_style_local_text_font(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_76); - lv_obj_set_style_local_text_color(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GRAY); - uint32_t seconds = timerController.GetTimeRemaining() / 1000; + int32_t seconds = timerController.GetSecondsRemaining(); + bool overtime = timerController.IsOvertime(); + + if (overtime) { + seconds = -seconds + 1; // "+ 1" is to not show -00:00 again after +00:00 + lv_obj_set_style_local_text_color(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_RED); + } else { + lv_obj_set_style_local_text_color(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GRAY); + } + lv_label_set_text_fmt(time, "%02lu:%02lu", seconds / 60, seconds % 60); lv_obj_align(time, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, -20); @@ -68,23 +76,39 @@ Timer::Timer(DisplayApp* app, Controllers::TimerController& timerController) lv_obj_set_height(btnPlayPause, 40); txtPlayPause = lv_label_create(btnPlayPause, nullptr); if (timerController.IsRunning()) { - lv_label_set_text(txtPlayPause, Symbols::pause); + lv_label_set_text(txtPlayPause, overtime ? Symbols::stop : Symbols::pause); } else { lv_label_set_text(txtPlayPause, Symbols::play); createButtons(); } - taskRefresh = lv_task_create(RefreshTaskCallback, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, this); } Timer::~Timer() { lv_task_del(taskRefresh); lv_obj_clean(lv_scr_act()); + if (timerController.IsRunning() and timerController.IsOvertime()) { + timerController.StopTimer(); + } } void Timer::Refresh() { if (timerController.IsRunning()) { - uint32_t seconds = timerController.GetTimeRemaining() / 1000; + int32_t seconds = timerController.GetSecondsRemaining(); + if (timerController.IsOvertime()) { + seconds = -seconds + 1; // "+ 1" is to not show -00:00 again after +00:00 + + // safety measures, lets not overflow counter as it will display badly + if (seconds >= 100 * 60) { + minutesToSet = 0; + secondsToSet = 0; + lv_obj_set_style_local_text_color(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GRAY); + lv_label_set_text_static(time, "00:00"); + lv_label_set_text(txtPlayPause, Symbols::play); + timerController.StopTimer(); + createButtons(); + } + } lv_label_set_text_fmt(time, "%02lu:%02lu", seconds / 60, seconds % 60); } } @@ -94,9 +118,16 @@ void Timer::OnButtonEvent(lv_obj_t* obj, lv_event_t event) { if (obj == btnPlayPause) { if (timerController.IsRunning()) { lv_label_set_text(txtPlayPause, Symbols::play); - uint32_t seconds = timerController.GetTimeRemaining() / 1000; - minutesToSet = seconds / 60; - secondsToSet = seconds % 60; + int32_t secondsRemaining = timerController.GetSecondsRemaining(); + if (timerController.IsOvertime()) { + minutesToSet = 0; + secondsToSet = 0; + lv_obj_set_style_local_text_color(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GRAY); + lv_label_set_text_static(time, "00:00"); + } else { + minutesToSet = secondsRemaining / 60; + secondsToSet = secondsRemaining % 60; + } timerController.StopTimer(); createButtons(); @@ -104,6 +135,7 @@ void Timer::OnButtonEvent(lv_obj_t* obj, lv_event_t event) { lv_label_set_text(txtPlayPause, Symbols::pause); timerController.StartTimer((secondsToSet + minutesToSet * 60) * 1000); + // inlined destroyButtons() lv_obj_del(btnSecondsDown); btnSecondsDown = nullptr; lv_obj_del(btnSecondsUp); @@ -153,9 +185,6 @@ void Timer::OnButtonEvent(lv_obj_t* obj, lv_event_t event) { } void Timer::setDone() { - lv_label_set_text(time, "00:00"); - lv_label_set_text(txtPlayPause, Symbols::play); - secondsToSet = 0; - minutesToSet = 0; - createButtons(); + lv_obj_set_style_local_text_color(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_RED); + lv_label_set_text(txtPlayPause, Symbols::stop); } diff --git a/src/displayapp/screens/Timer.h b/src/displayapp/screens/Timer.h index 23c8734587..100b2c6ab9 100644 --- a/src/displayapp/screens/Timer.h +++ b/src/displayapp/screens/Timer.h @@ -31,9 +31,8 @@ namespace Pinetime::Applications::Screens { void createButtons(); - lv_obj_t *time, *msecTime, *btnPlayPause, *txtPlayPause, *btnMinutesUp, *btnMinutesDown, *btnSecondsUp, *btnSecondsDown, *txtMUp, - *txtMDown, *txtSUp, *txtSDown; - lv_task_t* taskRefresh; + lv_obj_t *time, *btnPlayPause, *txtPlayPause, *btnMinutesUp, *btnMinutesDown, *btnSecondsUp, *btnSecondsDown, *txtMUp, + *txtMDown, *txtSUp, *txtSDown; }; } From e56fdaa8cb92edbb010b641dabe4930a0947ad88 Mon Sep 17 00:00:00 2001 From: hatmajster Date: Thu, 4 Nov 2021 16:31:57 +0100 Subject: [PATCH 2/5] Timer: overtime, stop() refactor --- src/displayapp/screens/Timer.cpp | 43 ++++++++++++++++---------------- src/displayapp/screens/Timer.h | 1 + 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/displayapp/screens/Timer.cpp b/src/displayapp/screens/Timer.cpp index 0b65e66d34..1af793b08a 100644 --- a/src/displayapp/screens/Timer.cpp +++ b/src/displayapp/screens/Timer.cpp @@ -49,6 +49,23 @@ void Timer::createButtons() { lv_label_set_text(txtSDown, "-"); } +void Timer::stop() { + int32_t secondsRemaining = timerController.GetSecondsRemaining(); + if (timerController.IsOvertime()) { + minutesToSet = 0; + secondsToSet = 0; + secondsRemaining = 0; + } else { + minutesToSet = secondsRemaining / 60; + secondsToSet = secondsRemaining % 60; + } + timerController.StopTimer(); + lv_obj_set_style_local_text_color(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GRAY); + lv_label_set_text_fmt(time, "%02lu:%02lu", secondsRemaining / 60, secondsRemaining % 60); + lv_label_set_text(txtPlayPause, Symbols::play); + createButtons(); +} + Timer::Timer(DisplayApp* app, Controllers::TimerController& timerController) : Screen(app), running {true}, timerController {timerController} { @@ -87,7 +104,7 @@ Timer::Timer(DisplayApp* app, Controllers::TimerController& timerController) Timer::~Timer() { lv_task_del(taskRefresh); lv_obj_clean(lv_scr_act()); - if (timerController.IsRunning() and timerController.IsOvertime()) { + if (timerController.IsRunning() && timerController.IsOvertime()) { timerController.StopTimer(); } } @@ -100,13 +117,8 @@ void Timer::Refresh() { // safety measures, lets not overflow counter as it will display badly if (seconds >= 100 * 60) { - minutesToSet = 0; - secondsToSet = 0; - lv_obj_set_style_local_text_color(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GRAY); - lv_label_set_text_static(time, "00:00"); - lv_label_set_text(txtPlayPause, Symbols::play); - timerController.StopTimer(); - createButtons(); + stop(); + return; } } lv_label_set_text_fmt(time, "%02lu:%02lu", seconds / 60, seconds % 60); @@ -117,20 +129,7 @@ void Timer::OnButtonEvent(lv_obj_t* obj, lv_event_t event) { if (event == LV_EVENT_CLICKED) { if (obj == btnPlayPause) { if (timerController.IsRunning()) { - lv_label_set_text(txtPlayPause, Symbols::play); - int32_t secondsRemaining = timerController.GetSecondsRemaining(); - if (timerController.IsOvertime()) { - minutesToSet = 0; - secondsToSet = 0; - lv_obj_set_style_local_text_color(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GRAY); - lv_label_set_text_static(time, "00:00"); - } else { - minutesToSet = secondsRemaining / 60; - secondsToSet = secondsRemaining % 60; - } - timerController.StopTimer(); - createButtons(); - + stop(); } else if (secondsToSet + minutesToSet > 0) { lv_label_set_text(txtPlayPause, Symbols::pause); timerController.StartTimer((secondsToSet + minutesToSet * 60) * 1000); diff --git a/src/displayapp/screens/Timer.h b/src/displayapp/screens/Timer.h index 100b2c6ab9..b1ce24389c 100644 --- a/src/displayapp/screens/Timer.h +++ b/src/displayapp/screens/Timer.h @@ -30,6 +30,7 @@ namespace Pinetime::Applications::Screens { Controllers::TimerController& timerController; void createButtons(); + void stop(); lv_task_t* taskRefresh; lv_obj_t *time, *btnPlayPause, *txtPlayPause, *btnMinutesUp, *btnMinutesDown, *btnSecondsUp, *btnSecondsDown, *txtMUp, From 345bd6819c767d813165bddb98872372c23a5231 Mon Sep 17 00:00:00 2001 From: hatmajster Date: Thu, 4 Nov 2021 17:31:12 +0100 Subject: [PATCH 3/5] Timer: ringing --- src/components/timer/TimerController.cpp | 6 ++++++ src/components/timer/TimerController.h | 6 +----- src/displayapp/screens/Timer.cpp | 2 ++ src/systemtask/SystemTask.cpp | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/components/timer/TimerController.cpp b/src/components/timer/TimerController.cpp index aa56d29cee..d6f8ffd77e 100644 --- a/src/components/timer/TimerController.cpp +++ b/src/components/timer/TimerController.cpp @@ -49,6 +49,12 @@ void TimerController::StopTimer() { overtime = false; } +void TimerController::StopAlerting() { + if (systemTask != nullptr) { + systemTask->PushMessage(System::Messages::StopRinging); + } +} + void TimerController::OnTimerEnd() { overtime = true; if (systemTask != nullptr) { diff --git a/src/components/timer/TimerController.h b/src/components/timer/TimerController.h index 49bee5a68f..dbc986355e 100644 --- a/src/components/timer/TimerController.h +++ b/src/components/timer/TimerController.h @@ -15,17 +15,13 @@ namespace Pinetime { TimerController() = default; void Init(); - void StartTimer(uint32_t duration); - void StopTimer(); - + void StopAlerting(); int32_t GetSecondsRemaining(); - bool IsOvertime() { return overtime; } - bool IsRunning() { return timerRunning; } diff --git a/src/displayapp/screens/Timer.cpp b/src/displayapp/screens/Timer.cpp index 1af793b08a..ad8ecdb2b1 100644 --- a/src/displayapp/screens/Timer.cpp +++ b/src/displayapp/screens/Timer.cpp @@ -60,6 +60,7 @@ void Timer::stop() { secondsToSet = secondsRemaining % 60; } timerController.StopTimer(); + timerController.StopAlerting(); lv_obj_set_style_local_text_color(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GRAY); lv_label_set_text_fmt(time, "%02lu:%02lu", secondsRemaining / 60, secondsRemaining % 60); lv_label_set_text(txtPlayPause, Symbols::play); @@ -106,6 +107,7 @@ Timer::~Timer() { lv_obj_clean(lv_scr_act()); if (timerController.IsRunning() && timerController.IsOvertime()) { timerController.StopTimer(); + timerController.StopAlerting(); } } diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index 241b29bf31..e9cf63a3ac 100644 --- a/src/systemtask/SystemTask.cpp +++ b/src/systemtask/SystemTask.cpp @@ -314,7 +314,7 @@ void SystemTask::Work() { if (isSleeping && !isWakingUp) { GoToRunning(); } - motorController.RunForDuration(35); + motorController.StartRinging(); displayApp.PushMessage(Pinetime::Applications::Display::Messages::TimerDone); break; case Messages::SetOffAlarm: From 23ca635ee7887e9190d5a6ce086e2477b24d70c0 Mon Sep 17 00:00:00 2001 From: hatmajster Date: Thu, 4 Nov 2021 17:31:52 +0100 Subject: [PATCH 4/5] Timer: change layout to match Alarm app --- src/displayapp/screens/Alarm.h | 1 - src/displayapp/screens/Timer.cpp | 26 +++++++++++--------------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/src/displayapp/screens/Alarm.h b/src/displayapp/screens/Alarm.h index 4b301ce194..0065adc8af 100644 --- a/src/displayapp/screens/Alarm.h +++ b/src/displayapp/screens/Alarm.h @@ -47,7 +47,6 @@ namespace Pinetime { enum class EnableButtonState { On, Off, Alerting }; void SetEnableButtonState(); void SetRecurButtonState(); - void SetAlarm(); void ShowInfo(); void HideInfo(); void ToggleRecurrence(); diff --git a/src/displayapp/screens/Timer.cpp b/src/displayapp/screens/Timer.cpp index ad8ecdb2b1..923cfefdfd 100644 --- a/src/displayapp/screens/Timer.cpp +++ b/src/displayapp/screens/Timer.cpp @@ -15,36 +15,32 @@ void Timer::createButtons() { btnMinutesUp = lv_btn_create(lv_scr_act(), nullptr); btnMinutesUp->user_data = this; lv_obj_set_event_cb(btnMinutesUp, btnEventHandler); - lv_obj_align(btnMinutesUp, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 20, -80); - lv_obj_set_height(btnMinutesUp, 40); - lv_obj_set_width(btnMinutesUp, 60); + lv_obj_set_size(btnMinutesUp, 60, 40); + lv_obj_align(btnMinutesUp, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 20, -85); txtMUp = lv_label_create(btnMinutesUp, nullptr); lv_label_set_text(txtMUp, "+"); btnMinutesDown = lv_btn_create(lv_scr_act(), nullptr); btnMinutesDown->user_data = this; lv_obj_set_event_cb(btnMinutesDown, btnEventHandler); - lv_obj_align(btnMinutesDown, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 20, +40); - lv_obj_set_height(btnMinutesDown, 40); - lv_obj_set_width(btnMinutesDown, 60); + lv_obj_set_size(btnMinutesDown, 60, 40); + lv_obj_align(btnMinutesDown, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 20, +35); txtMDown = lv_label_create(btnMinutesDown, nullptr); lv_label_set_text(txtMDown, "-"); btnSecondsUp = lv_btn_create(lv_scr_act(), nullptr); btnSecondsUp->user_data = this; lv_obj_set_event_cb(btnSecondsUp, btnEventHandler); - lv_obj_align(btnSecondsUp, lv_scr_act(), LV_ALIGN_IN_RIGHT_MID, 10, -80); - lv_obj_set_height(btnSecondsUp, 40); - lv_obj_set_width(btnSecondsUp, 60); + lv_obj_set_size(btnSecondsUp, 60, 40); + lv_obj_align(btnSecondsUp, lv_scr_act(), LV_ALIGN_IN_RIGHT_MID, -20, -85); txtSUp = lv_label_create(btnSecondsUp, nullptr); lv_label_set_text(txtSUp, "+"); btnSecondsDown = lv_btn_create(lv_scr_act(), nullptr); btnSecondsDown->user_data = this; lv_obj_set_event_cb(btnSecondsDown, btnEventHandler); - lv_obj_align(btnSecondsDown, lv_scr_act(), LV_ALIGN_IN_RIGHT_MID, 10, +40); - lv_obj_set_height(btnSecondsDown, 40); - lv_obj_set_width(btnSecondsDown, 60); + lv_obj_set_size(btnSecondsDown, 60, 40); + lv_obj_align(btnSecondsDown, lv_scr_act(), LV_ALIGN_IN_RIGHT_MID, -20, +35); txtSDown = lv_label_create(btnSecondsDown, nullptr); lv_label_set_text(txtSDown, "-"); } @@ -85,13 +81,13 @@ Timer::Timer(DisplayApp* app, Controllers::TimerController& timerController) lv_label_set_text_fmt(time, "%02lu:%02lu", seconds / 60, seconds % 60); - lv_obj_align(time, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, -20); + lv_obj_align(time, lv_scr_act(), LV_ALIGN_CENTER, 0, -25); btnPlayPause = lv_btn_create(lv_scr_act(), nullptr); btnPlayPause->user_data = this; lv_obj_set_event_cb(btnPlayPause, btnEventHandler); - lv_obj_align(btnPlayPause, lv_scr_act(), LV_ALIGN_IN_BOTTOM_MID, 0, -10); - lv_obj_set_height(btnPlayPause, 40); + lv_obj_set_size(btnPlayPause, 115, 50); + lv_obj_align(btnPlayPause, lv_scr_act(), LV_ALIGN_IN_BOTTOM_MID, 0, 0); txtPlayPause = lv_label_create(btnPlayPause, nullptr); if (timerController.IsRunning()) { lv_label_set_text(txtPlayPause, overtime ? Symbols::stop : Symbols::pause); From e53415aeca645adbfac74281a0be932f1d847132 Mon Sep 17 00:00:00 2001 From: hatmajster Date: Thu, 27 Jan 2022 20:01:56 +0100 Subject: [PATCH 5/5] MotorController: Add ringing for X times --- src/components/motor/MotorController.cpp | 23 +++++++++++++++++++++++ src/components/motor/MotorController.h | 5 +++++ src/systemtask/SystemTask.cpp | 2 +- 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/components/motor/MotorController.cpp b/src/components/motor/MotorController.cpp index c794a02c99..9314e3688a 100644 --- a/src/components/motor/MotorController.cpp +++ b/src/components/motor/MotorController.cpp @@ -21,6 +21,9 @@ void MotorController::Init() { void MotorController::Ring(void* p_context) { auto* motorController = static_cast(p_context); motorController->RunForDuration(50); + if (motorController->shouldStopRinging()) { + motorController->StopRinging(); + } } void MotorController::RunForDuration(uint8_t motorDuration) { @@ -29,6 +32,13 @@ void MotorController::RunForDuration(uint8_t motorDuration) { } void MotorController::StartRinging() { + timesToRing = -1; + Ring(this); + app_timer_start(longVibTimer, APP_TIMER_TICKS(1000), this); +} + +void MotorController::StartRingingCoupleTimes(int8_t times) { + timesToRing = times; Ring(this); app_timer_start(longVibTimer, APP_TIMER_TICKS(1000), this); } @@ -41,3 +51,16 @@ void MotorController::StopRinging() { void MotorController::StopMotor(void* p_context) { nrf_gpio_pin_set(PinMap::Motor); } + +bool MotorController::shouldStopRinging(){ + // repeat forever if timesToRing is negative + if (timesToRing < 0) { + return false; + } + + if (timesToRing == 0) { + return true; + } + timesToRing--; + return false; +} diff --git a/src/components/motor/MotorController.h b/src/components/motor/MotorController.h index c9326d57eb..3ce2913290 100644 --- a/src/components/motor/MotorController.h +++ b/src/components/motor/MotorController.h @@ -12,11 +12,16 @@ namespace Pinetime { void Init(); void RunForDuration(uint8_t motorDuration); void StartRinging(); + void StartRingingCoupleTimes(int8_t times); static void StopRinging(); private: + bool shouldStopRinging(); + static void Ring(void* p_context); static void StopMotor(void* p_context); + + int8_t timesToRing = 0; }; } } diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index e9cf63a3ac..09553c12b4 100644 --- a/src/systemtask/SystemTask.cpp +++ b/src/systemtask/SystemTask.cpp @@ -314,7 +314,7 @@ void SystemTask::Work() { if (isSleeping && !isWakingUp) { GoToRunning(); } - motorController.StartRinging(); + motorController.StartRingingCoupleTimes(10); displayApp.PushMessage(Pinetime::Applications::Display::Messages::TimerDone); break; case Messages::SetOffAlarm: