Commit graph

763 commits

Author SHA1 Message Date
Dāvis Mošenkovs e03414ce6d
Setting to disable DFU and FS access (#1891)
Some checks failed
Build and push Docker image / build (push) Has been cancelled
CI / build-firmware (push) Has been cancelled
CI / build-simulator (push) Has been cancelled
CI / get-base-ref-size (push) Has been cancelled
CI / Compare build size (push) Has been cancelled
* Expose SystemTask dependency controllers

Expose NotificationManager and Settings for use by the feature in next commit.

This is a memory efficient way for accessing SystemTask dependencies from
controllers that have SystemTask injected as a dependency.
Looks like each direct dependency injection uses 4 bytes RAM.
As InfiniTime is close to running out of RAM (using 16 more bytes causes build
to fail with "ld: region RAM overflowed with stack") it might be helpful to use
this approach more.

* Add setting to disable DFU and FS access
2025-09-03 20:50:13 +02:00
Heiko Stuebner 9afc23cba9 navigation: fix greying out the app icon if not enabled
Commit 0aead42fdf ("navigation: Add is available (#1847)") added the
ability to draw the app icon in grey and in a disabled state when some
prerequisits were not met. Only the Navigation app was using this mechanism
due to its icons being stored in the external memory and possibly missing.

Commit 63e0c4f4ef ("Application selection at build time") broke this by
always setting the state as true:
      for (const auto& userApp : userApps) {
        apps[i++] = Screens::Tile::Applications {userApp.icon, userApp.app, true};
      }

Fix this by creating an isAvailable() strcuture in the app classes, similar
to how the Watchfaces handle the same problem of checking availability.
2025-07-03 13:19:56 +01:00
Titus 250e7a7032
Dark App Launcher Tiles (#2294) 2025-06-29 17:39:48 +02:00
Titus c3afbc59ce
(small) Music App Redesign (#2292) 2025-06-29 16:43:41 +02:00
mark9064 c1b9967d92 Analog face constexpr fix 2025-06-28 18:30:54 +01:00
Eshe 4517fb8c4b
Pride flag watchface (#2201) 2025-06-19 17:53:45 +01:00
Titus b2d0e04e42
BatteryInfo App Redesign: Fixup (#2310)
* remove leading zeros from battery percentage
* add correct colors matching the battery icon color thresholds
2025-06-12 09:13:53 +02:00
lmamane 4f426f00a8
set static text as static text (#2312)
and save a few bytes of heap memory

Co-authored-by: Lionel Elie Mamane <lionel@mamane.lu>
2025-06-12 09:12:11 +02:00
Steve Amor 9fb35cc073 Refactors watch faces. Replace lv_tick_get() with xTaskGetTickCount() 2025-05-23 17:46:14 +01:00
Matt Zrinsky fb70b538e4 Fix about screen vertical centering.
There was a newline at the end of the last line on the third screen,
which was causing the label to not be centered vertically.
Removing it fixes the centering.
2025-05-19 21:49:46 +02:00
Titus bb8923b56e
Center text on timer button (#2229) 2025-05-16 23:01:19 +02:00
Titus 85be83beab
Add background color to progress bar when flashing firmware (#2237) 2025-05-15 20:46:25 +01:00
Max Friedrich 5b20e8e2ba
Simple calculator (#1483)
Co-authored-by: minacode <minamoto9@web.de>
Co-authored-by: Finlay Davidson <finlay.davidson@coderclass.nl>
Co-authored-by: SuIông N. <Boteium@users.noreply.github.com>
Co-authored-by: mark9064 <30447455+mark9064@users.noreply.github.com>
2025-05-12 23:32:03 +01:00
lmamane c0638c6007
work around g++ version 12, 13 and 14 spurious warning (#2158)
which is an error since we compile with -Werror

Co-authored-by: Lionel Elie Mamane <lionel@mamane.lu>
2025-03-14 13:10:41 +01:00
Titus 30e56834d5
BatteryInfo App Redesign using arc (#2236)
Redesign BatteryInfo App using an Arch widget instead of a bar.

The colors I used are as follows:
- Discharging (default): green
- Charging: lime
- Battery full: blue
- Battery low (<10%): red
2025-03-14 13:07:46 +01:00
Steveis 728da0f4a0
Fix Infineat crash when charging with AOD (#2256)
Optimise the battery animation to not use 100% CPU (which causes DisplayApp to spin forever with AOD)
(DisplayApp also needs to be fixed in the future so it cannot spin infinitely)
2025-02-26 23:16:20 +00:00
Titus d371ebc9e2
Improve no notification text (#2238)
Change the "No notification" text to "No notifications"
2025-02-10 19:28:20 +00:00
ljahn dbe8820834
Alarm: Simplify alarm alerting screen (#2211)
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
2025-01-21 09:10:41 +01:00
Jozef Mlich 3e23ee7c78 Show alarm controller state in status icon 2025-01-05 14:37:35 +01:00
Victor Kareh d69cfcfb13 weather: Fix inverted imperial forecast temperatures
When converting to imperial units, the min and max temperatures were
incorrectly inverted, causing confusion in the display.

Fixes https://github.com/InfiniTimeOrg/InfiniTime/issues/2183
2024-12-10 00:02:17 +01:00
Felipe Martínez b8c51abe69
Use all free RAM for FreeRTOS heap
* Use all free RAM for FreeRTOS heap
* Wrap newlib malloc and related functions
* Implement calloc
2024-12-09 00:10:09 +00:00
Lionel Elie Mamane b1d70ae2ed remove unused include 2024-11-25 08:55:37 +01:00
Lionel Elie Mamane 5ea9c5537e Weather: fix min and max temperature being switched 2024-11-16 23:53:33 +00:00
FintasticMan f7c87a700d weather: Switch to std::optional for Forecast days
Also only iterate over the number of days actually in use, rather than
MaxNbForecastDays.
2024-11-04 21:22:38 +01:00
FintasticMan e247bd7019 Switch to simpler temperature interface 2024-11-04 21:22:38 +01:00
FintasticMan 29ad09f4ef weather: Refactor temperature type for type safety
There is now a Temperature struct in the weather service, which holds
the internal representation. There is also a temperature struct in the
Applications namespace, which holds the temperature in either Celsius or
Fahrenheit.
2024-11-04 21:22:38 +01:00
Samuel Dorsaz afeded0126 Update Date&Time settings label for "Date & Time" 2024-11-04 21:20:44 +01:00
NeroBurner 3db4e012ce
Remove unused pointer to DisplayApp member variables (#2125)
In the screens that use `DisplayApp *app` and pass it to a child item,
or use the reference just in the constructor. Afterwards the `app`
member is not used. So remove it from the private member variables.

Completely remove `app` parameter from `SettingDisplay` constructor as
it is unused.
2024-09-29 19:39:14 +02:00
NeroBurner a0cd439efc
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
mark9064 7ca0418c82 Refactor doNotGoToSleep to a wakelock counter 2024-09-21 22:45:57 +02:00
Eli Tan a266202831
notifications: Dismiss to watchface when empty (#1716)
Set `running` to false to flag end of watchface when there are no more
notifications left to display.

I found it slightly annoying that dismissing all notifications leaves me with
a "No notification to display" message. Instead of dismissing to a relatively
useless message, dismiss to watchface.
2024-09-18 22:31:15 +02:00
mark9064 fd019c7aad Use DirtyValue for timer 2024-09-14 11:20:47 +02:00
Derry Tutt 83922fb3de Remove space before colon 2024-08-18 11:58:56 +02:00
Jean-François Milants 3a0d673df4 Display the SPI flash JEDEC IDs in SystemInformation.
This is needed since a new memory chip will be used in future batches of PineTimes.
2024-08-05 20:34:41 +02:00
mark9064 bf69e0dcc5 aod: fix flashlight brightness restore 2024-08-05 20:32:43 +02:00
John Crawford e884b053d3 aod: disable while in notification sleep 2024-08-05 20:32:43 +02:00
John Crawford 85a2181b64 aod: integrate with display timeout 2024-08-05 20:32:43 +02:00
KaffeinatedKat 20ac7e8df3 feat: always on display 2024-08-05 20:32:43 +02:00
mark9064 a449b272f7 Continuous time updates 2024-06-09 18:34:07 +02:00
John Crawford 6b5235c301
fix: heartrate app displays --- instead of 000 (#1887) 2024-04-12 14:50:33 +02:00
Victor Kareh 9a5f516c42 WatchFaceDigital: Remove unused variables 2024-03-20 20:31:35 +01:00
JF 4ca2112890
Emit the message BleRadioEnableToggle to DisplayApp only if the enable state of the radio has actually changed. (#2037)
This fixes an issue where the BLE connected logo would disappear when opening and closing the BLE setting (without changing it) while InfiniTime was already connected to a companion app.

Co-authored-by: JustScott <development@justscott.me>
2024-03-15 09:20:19 +01:00
FintasticMan 7dbb8f54c6 chrono: Resolve TODOs related to C++20 chrono feats 2024-03-14 21:09:03 +01:00
Victor Kareh 6ab512a6b6 weather: Define function to round and render temperature 2024-02-18 12:57:48 +01:00
Victor Kareh 68ae335a97 weather: Pad forecast temperatures
This ensures temperatures are correctly aligned with one another
2024-02-18 12:57:48 +01:00
Victor Kareh 1857b02efa weather: Colorize forecast temperatures 2024-02-18 12:57:48 +01:00
Victor Kareh f422929d8c weather: Add new app with forecast 2024-02-18 12:57:48 +01:00
Victor Kareh 5d971690cb DateTimeController: Make DayOfWeekShortToStringLow static
This allows it to be used outside of the current datetime context and
makes it consistent with the MonthShortToStringLow function.
2024-02-18 12:57:48 +01:00
Victor Kareh fa1af55a45
Alarm: Replace clock icon with bell 2024-02-12 16:08:40 +01:00
Graham Jones c2c53bc6ab
bma421: Change acceleration values to 'binary milli-G' units
Co-authored-by: FintasticMan <finlay.neon.kid@gmail.com>
2024-02-11 20:46:26 +01:00