Commit Graph

265 Commits

Author SHA1 Message Date
Lennart Jahn
034d83fe6b Split declaration and implementation of GetSymbol 2024-01-16 22:34:51 +01:00
FintasticMan
d889f3e444 settings: Add settings item for weather format 2023-12-23 21:42:16 +01:00
Jean-François Milants
f0e8bb26e9 Watch face selection with CMake
Move displayapp/Apps.h into a header only library (to make the integration easier in InfiniSim.
2023-12-23 21:29:13 +01:00
Jean-François Milants
c94a59e7d3 SimpleWeather service : new weather implementation
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.
2023-12-23 21:12:25 +01:00
Jean-François Milants
39bc166e54 Watch face selection at build time
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)
2023-12-21 20:49:22 +01:00
FintasticMan
69b9d30a30 p8: Fix build when building for P8 variants
Building with a TARGET_DEVICE set to any of the P8 variants' names
caused the build to fail, because they contained hyphens.
The build defines a macro `TARGET_DEVICE_$VARIANT`, which fails if
`$VARIANT` contains a hyphen.
2023-12-16 11:43:31 +01:00
Jean-François Milants
63e0c4f4ef Application selection at build time
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.
2023-11-19 21:13:55 +01:00
Finlay Davidson
cfe21103ea motioncontroller: Add functions for analysis
These are functions for converting acceleration due to gravity to angles
in degrees, and some statistical analysis including the mean and
variance.
2023-08-17 21:21:22 +02:00
Max Friedrich
6d0d8c7d63
watchfaceanalog: Background in lvgl (#1824)
* change background image to widgets

This commit removes the background image for the WatchFaceAnalog and replaces it with lvgl widgets. It aims to keep the original look.

* remove comments and background image

---------

Co-authored-by: minacode <minamoto9@web.de>
2023-08-15 13:01:17 +02:00
Finlay Davidson
505520d83b arduinofft: Move to submodule, define srqt_internal externally 2023-06-17 17:46:48 +02:00
Jean-François Milants
1911e2d928 Unify all heaps (stdlib + LVGL + FreeRTOS) into a single heap managed by FreeRTOS and heap_4_infinitime.c.
LVGL supports custom implementation of malloc() and free() so using pvPortMalloc() and vPortFree() is just a matter of setting the right variables.

Other libraries (NimBLE, LittleFS) and InfiniTime code (new) call malloc() and free() from stdlib. InfiniTime now provides the file stdlib.c that provides a custom implementation for malloc(), free(), calloc() and realloc(). This ensures that all calls to the standard allocator are redirected to the FreeRTOS memory manager.

Note that realloc() is needed by NimBLE.
2023-05-18 19:58:09 +02:00
Jean-François Milants
1df3d1a14d Copy the memory manager heap_4.c from the FreeRTOS distribution to the InfiniTime project codebase. This will allow to implement custom functionalities that are not available in the original implementation. 2023-05-18 19:58:09 +02:00
Max Friedrich
020a7fd11d
Refactor watch face to enum (#1339)
change watch face from int to enum

---------

Co-authored-by: minacode <minamoto9@web.de>
2023-04-30 17:03:46 +02:00
Ceimour
c22e30a4a6
Refactored Ppg for frequency based algorithm. (#1486)
New implementation of the heart rate sensor data processing using a frequency based PPG algorithm.
The HRS3300 settings are fine-tuned for better signal to noise at 10Hz.
The measurement delay is now set to 100ms.
Enable and use the ambient light sensor.
FFT implementation based on ArduinoFFT (https://github.com/kosme/arduinoFFT, GPLv3.0).
2023-04-30 15:50:18 +02:00
Riku Isokoski
40f7e1c7be TimerController: Rename to Timer 2023-04-16 14:33:23 +00:00
Riku Isokoski
dd8a9a274f warnings: Treat warnings as error
This way warnings will be taken seriously, and will cause PR checks to
fail when they throw warnings.
2023-02-26 19:32:30 +02:00
Riku Isokoski
8baa317e7e date: Remove date lib
DateTimeController can provide everything we need.
2023-02-25 17:44:06 +02:00
Jean-François Milants
9b2e1b3250 Merge branch 'aleexxzeero-proper-mcuboot-app-size' into develop 2023-01-29 12:47:12 +01:00
Riku Isokoski
a3e14c012d src: Enable unused parameter warning
Fix warnings.
Some clang-formatting was necessary.
DebugPins is unused and was removed.
2023-01-24 10:43:17 +02:00
John Quigley
a7f8b59bfb
Combine Date and Time Settings (#1465)
Replace separate SettingSetDate and SettingSetTime with a combined screenlist.
Add DotIndicators. Similar to PageIndicator, but for use when separating screens instead of pages of a list.

Co-authored-by: Riku Isokoski <riksu9000@gmail.com>
2023-01-14 21:50:21 +02:00
Riku Isokoski
318a243df1 Revert "prepare cmake unity build"
This reverts commit 21f3bd7082.
2022-12-31 12:41:45 +01:00
Alex Dolzhenkov
cfc86d7d85 #1463 Updated CMakeLists.txt for building images with expected alignment 2022-12-29 18:11:24 +13:00
tnixeu
21f3bd7082 prepare cmake unity build
Exclude files from unity build which currently cause compile erros because of redefinitions.
2022-12-27 12:17:46 +01:00
Riku Isokoski
b071422f91 Small fixup for cmake cleanup 2022-12-26 20:46:39 +01:00
Jonathan Vander Mey
44ba4dd470 Clean up target compile option assignments
Removed/simplified some generator expressions that had more repeated
elements than they needed to. Extracted some repeated sets of options
into separate variables as well.
2022-12-26 20:46:39 +01:00
Jonathan Vander Mey
91851d191e Split warning flags from common
Only enable the warning flags when building InfiniTime firmware, not
when building third-party libraries.
2022-12-26 20:46:39 +01:00
Riku Isokoski
afea7ca0d1
Update clang-tidy configuration and fix some warnings (#1474)
Don't enable coding conventions from unrelated projects. Only enable
generic checks.
2022-12-18 18:14:36 +01:00
Jean-François Milants
fbe964ff44 Merge branch 'watchface-casio-digital-G7710' of github.com:ITCactus/InfiniTime into ITCactus-watchface-casio-digital-G7710
# Conflicts:
#	src/components/settings/Settings.h
#	src/displayapp/screens/CheckboxList.cpp
#	src/displayapp/screens/CheckboxList.h
#	src/displayapp/screens/Clock.cpp
#	src/displayapp/screens/Clock.h
#	src/displayapp/screens/settings/SettingWatchFace.cpp
2022-09-27 21:59:22 +02:00
JF
63932810d2
Merge pull request #1024 from dmlls/infineat-pr
Infineat Watchface + support for external resources.
2022-09-27 21:27:36 +02:00
Jean-François Milants
6ed8e983e9 Remove CMake targets and corresponding CLI arguments that are specific to the debugging environment (USE_JLINK, USE_OPENOCD and USE_GDB_CLIENT). 2022-09-17 21:25:54 +02:00
Jean-François Milants
4cf73fc169 Infineat : Add support for external resources, and read the images and fonts from the ilesystem 2022-09-11 16:22:28 +02:00
Jean-François Milants
ada2c09581 Merge branch 'develop' into infineat-external-resources
# Conflicts:
#	src/displayapp/screens/Symbols.h
#	src/displayapp/screens/settings/SettingWatchFace.cpp
#	src/displayapp/screens/settings/SettingWatchFace.h
2022-09-11 14:59:49 +02:00
Jean-François Milants
e2a3d9f0c7 Small improvement in generate-fonts.py following code review.
Add lv_img_conf in Docker image to build resources at build time.
2022-09-11 14:44:36 +02:00
Jean-François Milants
cfc055c978 Package resources + a metadata file into a single .zip file. 2022-09-11 14:44:36 +02:00
Riku Isokoski
78fc1682da
Centralize most color definitions (#1258) 2022-08-16 08:21:23 +03:00
izzeho
d6aa767bda Add P8B mirrored version definition. 2022-08-15 13:18:23 +02:00
Riku Isokoski
edba1d9ccf Add status icons widget 2022-08-02 22:49:12 +02:00
Riku Isokoski
77d3239866 Use submodule for date lib
A directory has been renamed
2022-08-02 22:43:22 +02:00
Jean-François Milants
a9986e5351 Fix filename of the MCUBoot image and recovery MCUBoot image in CMake files. This will fix the generation of output files at the end of the build process. 2022-07-08 17:59:51 +02:00
Christoph Honal
463355281a Display target build variant in system info screen 2022-07-07 11:23:05 +02:00
Christoph Honal
118adb96cf Nimble: Reduce BLE power usage
This configures Nimble to enable the HFCLOCK and other
Bluetooth peripherals only when needed, but 1500 us in advance.
This time is recommended by the Mynewt docs.
2022-07-07 11:20:56 +02:00
Riku Isokoski
ec8a845052
Add PageIndicator widget to reduce code duplication (#1218)
* Move PageIndicator widget to its own files to reduce code duplication
* Use uint8_t in PageIndicator
2022-07-05 07:41:09 +02:00
ITCactus
319dfd23e7 [new watchface] watchface inspired by G7710, with day of year and week number info 2022-06-30 15:14:23 +02:00
Christoph Honal
8b0559c481 Add basic hardware configuration options for P8
This enables the configuration of the LFCLK source,
as well as the target hardware board pin configuration.
2022-06-27 08:28:48 +03:00
Christoph Honal
91c69d3c5b CMake: Fix indentation 2022-06-19 21:23:59 +02:00
Christoph Honal
e247afaa81 CMake: Extend debug configuration
Enable debug output for InfiniTime, Nimble and the NRF SDK
via SEGGER RTT on debug builds.
2022-06-19 21:23:59 +02:00
Diego Miguel
f6f6f9507f Use existing fonts in Infineat watchface 2022-06-11 16:57:24 +02:00
Diego Miguel
b561e7f3d0 Implement CheckboxList screen 2022-06-11 16:56:35 +02:00
Diego Miguel
be16ef0d56 Update BLE controller in Infineat watchface 2022-06-11 16:56:35 +02:00
Diego Miguel
da2cf8e913 Add 'Bebas Neue' and 'Teko' fonts 2022-06-11 16:56:35 +02:00