diff options
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/alarm/AlarmController.cpp | 6 | ||||
| -rw-r--r-- | src/components/alarm/AlarmController.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/components/alarm/AlarmController.cpp b/src/components/alarm/AlarmController.cpp index cea679f..a08bfbd 100644 --- a/src/components/alarm/AlarmController.cpp +++ b/src/components/alarm/AlarmController.cpp @@ -99,6 +99,12 @@ void AlarmController::SetOffAlarmNow() { void AlarmController::StopAlerting() { systemTask->PushMessage(System::Messages::StopRinging); +} + +void AlarmController::OnStopRinging() { + if (state != AlarmState::Alerting) { + return; + } // Alarm state is off unless this is a recurring alarm if (recurrence == RecurType::None) { diff --git a/src/components/alarm/AlarmController.h b/src/components/alarm/AlarmController.h index fb33edb..3c66775 100644 --- a/src/components/alarm/AlarmController.h +++ b/src/components/alarm/AlarmController.h @@ -38,6 +38,7 @@ namespace Pinetime { void SetOffAlarmNow(); uint32_t SecondsToAlarm(); void StopAlerting(); + void OnStopRinging(); enum class AlarmState { Not_Set, Set, Alerting }; enum class RecurType { None, Daily, Weekdays }; uint8_t Hours() const { |
