aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/alarm/AlarmController.h
Commit message (Collapse)AuthorAgeFilesLines
* Alarm persist to flash (#1367)NeroBurner2024-09-281-14/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | * AlarmController: Add saving alarm time to file Save the set alarm time to the SPI NOR flash, so it does not reset to the default value when the watch resets, e.g. due to watchdog timeout or reflashing of a new version of InfiniTime. Just like the `Settings.h` `LoadSettingsFromFile()` the previous alarm at boot (if available) and `SaveSettingsToFile()` the current alarm when the `Alarm.h` screen is closed (only if the settings have changed). The alarm-settings file is stored in `.system/alarm.dat`. The `.system` folder is created if it doesn't yet exist. Fixes: https://github.com/InfiniTimeOrg/InfiniTime/issues/1330 * alarmController: close .system dir after usage Close the `lfs_dir` object for the `.system` dir after usage. Otherwise on the second changed alarm the system will lockup because the `.system` dir is already open and was never closed. --------- Co-authored-by: Galdor Takacs <g@ldor.de>
* Format header filesFinlay Davidson2023-01-091-0/+6
| | | | In my PR updating clang-format, I forgot to also format the headers.
* AlarmController: add const to SecondsToAlarm() functionReinhold Gschweicher2022-09-271-1/+1
| | | | | | The function `SecondsToAlarm()` doesn't change anything in the `AlarmController` object. Mark the function `const` to show this property.
* Switch to freertos timers (#1095)Michele Bini2022-06-061-0/+3
| | | | | | | | | | | * Use FreeRTOS timer for AlarmController * Use FreeRTOS timer for MotorController * Remove app_timer component from compilation as we now solely use FreeROTS timer * Simplify variable and text names for AlarmController and MotorController timers * Call ScheduleAlarm directly from StopAlerting, for recurring timers Co-authored-by: Riku Isokoski <riksu9000@gmail.com> Co-authored-by: NeroBurner <pyro4hell@gmail.com>
* AlarmController: remove unused app_timer.h include in headerReinhold Gschweicher2021-12-091-1/+0
|
* Fixes per Riksu9000's feedbackMark Russell2021-09-161-4/+4
|
* License header fix, add missing bracesMark Russell2021-09-131-1/+5
|
* Fixes based on code reviews (formatting, UI code)Mark Russell2021-09-131-6/+20
|
* Created basic alarm appMark Russell2021-09-101-0/+50