aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/alarm/AlarmController.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Alarm persist to flash (#1367)NeroBurner2024-09-281-13/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* SystemTask: Move MotorController to DisplayAppRiku Isokoski2023-02-251-1/+0
| | | | | Vibrations should be associated with something happening on the UI. Therefore SystemTask should not be controlling the motor.
* Update clang-tidy configuration and fix some warnings (#1474)Riku Isokoski2022-12-181-1/+1
| | | | | Don't enable coding conventions from unrelated projects. Only enable generic checks.
* 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-17/+11
| | | | | | | | | | | * 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>
* Apply clang-format to all C++ filesFinlay Davidson2022-06-051-2/+1
|
* AlarmController: allow loss of precision for alarmTime castReinhold Gschweicher2022-03-291-1/+2
| | | | | Allow a loss of precision if the system clock has a lower resolution than nanoseconds. This is the case for web assembly.
* Update includes to to be relative to src directoryReinhold Gschweicher2021-11-151-1/+1
| | | | | | | Don't use relative imports like `../foo.h` as those depend on the relative position of both files. Rather than that use imports relative to the `src` directory, which explicitly is part of the include directories.
* Fixes per Riksu9000's feedbackMark Russell2021-09-161-3/+3
|
* License header fix, add missing bracesMark Russell2021-09-131-2/+7
|
* Fixes based on code reviews (formatting, UI code)Mark Russell2021-09-131-29/+20
|
* Created basic alarm appMark Russell2021-09-101-0/+118