InfiniTime_mirror/src
NeroBurner a0cd439efc
Some checks failed
CI / build-firmware (push) Successful in 13m37s
CI / build-simulator (push) Failing after 4s
CI / get-base-ref-size (push) Has been skipped
CI / Compare build size (push) Has been skipped
Alarm persist to flash (#1367)
* 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>
2024-09-28 08:14:08 +02:00
..
buttonhandler ButtonHandler: includes relative to src dir 2022-01-16 20:59:49 +01:00
components Alarm persist to flash (#1367) 2024-09-28 08:14:08 +02:00
displayapp Alarm persist to flash (#1367) 2024-09-28 08:14:08 +02:00
drivers Hrs3300: fix includes for std::begin/std::end 2024-09-22 16:15:48 +02:00
FreeRTOS Refactor pvPortRealloc() to improve readability. 2023-05-18 19:58:09 +02:00
heartratetask Atomic HRS reads (#1845) 2024-09-22 00:29:15 +02:00
libs weather: Colorize forecast temperatures 2024-02-18 12:57:48 +01:00
logging Format header files 2023-01-09 21:41:21 +01:00
resources lv_img_conv: support other modes like 'P' 2024-01-23 08:51:14 +01:00
systemtask Alarm persist to flash (#1367) 2024-09-28 08:14:08 +02:00
touchhandler TouchHandler: Do not store touch panel reference 2023-02-24 00:05:21 +02:00
utility motioncontroller: Add functions for analysis 2023-08-17 21:21:22 +02:00
BootErrors.h Automatic error detection 2021-08-18 15:23:30 +03:00
BootloaderVersion.cpp Fix InfiniTime compiler warnings 2022-06-19 13:41:33 +03:00
BootloaderVersion.h Fix InfiniTime compiler warnings 2022-06-19 13:41:33 +03:00
CMakeLists.txt Refactor doNotGoToSleep to a wakelock counter 2024-09-21 22:45:57 +02:00
FreeRTOSConfig.h Remove task to notify 2024-05-01 16:13:47 +02:00
main.cpp Alarm persist to flash (#1367) 2024-09-28 08:14:08 +02:00
main.h Enable malloc error and stack overflow error detection in FreeRTOS. Count them and display them in the SystemInfo app. 2023-05-18 19:58:09 +02:00
recoveryLoader.cpp Use functional abstraction for hooks 2024-05-01 16:13:47 +02:00
sdk_config.h Switch to freertos timers (#1095) 2022-06-06 17:47:43 +02:00
stdlib.c Unify all heaps (stdlib + LVGL + FreeRTOS) into a single heap managed by FreeRTOS and heap_4_infinitime.c. 2023-05-18 19:58:09 +02:00
Version.h.in Add missing standard includes 2021-11-15 22:02:49 +01:00