aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
Commit message (Collapse)AuthorAgeFilesLines
* spellingLionel Elie Mamane2024-11-251-1/+1
|
* weather: Switch to std::optional for Forecast daysFintasticMan2024-11-042-6/+6
| | | | | Also only iterate over the number of days actually in use, rather than MaxNbForecastDays.
* Switch to simpler temperature interfaceFintasticMan2024-11-042-16/+40
|
* weather: Refactor temperature type for type safetyFintasticMan2024-11-042-20/+21
| | | | | | | 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.
* SimpleWeatherService #include <array>Lionel Elie Mamane2024-10-271-1/+1
| | | | | | not <vector> as that is what is actually used. Fixes build failure InfiniTime/src/components/ble/SimpleWeatherService.h:86:18: error: field ‘location’ has incomplete type ‘Pinetime::Controllers::SimpleWeatherService::Location’ {aka ‘std::array<char, 33>’
* datetime: Set the default year to the year during compileFintasticMan2024-10-271-5/+20
|
* MusicService: add missing includes for TickType_t and xTaskGetTickCount (#2130)NeroBurner2024-09-292-0/+3
| | | | | Add `FreeRTOS.h` include for the directly used data type `TickType_t` in the header and the function `xTaskGetTickCount` from FreeRTOS's `task.h`
* Alarm persist to flash (#1367)NeroBurner2024-09-282-27/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Atomic HRS reads (#1845)mark90642024-09-222-2/+2
| | | | | | | | | | - Combine the reading of all `HRS3300` registers into one I2C read so data is not partial - Downsizes both HRS and ALS to 16bit as the sensor does not generate larger than 16bit values in its current configuration - Increasing the resolution by 1 bit doubles the sensor acquisition time, since we are already at 10Hz we are never going to use a higher resolution - The PPG algorithm buffers for ALS/HRS are already 16bit anyway - Remove functions for setting gain / drive that are unused throughout the codebase - Calculate constants with constexpr
* Refactor SystemTask state handling for resiliencemark90642024-09-212-5/+13
| | | | | | State transitions now happen immediately where possible This simplifies state management in general, and prevents bugs such as the chime issue from occurring in the first place
* Advertise HR servicemark90642024-08-184-12/+11
|
* aod: simplify AOD disablement based on notification statusmark90642024-08-051-32/+5
|
* aod: disable while in notification sleepJohn Crawford2024-08-051-4/+35
|
* aod: PPI/RTC-based backlight brightnessmark90642024-08-052-13/+135
|
* feat: always on displayKaffeinatedKat2024-08-051-1/+14
|
* Continuous time updatesJean-François Milants2024-06-091-0/+41
| | | | Add TODO.md in src/components/datetime. This file give detailed information about a refactoring of the DateTimeController that would be nice to do in the future.
* Include assert (fix sim)mark90642024-06-091-0/+1
|
* Continuous time updatesmark90642024-06-094-23/+42
|
* Fix conflicts of min and max from stl_algo.h (included from atomic)Ritvik2024-03-131-1/+1
|
* lowersleep: Improve algorithm by checking wrist angleFintasticMan2024-03-122-9/+23
| | | | Inspired by https://github.com/InfiniTimeOrg/InfiniTime/pull/827#issuecomment-1881580414.
* DateTimeController: Make DayOfWeekShortToStringLow staticVictor Kareh2024-02-182-3/+3
| | | | | This allows it to be used outside of the current datetime context and makes it consistent with the MonthShortToStringLow function.
* Fix OOB flash write when DFU interruptedmark90642024-02-141-0/+2
| | | | If a DFU is restarted, the write indices aren't reset causing the image to be written out of bounds. The CRC check prevents the faulty image from booting but LittleFS still gets nuked.
* Remove GFX (and unused GFX dependencies)mark90642024-02-112-258/+0
|
* SimpleWeatherService: Add forecast operator overrides (#2011)Victor Kareh2024-02-102-0/+17
| | | | Any screen that relies on DirtyValue to display up-to-date forecast data would require the struct to provide an operator override for comparison.
* Only inhibit sleep if motion notifications are enabled, not just Bluetoothapilat2024-01-233-0/+9
|
* Simple Weather Service : Fix timestampJean-François Milants2024-01-041-2/+2
| | | | | In the documentation, specify that the timestamp is expressed in seconds from epoch (instead of nanoseconds). SimpleWeatherService now uses "localtime" (GetCurrentDateTime()) instead of UTC time.
* settings: Add settings item for weather formatFintasticMan2023-12-231-1/+14
|
* weather: Add function for temperature in FahrenheitFintasticMan2023-12-231-0/+4
|
* User applications selection using CMakeJean-François Milants2023-12-231-1/+1
| | | | Fix include path since last rebase.
* Simple Weather ServiceJean-François Milants2023-12-231-1/+1
| | | | | Fix ToUInt64() in SimpleWeatherService.cpp. Fix typo in SimpleWeatherService.md.
* Simple Weather ServiceJean-François Milants2023-12-232-21/+14
| | | | Fix code formatting.
* Simple Weather ServiceJean-François Milants2023-12-232-16/+31
| | | | Store temperatures as int16_t (instead of uint8_t previously). The temperature is expressed in °C * 100.
* Simple Weather ServiceJean-François Milants2023-12-232-14/+16
| | | | Code improvements : icon fields are now typed as Icons, move the location string when creating a new instance of CurrentWeather, fix SimpleWeatherService::CurrentWeather::operator== (location was missing from the comparison).
* Simple Weather Service - code cleaning and improvementsJean-François Milants2023-12-231-6/+6
| | | | | Remove unused Weather debug app. Fix formatting in SimpleWeatherService.cpp.
* Simple Weather Service - code cleaning and improvementsJean-François Milants2023-12-232-25/+15
| | | | | | | Add missing icons (heavy clouds, thunderstorm, snow). Remove unneeded comparison operator (!=), improve conversion of Timestamp and MessageType, order includes. Fix typo in documentation. Remove not related change in StopWatch.
* Simple Weather Service : fix out of bounds access while creating Forecast ↵Jean-François Milants2023-12-232-3/+9
| | | | instance.
* SimpleWeather service : new weather implementationJean-François Milants2023-12-232-49/+60
| | | | Fix recovery firmware and code formatting.
* SimpleWeather service : new weather implementationJean-François Milants2023-12-236-1171/+287
| | | | | | | | | | This new implementation of the weather feature provides a new BLE API and a new weather service. The API uses a single characteristic that allows companion apps to write the weather conditions (current and forecast for the next 5 days). The SimpleWeather service exposes those data as std::optional fields. This new implementation replaces the previous WeahterService. The API is documented in docs/SimpleWeatherService.md.
* Watch face selection at build timeJean-François Milants2023-12-211-1/+1
| | | | Watch faces can now be selected at buid time. It's implemented in a similar way than the selection of user apps, using a list of watch face description that is generated at build time (consteval, constexpr)
* Fix potential buffer overflows when calling sprintfMingjie Shen2023-12-011-2/+2
| | | | | | | | | | 1. Replace sprintf with snprintf, which is safer 2. An unsigned int or unsigned long int requires 11 bytes to print (including the null terminator) 3. Use PRIu16 macro to print uint16_t 4. Format string "#%2d %2d:%02d:%02d.%02d\n" in StopWatch::stopLapBtnEventHandler() requires at least 17 bytes. The 16-byte buffer would clearly be overrun if sprintf were used.
* Fix code formattingJean-François Milants2023-11-191-1/+1
|
* Application selection at build timeJean-François Milants2023-11-191-2/+2
| | | | Fix DisplayAppRecovery so it builds with -std=c++20.
* weather: Fix GetCurrent* functions returning future events (#1879)FintasticMan2023-10-061-9/+18
|
* lowersleep: Implement Lower to Sleep functionality (#827)FintasticMan2023-08-273-9/+20
|
* raisewake: Improve raise to wake algorithmFinlay Davidson2023-08-172-20/+15
| | | | | | | | | | | | | This new algorithm calculates the number of degrees that the wrist has rolled, and checks if that is above a threshold. First it checks if the wrist is still enough for the acceleration values to be considered mostly from gravity. It does this by calculating the mean over the past 2 SystemTask loops, and checking that the variance from that mean is below a threshold. Then it calculates the angle the wrist is being held at, and calculates the difference from the angle some time ago. If this difference is above the threshold, it wakes the watch.
* motioncontroller: Add functions for analysisFinlay Davidson2023-08-172-0/+73
| | | | | | These are functions for converting acceleration due to gravity to angles in degrees, and some statistical analysis including the mean and variance.
* motioncontroller: Store acceleration historyFinlay Davidson2023-08-172-17/+18
| | | | Store history of acceleration values for the y and z axes.
* shakewake: Slightly improve accuracyFinlay Davidson2023-08-171-4/+3
| | | | | | The accumulated speed was calculated by dividing first and multiplying after, which results in more rounding errors than if you multiply first and then divide. The values aren't big enough to overflow.
* NotificationManager.h: Reorder notification struct fields to allow easier ↵Max Friedrich2023-07-091-3/+4
| | | | | | | | | | | | | | creation. (#1774) This commit changes the order for the notification struct fields to allow the creation of notifications using a string literal. ```cpp NotificationManager::Notifiation notification { "String literal with notification text", 42, NotificationManager::Categories::SimpleAlert }; ``` Co-authored-by: minacode <minamoto9@web.de>
* arduinofft: Move to submodule, define srqt_internal externallyFinlay Davidson2023-06-171-1/+2
|