aboutsummaryrefslogtreecommitdiffstats
path: root/src/displayapp/screens/Alarm.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Alarm: Simplify alarm alerting screen (#2211)ljahn2025-01-211-2/+10
| | | | | | | | | | | | Simplify alarm alerting screen and fix bug with alerting on time value change SetAlerting creates an lv_task to automatically call StopAlerting after one minute. This task will call an invalid function reference and lead to a crash under the following condition: All exit paths but the time value change (so not considering this fix) call StopAlerting themselves, which also terminates the lv_task. However, the value change callback only calls DisableAlarm, because its normal use case is for setting up an alarm, where you have to re-confirm enabling the alarm after every change you make. DisableAlarm still sets isAlerting in the alarmController to false, probably because someone thought a currently alerting but also disabled alarm makes no sense, this was introduced in a0cd439. That causes the destructor of Alarm to think there is nothing to do regarding the alerting when the alarm screen is dismissed. Therefore it does not call StopAlerting and the lv_task is left with an invalid function pointer, because Alarm does not exist anymore once the lv_task finally goes to call the callback function
* Alarm persist to flash (#1367)NeroBurner2024-09-281-15/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Refactor doNotGoToSleep to a wakelock countermark90642024-09-211-3/+3
|
* Application selection at build timeJean-François Milants2023-11-191-0/+4
| | | | | | | A list of "user applications" is built at compile time. It contains all the info needed to create the application at runtime (ptr to a create() function) and to display the app in the application menu. All applications declare a TypeTrait with these information. When a new app must be loaded, DisplayApp first check if this app is a System app (in which case it creates it like it did before). If it's not a System app, it looks for the app in the list of User applications and creates it if it found it. Those changes allow to more easily add new app and to select which app must be built into the firmware. Switch to C++20 (and fix a few issues in SpiMaster.cpp and Watchdog.cpp.
* screens: Remove unused DisplayApp parametersRiku Isokoski2023-02-251-2/+1
|
* screens: Remove explicit Screen constructorsRiku Isokoski2023-02-251-1/+1
| | | | | This constructor didn't do anything since DisplayApp reference was removed from the Screen base class.
* SystemTask: Move MotorController to DisplayAppRiku Isokoski2023-02-251-2/+5
| | | | | Vibrations should be associated with something happening on the UI. Therefore SystemTask should not be controlling the motor.
* Centralize most color definitions (#1258)Riku Isokoski2022-08-161-1/+2
|
* Bring back separate info button, move color to a variable.Riku Isokoski2022-08-021-6/+12
|
* Remove clockType variable by checking for nullptr instead.Riku Isokoski2022-08-021-8/+8
| | | | Saves a few bytes
* Use Counter widget in AlarmRiku Isokoski2022-08-021-110/+52
|
* Apply clang-format to all C++ filesFinlay Davidson2022-06-051-2/+6
|
* Tweak gamma on ST7789 and match UI colorsRiku Isokoski2022-04-251-2/+2
| | | | | This change will increase the color accuracy of the PineTime and make UI development with the simulator easier.
* Replace lv_label_set_text where possibleRiku Isokoski2022-04-181-4/+4
|
* Improved alarm alert handlingRiku Isokoski2022-02-131-7/+32
|
* Fix switch default stateRiku Isokoski2022-02-121-0/+2
|
* Alarm: Fix missing stop button. Revert alert layoutRiku Isokoski2022-02-121-4/+6
|
* Alarm: Change checkable button for a switchRiku Isokoski2022-02-121-24/+43
|
* Added alarm 12 hour interfaceEli Weiss2022-01-311-3/+33
|
* Improved format specifiers, bracing, removed C-style casts, whitespace fixes ↵Avamander2021-12-091-2/+2
| | | | and removed Tiles shadowing
* Update includes to to be relative to src directoryReinhold Gschweicher2021-11-151-3/+3
| | | | | | | 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 based on code reviewsMaxim Leshchenko2021-09-291-8/+8
|
* Alarm: Close the popup with information about the time until alarm with the ↵Maxim Leshchenko2021-09-281-0/+11
| | | | | | back button Previously, pressing the back button would close the alarm app anyway. Now if you press on it and the popup with information is open, it will first close and the second press will close the application
* Fixes per Riksu9000's feedbackMark Russell2021-09-161-12/+15
|
* License header fix, add missing bracesMark Russell2021-09-131-1/+5
|
* Fixes based on code reviews (formatting, UI code)Mark Russell2021-09-131-33/+55
|
* Created basic alarm appMark Russell2021-09-101-0/+225