Compare commits

...

259 Commits

Author SHA1 Message Date
e54d78a04b WORKING 35 entries. Will use on trip 2022-06-17 22:13:09 +01:00
8f32478141 WORKING on real PineTime 2022-06-17 19:05:16 +01:00
b002fddc29 Try to fix and add logging for date handling 2022-06-17 17:47:34 +01:00
ea62510eb6 Fix BLE service not being registered 2022-06-17 17:47:24 +01:00
a4598ed63e FIRST FLASHED VERSION 2022-06-16 22:09:54 +01:00
72a020127f Add base scaffolding for new Agenda application 2022-06-15 21:22:04 +01:00
Finlay Davidson
373289c072 Be more specific about the compiler version 2022-06-11 22:59:38 +03:00
Finlay Davidson
350bca3965 Replace more instances of old gcc ver 2022-06-11 22:59:38 +03:00
Finlay Davidson
94cd2ba563 Update arm gcc toolchain to 11.2-2022.02
Updates the buildAndProgram doc and the docker
image, which means GitHub Actions will also use
the new toolchain.
2022-06-11 22:59:38 +03:00
Reinhold Gschweicher
ecb3cd3e31 SettingChimes: private Option struct, use std::array for cbOption 2022-06-11 22:46:38 +03:00
Riku Isokoski
d55ec42b17 Simplify SettingChimes code 2022-06-11 22:46:38 +03:00
FintasticMan
a1385cb481
Minor changes to clang-format workflow (#1177) 2022-06-11 22:45:11 +03:00
Diego Miguel Lozano
de62620de1
Remove duplicated value in fonts.json (#1179) 2022-06-11 17:00:26 +03:00
kieranc
7e169ee4aa
Fix typo in gettingStarted guide (#1178) 2022-06-07 21:44:40 +03:00
Riku Isokoski
955dda60c5 Use lambda to reduce code duplication 2022-06-06 21:28:03 +02:00
Riku Isokoski
6cfb45e280 Move event handlers to unnamed namespace 2022-06-06 21:28:03 +02:00
Riku Isokoski
c6026aa617 Use static constexpr to force compile time initialization 2022-06-06 21:28:03 +02:00
Riku Isokoski
254c85246e Timer: Replace time label with Counter control hiding functionality 2022-06-06 21:28:03 +02:00
Riku Isokoski
4a40d29279 Counter: add show and hide controls functions 2022-06-06 21:28:03 +02:00
Riku Isokoski
41c461d1f6 Move linePoints to a member variable 2022-06-06 21:28:03 +02:00
Riku Isokoski
17cedd6629 Move bg color to a constexpr variable 2022-06-06 21:28:03 +02:00
Riku Isokoski
1d34e83c97 Use Counter widget in Timer 2022-06-06 21:28:03 +02:00
Riku Isokoski
9e18c23aac Lighten the large font for a more balanced look
Add Jetbrains Mono Light font
2022-06-06 21:28:03 +02:00
Riku Isokoski
12d4bc4139 Add initial counter widget 2022-06-06 21:28:03 +02:00
Seth Itow
17079fb114 doc: Fix imageFile.png path in SWD.md 2022-06-06 21:20:13 +02:00
Riku Isokoski
c2b15b1446 Move basic apps to the top of the app list 2022-06-06 20:47:34 +02:00
Ildar Mulyukov
7bc692eea4 src/CMakeLists.txt: use iHEX format for mcuboot image creation
for better control of addresses used by img/fw
+ fix typo (RECOVERYY)
2022-06-06 19:41:57 +02:00
Ildar Mulyukov
36740498db CMakeLists.txt: add double quotes in STRIP command
fixes cases when git is missing in the build system
2022-06-06 19:41:57 +02:00
Ildar Mulyukov
5f28f89df2 fix wrong linker script
introduced in 58a2d000c4
2022-06-06 19:41:57 +02:00
Michele Bini
35dcf8c860
Switch to freertos timers (#1095)
* Use FreeRTOS timer for AlarmController
* Use FreeRTOS timer for MotorController
* Remove app_timer component from compilation as we now solely use
  FreeROTS timer
* Simplify variable and text names for AlarmController and MotorController timers
* Call ScheduleAlarm directly from StopAlerting, for recurring timers

Co-authored-by: Riku Isokoski <riksu9000@gmail.com>
Co-authored-by: NeroBurner <pyro4hell@gmail.com>
2022-06-06 17:47:43 +02:00
mabuch
f95147cf0e
remove unused symbols, free a little bit of space (#1167) 2022-06-05 19:43:49 +02:00
mabuch
91a3e98276
remove unused Meter.cpp and Meter.h (#1171) 2022-06-05 19:35:33 +02:00
mabuch
8a71f2b9e0
remove unused Brightness App (#1170) 2022-06-05 19:34:37 +02:00
mabuch
8999158528
remove old unused bluetooth icons (#1172) 2022-06-05 18:50:36 +02:00
Christoph Honal
977936e8e2 System: Refactor pin and interrupt setup
This should ensure better readability of the pin setup procedure,
as well as allow the configuration of the hardware button enable pin
and the accelerometer interrupt pin via the pin mapping header.
2022-06-05 09:53:22 +03:00
Christoph Honal
03a2059e87 SystemTask: Use "&&" instead of "and" for operators
As per the coding style, only primary spelling should be used for operators.
2022-06-05 09:53:22 +03:00
Christoph Honal
702f65d3ee Bootloader: Ignore __pycache__ in Git 2022-06-05 09:53:22 +03:00
luz paz
20ac1cd374 revert portion of previous commit 2022-06-05 09:31:23 +03:00
luz paz
03a510bd18 Fix various typos
Found via `codespell -q 3 -S ./src/libs -L ans,doubleclick,trough`
2022-06-05 09:31:23 +03:00
Finlay Davidson
7f45538eb5 Apply clang-format to all C++ files 2022-06-05 09:15:46 +03:00
Finlay Davidson
718fbdab98 Replace C-style casts with static_cast 2022-06-05 09:15:46 +03:00
Finlay Davidson
0ce4183640 Rename lvgl image files to .c 2022-06-05 09:15:46 +03:00
Ludovic J
87a69fe52d Fix assertion failure in TimerController
0 is not valid for xTimerPeriodInTicks, changing it to 1 to pass the assertion
2022-05-27 22:14:28 +03:00
Riku Isokoski
0fabba1c9a Remove extra linebreaks 2022-05-27 17:52:26 +02:00
Riku Isokoski
a2218dd4ad Unzip DFU, so the artifact doesn't need to be unzipped by the user. 2022-05-27 17:52:26 +02:00
Riku Isokoski
619477cbd1 Rename uploaded files with source branch in workflows 2022-05-27 17:52:26 +02:00
Riku Isokoski
cc2d5c39ce Cleanup workflows 2022-05-27 17:52:26 +02:00
Jean-François Milants
dd313eb419 Docker container documentation : Fix typos, 1 line per sentence, remove obsolete paragraph, remove redundant 'image' parameter in the command to build the docker image, use ${PWD} instead of $(pwd). 2022-05-26 11:35:25 +02:00
Jean-François Milants
9b216bb16f Docker container documentation : Adapt the --user documentation according to the new behavior. 2022-05-26 11:35:25 +02:00
Jean-François Milants
1ffca52715 Edit workflow to use the new docker image : infinitime/infinitime-build. 2022-05-26 11:35:25 +02:00
Jean-François Milants
c77f923a33 Update links to the docker image with the new account : infinitime/infinitime-build. 2022-05-26 11:35:25 +02:00
Jean-François Milants
83b3a2a469 Small modernization with --platform parameter in docker readme 2022-05-26 11:35:25 +02:00
Jean-François Milants
123c801f17 Add comment about the workaround that was needed in the github workflow. 2022-05-26 11:35:25 +02:00
Jean-François Milants
831f93cd92 The main build workflow for GitHub Actions now uses the infinitime-build docker image to build the firmware. This allows to avoid the duplication of the build logic in Docker and Github workflow format.
The Dockerfile has been slightly adapted (remove the USER instructions). Docker images are now published in DockerHub (jf002/infinitime-build).
2022-05-26 11:35:25 +02:00
Yehoshua Pesach Wallach
34506be06e
comment about common error "glyphs.map" in old nodejs (#1142) 2022-05-18 16:14:58 +02:00
Riku Isokoski
6171c9d45d Only test format when it is wanted 2022-05-16 23:25:47 +02:00
Riku Isokoski
a6fcdec0f8 Don't allow test-format.sh to be run locally 2022-05-16 23:25:47 +02:00
Reinhold Gschweicher
443408312a fonts: gen.py: clearify missing exe message 2022-05-16 11:59:44 +03:00
Reinhold Gschweicher
324927f2b7 update build stop, lv_font_conv not required globally installed 2022-05-16 11:59:44 +03:00
Reinhold Gschweicher
db0f909b46 generalize lv-font creation
In https://github.com/InfiniTimeOrg/InfiniTime/pull/1097 new font
generation capabilites were added. Generalize the font creation to
make it possible to reuse the `displayapp/fonts/CMakeLists.txt` file
for `InfiniSim` and just add the new cmake file to the project and
link against the new `infinitime_fonts` target.

In the following a list of changes.

Allow non-global installed `lv_font_conv` executable installed with

```sh
npm install lv_font_conv@1.5.2
```

In CMake we search for `lv_font_conv` executable. Add the found
executable to the python script `generate.py`, to remove the need for
`lv_font_conv` to be in the path.

Search for `python3` executable, if CMake version 3.12 is available.
Otherwise use `python` as hard coded executable.

Instead of adding the generated fonts to `SOURCE_FILES` variable, create
a static library `infinitime_fonts`. Link this library to the
executables instead.

Use `add_custom_target()` together with `add_custom_command()` to
generate the font.c files once (like the original PR does).
2022-05-16 11:59:44 +03:00
FintasticMan
8485cdb54d Only run lv_sim GH Actions on push to develop and master 2022-05-14 12:21:35 +02:00
Yehoshua Pesach Wallach
4cb07bac53 fontgen: update README.md to remove patch advanced options 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
c9f23c11b3 update docker to 22, and use python3 by default 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
f56788465d docker: bump ubuntu to 20.04 and node to 18 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
78267eec40 fongen: don't pre-build fonts 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
a2057ebc6f fontgen: changes to allow CMake to work from other project 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
b6b322efdd fontgen: remove advanced (format string, process as list) from patching 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
f7e8caa04a fontgen: verify lv_font_conv at cmake 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
4fba1ac5ce fontgen: remove double-asterisk in readme 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
27e598f3fa fontgen: assume plain .patch for single string patch 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
8b2e1c69f2 fotngen: check for lv_font_conv 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
95a970a75d fontgen: install npm, lv_font_conv in Dockerfile 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
2ccf88c03c fontgen: lock version at current 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
331de8ce8e fontgen: remove "feature" feature 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
4e2b0b1f10 fontgen: remove "generating the fonts" section 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
d967ed7d90 fontgen: move lv_font_conv doc 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
ef17f2f981 fontgen: generate font .c files in build dir 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
e39f183efe fontgen: make simulator build fonts too 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
b9fbee1007 Added lv_font_conv to workflow main 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
43443eda74 fontgen: generate fonts at runtime with CMake 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
1c0d9ef383 fonts: update README.md to match new method 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
c006f05c99 fontgen: simplfy json after removed external features key 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
9d3671561f fontgen: minor changes 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
a75912dd97 fontgen: remove .c from requested font if there 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
1d4fd9c27f fontgen: simplify enabled fonts 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
77645b20b2 fontgen: use patch file for jetbrains 0 fix 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
451d755e3d fontgen: removed ability of removing .c ext 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
9535c1e651 fontgen: move features into fonts
Also, removed feature existance cheking (since it now depends on a font,
so may end up being inside (only) a font not being used currently -
which is an allowed usage)
2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
ac0dc5ff47 fontgen: added missing requested font check 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
875b9c4bc5 fontgen: Added ability to choose fonts with .c 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
3005fe8710 Added FontAwesome5-Solid+Brands+Regular.woff to git 2022-05-10 22:20:02 +02:00
Yehoshua Pesach Wallach
4116baf72e Added font auto-generate script 2022-05-10 22:20:02 +02:00
Riku Isokoski
09b852d8f0 Fix and test workflow 2022-05-08 22:27:42 +03:00
Riku Isokoski
c94e0d53bb Ignore deleted files in format test
Otherwise clang-format would fail with an error and exit the script
prematurely.
2022-05-08 13:31:00 +02:00
Riku Isokoski
015f17cd25 Add formatting test workflow 2022-05-08 13:31:00 +02:00
Jean-François Milants
dedb397ae0 Systemtask : replace enum SystemTaskState by an enum class. 2022-05-08 13:29:02 +02:00
Riku Isokoski
ae2b9d30d6 Simplify systemtask states 2022-05-08 13:24:15 +02:00
Riku Isokoski
beddfc346d Disable clip_corner, because it is slow. 2022-05-08 13:21:46 +02:00
Riku Isokoski
2b9418c7f8 Fix dropdown graphical issues.
The scrollbar would go out of bounds if DROPDOWN_PART_LIST had uneven
padding. Also enable clip_corner feature to stop the selected item from
overflowing.
2022-05-08 13:21:46 +02:00
Riku Isokoski
8160748733 Force full screen refresh with a rounder function
When the screen switches, the full screen needs to be refreshed for the
hardware scrolling to work. This was enforced with backgroundLabels, but
is simpler to do with a rounder function.
2022-05-08 13:21:27 +02:00
Riku Isokoski
6dac0a62f4 Remove lcd from DisplayApp 2022-05-08 13:12:37 +02:00
Reinhold Gschweicher
4229386501 List: add missing array include
List.h uses `std::array` as container, but is missing the `<array>`
include. Add it to make the header self contained.

The `memory` include is unused and can be removed.
2022-05-04 22:24:53 +02:00
FintasticMan
09a50dcc15 Mention that InfiniLink is searching for devs 2022-04-30 22:16:00 +02:00
FintasticMan
8b470d33a1 Update link to InfiniLink and mention that it is unmaintained 2022-04-30 22:16:00 +02:00
Riku Isokoski
8061822f0c Fix large blacklevel step. Lower 25% of shades are now accessible.
There is a large step in brightness from level zero to level one.
After experimenting with various ST7789 options, I found that
decreasing VDV to 0x10 (-0.4V) fixes this issue.

The gamma change reduced the average error in brightness, but with the
underlying issue fixed, the gamma change has been reverted.
2022-04-29 11:35:22 +03:00
Riku Isokoski
b31fbb4adb New sharper batteryicon. Remove old unused batteryicons 2022-04-25 17:03:08 +03:00
Riku Isokoski
54df828665 Fix warnings 2022-04-25 15:59:43 +03:00
Riku Isokoski
b7b1af1c4c Replace app_timer with FreeRTOS timers 2022-04-25 15:52:39 +03:00
Reinhold Gschweicher
2e42b90009 Keep the paddle on screen in whole
As suggested in https://github.com/InfiniTimeOrg/InfiniTime/issues/1062
in point 3. The paddle should be kept on screen and not travel out of
the screen boundaries.

Co-authored-by: Riku Isokoski <riksu9000@gmail.com>
2022-04-25 15:51:51 +03:00
Riku Isokoski
b6807ee3ca Make functions const again 2022-04-25 15:51:12 +03:00
Riku Isokoski
36cb7c82f3 Remove now unused position override
It gets overridden later anyway
2022-04-25 15:51:12 +03:00
Riku Isokoski
34858d0a6c Update track progress in MusicService. Fix #127 2022-04-25 15:51:12 +03:00
Riku Isokoski
f82aa71eb0 Improve PTS color matching after gamma change 2022-04-25 15:50:26 +03:00
Riku Isokoski
aa32159c00 Tweak gamma on ST7789 and match UI colors
This change will increase the color accuracy of the PineTime and make UI
development with the simulator easier.
2022-04-25 15:50:26 +03:00
Riku Isokoski
5e83a862db Use centiseconds 2022-04-25 15:49:29 +03:00
Riku Isokoski
28ccf15e13 Stopwatch fixes 2022-04-25 15:49:29 +03:00
Riku Isokoski
3bf6b1cb16 Fix timer layout 2022-04-25 15:48:44 +03:00
Riku Isokoski
d7441d18be Firmware update screen fixes 2022-04-25 15:47:53 +03:00
Reinhold Gschweicher
129dd97b51 SpiNorFlash: use C++ style struct in C++ only header
`SpiNorFlash.h` is a C++ header, but the `Identification` struct is
created in a C style using `typedef struct`. Clang issues a warining
about this discrepancy:

```
In file included from /home/nero/repos/pinetime/InfiniSim/InfiniTime/src/systemtask/SystemTask.cpp:13:
/home/nero/repos/pinetime/InfiniSim/sim/drivers/SpiNorFlash.h:16:21: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
      typedef struct __attribute__((packed)) {
                    ^
                     Identification
/home/nero/repos/pinetime/InfiniSim/sim/drivers/SpiNorFlash.h:17:9: note: type is not C-compatible due to this default member initializer
        uint8_t manufacturer = 0;
        ^~~~~~~~~~~~~~~~~~~~
/home/nero/repos/pinetime/InfiniSim/sim/drivers/SpiNorFlash.h:20:9: note: type is given name 'Identification' for linkage purposes by this typedef declaration
      } Identification;
        ^
1 warning generated.
```

The easy fix is to use a C++ style struct.

Also includes code style fix from Riksu9000

Co-authored-by: Riku Isokoski <riksu9000@gmail.com>
2022-04-24 19:07:46 +03:00
Riku Isokoski
5a13c5215c
Merge pull request #997 from minacode/remove-nm-reference
Remove unused reference
2022-04-19 16:27:47 +03:00
Max Friedrich
f84a0a3897
Merge branch 'develop' into remove-nm-reference 2022-04-19 00:40:29 +02:00
Riku Isokoski
ed91b5a998
Merge pull request #1044 from Riksu9000/replace-lv_set_text
Replace lv_label_set_text where possible
2022-04-18 19:57:40 +03:00
Riku Isokoski
68a7016080 Replace lv_label_set_text where possible 2022-04-18 19:47:42 +03:00
Riku Isokoski
ff73f67d6f
Merge pull request #1009 from NeroBurner/AlarmController_allow_less_precice_system_time
AlarmController: allow loss of precision for alarmTime cast
2022-04-18 19:42:09 +03:00
Riku Isokoski
943a48f189
Merge pull request #1031 from mabuch/rename-PineTimeStyle-to-WatchFacePineTimeStyle
Rename PineTimeStyle to WatchFacePineTimeStyle
2022-04-18 19:40:54 +03:00
mabuch
82a4f9aa68 resolved merge conflict after renaming PineTimeStyle to WatchFacePineTimeStyle 2022-04-18 14:35:31 +02:00
Reinhold Gschweicher
2607c3d799 Let TouchHandler return TouchEvents instead of driver specific enum
Let the TouchHandler::GestureGet() function return a TouchEvent instead
of the touchpanel-driver specific enum.

This helps to move the driver specific helper function `ConvertGesture`
from `DisplayApp` into `TouchHandler`.
2022-04-13 21:33:58 +02:00
Jean-François Milants
b498e1d633 Set version to 1.9.0 2022-04-02 16:31:39 +02:00
Riku Isokoski
78365548f7 Replace airplane mode with a bluetooth toggle 2022-04-02 16:16:47 +02:00
Reinhold Gschweicher
78cab3604d AlarmController: allow loss of precision for alarmTime cast
Allow a loss of precision if the system clock has a lower resolution
than nanoseconds. This is the case for web assembly.
2022-03-29 21:25:22 +02:00
Jean-François Milants
8f436e1d74 Timer App : add background label to ensure that the app will be displayed correctly after a full refresh (HW scrolling transition).
Code cleaning and rename methods.
2022-03-28 21:12:46 +02:00
Jean-François Milants
4761fcb63a DisplayApp : Call the event handler of the current app before loading the new one. This way, we ensure that lv_task_handler() is called before sending event to the newly loaded app. 2022-03-28 21:12:25 +02:00
Jean-François Milants
a8b7fbe48b New changes according to the review : Priority 0 for display, 1 for system, timer and ble host, and 2 for ble LL 2022-03-21 20:53:46 +01:00
Jean-François Milants
cd1f218dd8 Fix priorities of BLE tasks 2022-03-21 20:53:46 +01:00
Jean-François Milants
f1194a5f74 In current configuration, the timer task (the one from FreeRTOS) has the lowest priority (0). Both display and system tasks are also set on priority 0.
In cases where any other task takes too much time to execute (it can happen in Display Task, see https://github.com/InfiniTimeOrg/InfiniTime/issues/825), the timer task does not have the opportunity to run fast enough to detect and debounce presses on the button.

This commit sets the following priorities:
 - [0] : Display  Task
 - [1] : Timer and System tasks
 - [2] : BLE Host
 - [3] : BLE LL

This way, we ensure that button presses will always be detected, even if the rendering of the display takes a huge amount of time.
2022-03-21 20:53:46 +01:00
Jean-François Milants
88197b6632 Music app : when title/track name are truncated, add an ellipsis at the end of the strings. 2022-03-21 20:53:15 +01:00
Jean-François Milants
f973f1c12c Add missing space in if expression. 2022-03-21 20:53:15 +01:00
Jean-François Milants
df61907073 Limit the size of the track and album name received by MusicService. This should work around this bug : https://github.com/InfiniTimeOrg/InfiniTime/issues/825 and prevent heap over-allocation. 2022-03-21 20:53:15 +01:00
JF
1c4a56b05b
Merge pull request #1038 from NeroBurner/analog_local_variables
WatchFaceAnalog: local date/time variables
2022-03-14 21:25:46 +01:00
JF
5f2ce53877
Merge pull request #1033 from NeroBurner/music_override_warning
Music: fix warning about overridden function
2022-03-14 21:21:33 +01:00
JF
fc374562dd
Merge pull request #1034 from NeroBurner/twos_comparison_warning
Twos: fix warning about extra paranthesis
2022-03-14 21:21:11 +01:00
JF
76b7436dfb
Merge pull request #1039 from NeroBurner/datetime_const_and_analog_const_ref
Datetime const and analog const ref
2022-03-14 21:13:56 +01:00
Reinhold Gschweicher
1379b7902f WatchFaceAnalog: local date/time variables
Use local date and time variables. No need to store them in the object.
2022-03-14 21:00:07 +01:00
Reinhold Gschweicher
bebc072e78 WatchFaceAnalog: const ref to dateTimeController
The clock app only reads from the dateTimeController, never modifies it.
2022-03-14 20:59:44 +01:00
Reinhold Gschweicher
db41d9081a DateTimeController: make possible functions const
MonthShortToString and DayOfWeekShortToString don't change the
underlying object. Those are just getters and can be declared `const`.
2022-03-14 20:59:44 +01:00
Reinhold Gschweicher
51716898aa Twos: fix warning about extra paranthesis
We have a comparison like `if (( a == b ))`, which is a parenthesis too
much, which generates the following warning

```
InfiniTime/src/displayapp/screens/Twos.cpp:133:35: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
  if ((grid[newRow][newCol].value == grid[oldRow][oldCol].value)) {
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
InfiniTime/src/displayapp/screens/Twos.cpp:133:35: note: remove extraneous parentheses around the comparison to silence this warning
  if ((grid[newRow][newCol].value == grid[oldRow][oldCol].value)) {
      ~                           ^                            ~
```
2022-03-13 22:05:25 +01:00
Reinhold Gschweicher
0933d60b16 Music: fix warning about overridden function
Clang warns on `OnTouchEvent()` function, which is overridden, but is
missing the `override` keyword

```
In file included from InfiniTime/src/displayapp/screens/Music.cpp:18:
InfiniTime/src/displayapp/screens/Music.h:43:14: warning: 'OnTouchEvent' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
        bool OnTouchEvent(TouchEvents event);
             ^
```
2022-03-13 21:58:53 +01:00
mabuch
ea14c580ca Rename PineTimeStyle to WatchFacePineTimeStyle 2022-03-12 18:16:09 +01:00
JF
21da5869c5
Merge pull request #1026 from NeroBurner/fix_settings_chimes
Fix SettingChimes cbOption array size
2022-03-09 21:59:30 +01:00
JF
dbfcb455fe
Merge pull request #1005 from aveeryy/notifications-as-text
Terminal watchface: replace notifications icon with a text entry
2022-03-09 21:33:46 +01:00
Reinhold Gschweicher
f47b04ffd0 Fix SettingChimes cbOption array size
There are 3 options, but the array-size is set to 2. This leads to
memory corruption in the initialization of the SettingChimes screen when
assigning the third option object pointer.

Found in https://github.com/InfiniTimeOrg/InfiniSim/issues/11
2022-03-08 23:12:34 +01:00
Reinhold Gschweicher
7e0b053b38 CI: lv_sim: initialize libpng submodule for WITH_PNG=ON screenshot
InfiniSim PR https://github.com/InfiniTimeOrg/InfiniSim/pull/10 adds
support for screenshots in png/bmp format using `libpng` submodule.
This new submodule must be added to the lv_sim workflow as well.
2022-03-08 21:57:20 +01:00
Riku Isokoski
61a9a97e26 Update navigation font readme section 2022-03-08 21:34:20 +01:00
Riku Isokoski
04d21dcd93 Add ExtraBold font ttf 2022-03-08 21:34:20 +01:00
Riku Isokoski
13c66dd54b Further updates to font readme. 2022-03-08 21:34:20 +01:00
Riku Isokoski
204ad7ca2a Update font readme, update fonts, add missing files 2022-03-08 21:34:20 +01:00
Reinhold Gschweicher
4c92ed410f CI: add lv_sim workflow and upload 'infinisim' executable
use InfiniSim repo to build simulator in CI
2022-03-08 21:21:41 +01:00
Reinhold Gschweicher
187d99c0f7 SystemMonitor: implement FreeRtosMonitor only if trace facility is set
Split SystemMonitor into h and cpp file and move the logging code of the
`Process` function into the cpp file.

Depending of the `configUSE_TRACE_FACILITY` define from
`src/FreeRTOSConfig.h` create either a "FreeRtosMonitor" or a
"DummyMonitor".

Make the `Process()` function non-const, as the FreeRtosMonitor changes
the member variable `lastTick`.

In `SystemTask.h` we then only need to use `SystemMonitor`, without
knowledge of the `configUSE_TRACE_FACILITY` define.
2022-03-08 20:28:54 +01:00
Reinhold Gschweicher
5fe5cee9ef Add missing nrf_log.h includes shadowed by SystemMonitor.h
Some components were missing a `nrf_log.h` include. This missing
include was accidentally provided by the SystemMonitor.h header, which
was included by Systemtask.h
2022-03-08 20:28:54 +01:00
avery
8844ea60b1
Remove unnecessary line 2022-03-06 14:01:20 +01:00
avery
452dd12eff
Merge branch 'develop' into notifications-as-text 2022-03-06 13:11:26 +01:00
avery
5d974434ef
Replace notif entry with "You have mail." text 2022-03-05 13:01:50 +01:00
Yehoshua Pesach Wallach
30797b37bc removed SetClockFace from watchface Constructors 2022-03-03 21:20:22 +01:00
Reinhold Gschweicher
5613449bfb Settings: more specific read and write mode
For each filesystem interaction be more specific if we want to read from
the file or write to it.

Doing a non-creating read on the loading of the settings file, otherwise
an empty file could be created, and when reading that empty file for the
initial settings I would expect an error (or random data) when reading.
2022-03-03 21:15:57 +01:00
medeyko
dd47ba9782 Update README.md
More imperative tone
2022-03-03 21:13:54 +01:00
medeyko
dd28359571 Update README.md
remove unnecessary )
2022-03-03 21:13:54 +01:00
medeyko
43399b3832 Update README.md 2022-03-03 21:13:54 +01:00
medeyko
1eaf258a63 Update jetbrains_mono_bold_20.c
Fix 0 (zero) symbol. For more details, #988
2022-03-03 21:13:54 +01:00
Riku Isokoski
f1c91e1ce0 terminal watchface: remove icons and other fixes 2022-03-03 21:10:39 +01:00
avery
1bfee61ef9 Replace Airplane mode icon 2022-03-03 21:09:05 +01:00
Reinhold Gschweicher
a29e30c187 Notifications: replace newlines in label-copy because of const char* title
The variable `title` is defined as `const char*`, which means, that
`strchr()` returns a `const char*` as well according to
https://www.cplusplus.com/reference/cstring/strchr/

But in the same line the return value is assigned to a non-const
`char*`, which shouldn't be allowed (error with `-pedantic`).

Because the `lv_label` creates an internal copy of the title sting, just
modify that one instead and replace newline in the copied string.
2022-03-03 21:08:45 +01:00
Reinhold Gschweicher
29f0bce46b Remove unused includes in HearRate and Motion.h
The include `bits/unique_ptr.h` isn't used, so remove it.
2022-03-03 21:07:11 +01:00
Arsen6331
51640c7248 Add ITD as a companion app 2022-03-03 21:04:38 +01:00
avery
8dae4c8299
terminal: Replace notification icon with a text entry 2022-02-22 18:42:54 +01:00
avery
2803dd667f
Use Bluetooth brand color for status text 2022-02-22 18:23:26 +01:00
Jean-François Milants
0e2b27d792 Merge branch 'evergreen22-airplane-mode' into develop 2022-02-20 15:41:06 +01:00
Jean-François Milants
ef44b763d9 Merge branch 'airplane-mode' of https://github.com/evergreen22/InfiniTime into evergreen22-airplane-mode
Apply a few changes that were requested in the PR during the review.

# Conflicts:
#	src/CMakeLists.txt
#	src/displayapp/Apps.h
#	src/displayapp/DisplayApp.cpp
#	src/displayapp/Messages.h
#	src/displayapp/screens/settings/Settings.cpp
2022-02-20 15:40:49 +01:00
Jean-François Milants
40cdb54772 Merge branch 'airplane-mode' of https://github.com/evergreen22/InfiniTime into evergreen22-airplane-mode
# Conflicts:
#	src/CMakeLists.txt
#	src/displayapp/Apps.h
#	src/displayapp/DisplayApp.cpp
#	src/displayapp/Messages.h
#	src/displayapp/screens/settings/Settings.cpp
2022-02-20 15:25:24 +01:00
Jean-François Milants
69e4ab6be1 Manual squash merge of PR #932 (https://github.com/InfiniTimeOrg/InfiniTime/pull/932) from 13werwolf13 (https://github.com/13werwolf13). This PR adds a new Terminal watchface to InfiniTime!
Squashed commit of the following:

commit 23ea840b059c69667c8711265cecaf992791acb6
Author: Jean-François Milants <jf@codingfield.com>
Date:   Sun Feb 20 13:14:27 2022 +0100

    Terminal watch face : fix includes and a few code cleaning.

commit 3c244def25e3ad8e1f56d708fb0864c122059948
Merge: 40790868 138a6552
Author: Jean-François Milants <jf@codingfield.com>
Date:   Sun Feb 20 12:45:54 2022 +0100

    Merge branch 'develop' of https://github.com/13werwolf13/InfiniTime into 13werwolf13-develop

commit 138a65528a
Author: Марков Дмитрий <13werwolf13@mail.ru>
Date:   Wed Feb 2 09:13:00 2022 +0500

    Update src/displayapp/screens/WatchFaceTerminal.h

    Co-authored-by: NeroBurner <pyro4hell@gmail.com>

commit 35156166b2
Author: Марков Дмитрий <13werwolf13@mail.ru>
Date:   Wed Feb 2 09:12:43 2022 +0500

    Update src/displayapp/screens/WatchFaceTerminal.cpp

    Co-authored-by: NeroBurner <pyro4hell@gmail.com>

commit 757ca2dd43
Author: Марков Дмитрий <13werwolf13@mail.ru>
Date:   Wed Feb 2 09:12:30 2022 +0500

    Update src/displayapp/screens/WatchFaceTerminal.cpp

    Co-authored-by: NeroBurner <pyro4hell@gmail.com>

commit 60b6b4e582
Author: Марков Дмитрий <13werwolf13@mail.ru>
Date:   Wed Feb 2 09:12:20 2022 +0500

    Update src/displayapp/screens/WatchFaceTerminal.cpp

    Co-authored-by: NeroBurner <pyro4hell@gmail.com>

commit 6959d8c043
Author: Марков Дмитрий <13werwolf13@mail.ru>
Date:   Wed Feb 2 09:11:46 2022 +0500

    Update src/displayapp/screens/WatchFaceTerminal.cpp

    Co-authored-by: NeroBurner <pyro4hell@gmail.com>

commit 4d850281be
Author: Марков Дмитрий <13werwolf13@mail.ru>
Date:   Wed Feb 2 09:11:17 2022 +0500

    Update src/displayapp/screens/WatchFaceTerminal.cpp

    Co-authored-by: NeroBurner <pyro4hell@gmail.com>

commit af483bee33
Author: Марков Дмитрий <13werwolf13@mail.ru>
Date:   Wed Feb 2 09:10:57 2022 +0500

    Update src/displayapp/screens/WatchFaceTerminal.cpp

    Co-authored-by: NeroBurner <pyro4hell@gmail.com>

commit 6bc6c1a637
Author: Марков Дмитрий <13werwolf13@mail.ru>
Date:   Wed Feb 2 09:10:40 2022 +0500

    Update src/displayapp/screens/WatchFaceTerminal.h

    Co-authored-by: NeroBurner <pyro4hell@gmail.com>

commit 25fdafc6ab
Author: Марков Дмитрий <13werwolf13@mail.ru>
Date:   Wed Feb 2 09:06:10 2022 +0500

    Update src/displayapp/screens/WatchFaceTerminal.cpp

    Co-authored-by: NeroBurner <pyro4hell@gmail.com>

commit 12e1b0f8c0
Author: Марков Дмитрий <13werwolf13@mail.ru>
Date:   Wed Feb 2 09:05:44 2022 +0500

    Update src/displayapp/screens/WatchFaceTerminal.cpp

    Co-authored-by: NeroBurner <pyro4hell@gmail.com>

commit e6c0f32056
Author: Марков Дмитрий <13werwolf13@mail.ru>
Date:   Wed Feb 2 09:05:22 2022 +0500

    Update src/displayapp/screens/WatchFaceTerminal.h

    Co-authored-by: NeroBurner <pyro4hell@gmail.com>

commit 342ce8cd11
Author: Марков Дмитрий <13werwolf13@mail.ru>
Date:   Wed Feb 2 09:05:06 2022 +0500

    Update src/displayapp/screens/WatchFaceTerminal.cpp

    Co-authored-by: NeroBurner <pyro4hell@gmail.com>

commit 265fec5eec
Author: Марков Дмитрий <13werwolf13@mail.ru>
Date:   Wed Feb 2 09:04:06 2022 +0500

    Update src/displayapp/screens/WatchFaceTerminal.cpp

    Co-authored-by: NeroBurner <pyro4hell@gmail.com>

commit b4669be38b
Author: Марков Дмитрий <13werwolf13@mail.ru>
Date:   Wed Feb 2 09:03:29 2022 +0500

    Update src/displayapp/screens/WatchFaceTerminal.cpp

    Co-authored-by: NeroBurner <pyro4hell@gmail.com>

commit 471a843909
Author: Марков Дмитрий <13werwolf13@mail.ru>
Date:   Wed Feb 2 09:03:10 2022 +0500

    Update src/displayapp/screens/WatchFaceTerminal.cpp

    Co-authored-by: NeroBurner <pyro4hell@gmail.com>

commit 6853166cf5
Author: Марков Дмитрий <13werwolf13@mail.ru>
Date:   Wed Feb 2 09:02:51 2022 +0500

    Update src/displayapp/screens/WatchFaceTerminal.cpp

    Co-authored-by: NeroBurner <pyro4hell@gmail.com>

commit bba34f69bf
Author: Дмитрий Марков <13werwolf13@mail.ru>
Date:   Sat Jan 22 12:32:41 2022 +0500

    some fixes

commit 74eea9f580
Author: Дмитрий Марков <13werwolf13@mail.ru>
Date:   Sat Jan 22 12:32:17 2022 +0500

    some fixes

commit 1e4a6763d7
Author: Дмитрий Марков <13werwolf13@mail.ru>
Date:   Fri Jan 21 08:59:44 2022 +0500

    no errors, no warnings, no work..

commit eb8bd4dc4e
Author: Дмитрий Марков <13werwolf13@mail.ru>
Date:   Thu Jan 20 23:50:04 2022 +0500

    add ble state text output

commit fda1c088be
Author: Дмитрий Марков <13werwolf13@mail.ru>
Date:   Thu Jan 20 22:25:35 2022 +0500

    add ble state text output

commit 68d3d9b343
Author: Дмитрий Марков <13werwolf13@mail.ru>
Date:   Thu Jan 20 22:22:20 2022 +0500

    add ble state text output

commit 0ed45a9916
Author: Дмитрий Марков <13werwolf13@mail.ru>
Date:   Tue Jan 18 15:48:15 2022 +0500

    typo fix

commit 477a3a7f27
Author: Марков Дмитрий <13werwolf13@mail.ru>
Date:   Tue Jan 18 10:36:19 2022 +0500

    Update src/displayapp/screens/WatchFaceTerminal.cpp

    Co-authored-by: NeroBurner <pyro4hell@gmail.com>

commit d6849888ea
Author: Марков Дмитрий <13werwolf13@mail.ru>
Date:   Tue Jan 18 10:36:09 2022 +0500

    Update src/displayapp/screens/WatchFaceTerminal.cpp

    Co-authored-by: NeroBurner <pyro4hell@gmail.com>

commit e2f7e31829
Author: Дмитрий Марков <13werwolf13@mail.ru>
Date:   Mon Jan 17 13:34:05 2022 +0500

    typo fix

commit fc246beb01
Author: Дмитрий Марков <13werwolf13@mail.ru>
Date:   Sat Jan 15 15:26:25 2022 +0500

    typo fix

commit ebbb31abf1
Author: Дмитрий Марков <13werwolf13@mail.ru>
Date:   Fri Jan 14 10:08:29 2022 +0500

    typo fix

commit 3afedcaa28
Author: Дмитрий Марков <13werwolf13@mail.ru>
Date:   Thu Jan 13 12:34:39 2022 +0500

    time format

commit 471a4c942f
Author: Дмитрий Марков <13werwolf13@mail.ru>
Date:   Thu Jan 13 12:27:10 2022 +0500

    time format

commit d3fd348de4
Author: Дмитрий Марков <13werwolf13@mail.ru>
Date:   Thu Jan 13 12:26:49 2022 +0500

    time format

commit e540d103e3
Author: Дмитрий Марков <13werwolf13@mail.ru>
Date:   Thu Jan 13 11:28:31 2022 +0500

    add patch

commit 728830178f
Author: Дмитрий Марков <13werwolf13@mail.ru>
Date:   Wed Jan 12 22:08:07 2022 +0500

    add menue item

commit 4c5847669f
Author: Дмитрий Марков <13werwolf13@mail.ru>
Date:   Wed Jan 12 21:42:22 2022 +0500

    typo fix

commit 79273fe24f
Author: Дмитрий Марков <13werwolf13@mail.ru>
Date:   Wed Jan 12 20:48:06 2022 +0500

    typo fix

commit 1808a78ad9
Author: Дмитрий Марков <13werwolf13@mail.ru>
Date:   Wed Jan 12 20:17:15 2022 +0500

    typo fix

commit 6dfa141dca
Author: Дмитрий Марков <markov@promobit.ru>
Date:   Wed Jan 12 20:12:09 2022 +0500

    typo fix

commit 88f0190232
Author: Дмитрий Марков <13werwolf13@mail.ru>
Date:   Wed Jan 12 14:50:54 2022 +0500

    add terminal watchface
2022-02-20 13:20:43 +01:00
Reinhold Gschweicher
407908686a Provide reference to BrightnessController in DisplayApp
For the simulator I need a way to get to the brightnessController object
and handle the set brightness-levels accoringly.

This is done by the constructor expecting a brightnessController object
instead of initializing one itself
2022-02-19 20:46:45 +01:00
Reinhold Gschweicher
f829427c41 Remove unused and not compiling DropDownDemo
For ease of use the simulator uses a globbing expression to get all
screens source files. This one was picked up as well and lead to a
compilation error.
2022-02-19 13:17:45 +01:00
Reinhold Gschweicher
b857fdb9f4 SystemTask: forward declare BatteryController to fix of cyclic dependency
SystemTask.h included BatteryController.h, and BatteryController.h
included SystemTask.h. If unlucky the class SystemTask isn't created yet
when BatteryController wants to use it.

Fix that cyclic dependency by forward declaring the BatteryController
class and including it in the SystemTask.cpp file, where it is needed.
2022-02-19 13:17:00 +01:00
Reinhold Gschweicher
4aaa3a3b49 SettingShakeThreshold: add missing SystemTask.h, relative include
SettingShakeThreshold.h uses SystemTask, but doesn't include the header.
Fixing that for the simulator.

For consistency make the header include a relative to src include.
2022-02-19 13:16:15 +01:00
Reinhold Gschweicher
a2a70f8eda MotorController: no need to make this function a class function
The `StopRinging()` function was used just in `Notifications.h` screen.
That screen already has access to a `motorController` object.
2022-02-19 13:13:36 +01:00
Reinhold Gschweicher
04eca81a95 Notifications: use motorController object instead of class function
We get the motoroController object, so store and use it.
2022-02-19 13:13:36 +01:00
Reinhold Gschweicher
d5b78ecd66 SystemTask: remove unused ble includes
Remove unused includes. The firmware still compiles fine without the
includes.
2022-02-19 13:00:50 +01:00
minacode
a1db9fca13 remove unused reference 2022-02-16 13:34:14 +01:00
Riku Isokoski
4f649a8544 Improved alarm alert handling 2022-02-13 11:36:51 +01:00
Jean-François Milants
e332be0d7c Merge branch 'mruss77-statusBarTimeFormat' into develop 2022-02-13 11:23:20 +01:00
Jean-François Milants
87d882b151 Merge branch 'statusBarTimeFormat' of https://github.com/mruss77/InfiniTime into mruss77-statusBarTimeFormat
# Conflicts:
#	src/components/datetime/DateTimeController.cpp
2022-02-13 11:23:05 +01:00
Zorvalt
d967efa197 Fix biased BLE pass key generation 2022-02-12 18:44:05 +01:00
Reinhold Gschweicher
5938b4b208 SystemTask: fix static cast missing brackets syntax
The static_cast syntax requires brackets around the input variable. The
implementation worked because the used input are defines, which add the
missing brackets like the following:
```cpp
  #define GPIO_PIN_CNF_SENSE_Low (3UL)
```
2022-02-12 18:38:31 +01:00
Riku Isokoski
32fe7b660c Make switch disabled state slightly dimmer 2022-02-12 18:36:11 +01:00
Riku Isokoski
76f63ed76a Fix switch default state 2022-02-12 18:36:11 +01:00
Riku Isokoski
0930a79041 Alarm: Fix missing stop button. Revert alert layout 2022-02-12 18:36:11 +01:00
Riku Isokoski
a9b77ae0d4 Alarm: Change checkable button for a switch 2022-02-12 18:36:11 +01:00
Riku Isokoski
1ac1d5aa5a Add issue links 2022-02-12 18:21:52 +01:00
Eli Weiss
2daa5dcbee Added alarm 12 hour interface 2022-01-31 20:42:48 +01:00
Eli Weiss
ae0724c28c Corrected capitalization 2022-01-31 20:42:18 +01:00
Eli Weiss
02e94acf18 Corrected code formatting
Corrected formatting and removed unnecessary variable time24H
2022-01-31 20:42:18 +01:00
Eli Weiss
d86f81b9ad Changed setHourLabels function to handle 24H too
Changed setHourLabels function to handle 24 hour time labeling, changed to private
2022-01-31 20:42:18 +01:00
Eli Weiss
c8d998e82c Consolidated label changes, optimizations
Consolidated 12 hour label changes to function. Removed use of strings, struct.
2022-01-31 20:42:18 +01:00
Eli Weiss
5be2f57a78 Consolidated time conversion logic
Consolidated 24 hour to 12 hour time conversion logic into function, addressed formatting issues, cleaned up code.
2022-01-31 20:42:18 +01:00
Eli Weiss
1813399959 Removed redundant brackets
Also corrected orphaned bracket
2022-01-31 20:42:18 +01:00
Eli Weiss
2bc338ceed Cleaned up redundant if statements, spacing
Removed redundant if statements in hour button logic. Spacing is now in line with repo guidelines.
2022-01-31 20:42:18 +01:00
Eli Weiss
698288d822 Added 12 hour set time 2022-01-31 20:42:18 +01:00
JF
e73a92c29b
Merge pull request #949 from Riksu9000/fix_alarm
Fix alarm on time change
2022-01-26 22:03:14 +01:00
JF
f38c559089
Merge pull request #954 from NeroBurner/music_initialize_lastLength
Music: initialize totalLength to have non-random data from the start
2022-01-26 22:01:07 +01:00
JF
b12603448c
Merge pull request #959 from NeroBurner/stopwatch_include_cleanup
StopWatch: cleanup unused includes and use relative to src includes
2022-01-26 22:00:33 +01:00
JF
71c895dc71
Merge pull request #531 from hatmajster/heart-rate-gain-setting
Heart rate sensor - HRS gain changed to x8
2022-01-26 21:44:23 +01:00
JF
9e9010c725
Merge pull request #876 from yehoshuapw/hrs-driver-changes
Hrs driver changes
2022-01-26 21:39:58 +01:00
JF
458f5b8eb8
Merge pull request #903 from Riksu9000/improved_notif_timeout
Improved notification timeout
2022-01-26 21:38:07 +01:00
JF
bbb823b170
Merge pull request #939 from NeroBurner/buttonHandler_relative_include
ButtonHandler: includes relative to src dir
2022-01-26 21:35:03 +01:00
JF
a1880ca3b8
Merge pull request #940 from NeroBurner/systemTask_queue_include
SystemTask: add missing queue.h include for QueueHandle_t
2022-01-26 21:34:25 +01:00
JF
a354650a9c
Merge pull request #944 from NeroBurner/no_generated_files_in_source_dir
Create Version.h in binary dir instead of src dir
2022-01-26 21:33:57 +01:00
JF
cc01d6ca17
Merge pull request #948 from Riksu9000/watchfacecleanup
PTS and digital watchface code cleanups
2022-01-26 21:25:59 +01:00
Reinhold Gschweicher
67f546fa33 StopWatch: cleanup unused includes and use relative to src includes 2022-01-26 08:31:14 +01:00
hatmajster
b4e956227e Hrs3300: changed default gain to x8 2022-01-25 17:44:11 +01:00
Reinhold Gschweicher
314c02194a Music: initialize totalLength to have non-random data from the start
In the first `Music::Refresh` call the lastLength and totalLength are
not initialized. The `lastLength` value is read first from the
musicService. Naturally in the first itereation that is changed and
`UpdateLength()` is called. There the variable `totalLength` is used as
well, but that variable isn't initialed to a sensible value yet. This
leads to sometimes the `Music.h` screen segfaulting (depending on the
random uninitialized data in the `lastLength` variable)
2022-01-23 23:39:38 +01:00
Riku Isokoski
470db4ab99 Fix alarm on time change 2022-01-22 12:47:23 +02:00
Riku Isokoski
6bf6bb7e2a PTS and digital watchface code cleanups 2022-01-20 16:04:26 +02:00
Reinhold Gschweicher
688dc2fed7 Create Version.h in binary dir instead of src dir
Don't use source directory for generated files. Use the binary (build)
directory instead.
2022-01-17 21:26:40 +01:00
Reinhold Gschweicher
bbc5af078d SystemTask: add missing queue.h include for QueueHandle_t 2022-01-16 22:47:16 +01:00
Reinhold Gschweicher
48e9458301 ButtonHandler: includes relative to src dir 2022-01-16 20:59:49 +01:00
Jean-François Milants
26ae828e39 Set version to 1.8.0 2022-01-07 17:27:43 +01:00
JF
f711f0f794
Merge pull request #916 from Riksu9000/shake_menuoption
Update shakewake menu option
2022-01-07 16:53:21 +01:00
Riku Isokoski
97cbe34963 Update shakewake menu option 2022-01-06 15:44:39 +02:00
JF
e8fc46ba20
Merge pull request #912 from SteveAmor/chimesradio
Updates radio button style for Chimes Option
2022-01-05 10:42:25 +01:00
SteveAmor
b1b9937ff7 Updates radio button style 2022-01-04 21:28:37 +00:00
Jean-François Milants
dc8be2244c Merge branch 'geekbozu-ShakeWake' into develop 2022-01-04 21:48:20 +01:00
Jean-François Milants
bef3e708f6 Merge branch 'ShakeWake' of https://github.com/geekbozu/InfiniTime into geekbozu-ShakeWake
# Conflicts:
#	src/CMakeLists.txt
#	src/displayapp/Apps.h
#	src/displayapp/DisplayApp.cpp
#	src/displayapp/screens/settings/Settings.cpp
2022-01-04 21:48:08 +01:00
JF
b8b54f47a2
Merge pull request #813 from SteveAmor/chimes
Chimes option
2022-01-04 21:44:36 +01:00
SteveAmor
15c3807a76 Adds enum class for chimes option 2022-01-04 19:32:29 +00:00
Tim Keller
e82469bffa Fix setting removing it self from wake settings when opening calibration window twice. 2022-01-04 02:06:16 +00:00
Tim Keller
f86c71b2bb Made calibration window enable Accel wakeups for setting and calibration even when wake mode is inactive. 2022-01-04 02:02:01 +00:00
Tim Keller
92b1e83e3e Remove "fancy" settings display and always show ShakeWakeThresholdSetting 2022-01-04 02:01:31 +00:00
Tim Keller
98ac447bdb Fixed button color changing 2022-01-04 02:00:03 +00:00
Tim Keller
b9c40100f6 Added visual aide for shake strength
Added delay to starting calibration
2022-01-04 02:00:03 +00:00
Tim Keller
8f38bd911b Raise calibration timeout to 7.5 seconds
Added button toggle state for cleaner user interaction
2022-01-04 02:00:03 +00:00
Tim Keller
5c13200238 Fix crash upon leaving app.
Code formatting
2022-01-04 02:00:03 +00:00
Tim Keller
d6b22645e3 Make arc moveable, and clear previous setting on calibrate 2022-01-04 02:00:02 +00:00
Tim Keller
f780ac999a Actually save the threshold
Prevent a few crashes due to an LV task being active when it shouldnt be.
2022-01-04 02:00:02 +00:00
Tim Keller
d2510d7926 Better Sensitivity UI, Calibration button added 2022-01-04 02:00:02 +00:00
Tim Keller
6d74820698 Add averaging to wake threshold. Makes it take more then just a "flick" to turn on 2022-01-04 01:59:01 +00:00
Tim Keller
3ebf002f9d Add start of settings app for senstivity.
really just debugging. I want to make it more configurable then high med low.
Position of setting needs a new location...dynamicly adding it currently at the end. Which honestly im fine with.
2022-01-04 01:59:01 +00:00
Tim Keller
ad42cdf120 Cleanup 2022-01-04 01:57:18 +00:00
Tim Keller
d270275bd2 Added Shake to wake 2022-01-04 01:57:18 +00:00
SteveAmor
7a0f72ed8b resolve conflicts 2022-01-02 22:33:23 +00:00
SteveAmor
cc259b6a4a resolves conflicts 2022-01-02 22:27:43 +00:00
SteveAmor
94561b2331 resolves conflicts 2022-01-02 21:49:18 +00:00
Riku Isokoski
5e6868d9eb Improved notification timeout 2022-01-01 16:22:35 +02:00
James A. Jerkins
319030d9e1 Add airplane mode feature
Implements 'Airplane mode' feature to disable and enable bluetooth/ble
Adds airplaneMode as a non-persisted setting
Adds a setting menu for switching airplane mode on and off
Displays an airplane symbol on the Digital watch face and the
    PineTimeStyle watch face when airplane mode is enabled
Always enables bluetooth/ble on boot (disable airplane mode)
Alphabetizes the settings menu options
Style cleanups

Closes #632
2021-12-23 20:30:14 -06:00
Yehoshua Pesach Wallach
464b689a03
changed ReadHrs and ReadAls to uint32, and did static_cast instead of hidden cast when using it 2021-12-13 12:47:52 +02:00
Yehoshua Pesach Wallach
4cc95091ab
order ReadHrs, ReadAls bitwise according to bit ordering 2021-12-13 12:39:34 +02:00
Mark Russell
947ece0bc9 Status bar displays time in 12 or 24 hour format based on settings 2021-11-10 20:11:09 -05:00
SteveAmor
c5282f9454 update settings version 2021-11-07 14:15:39 +00:00
SteveAmor
822b6ae6a0 format changes 2021-11-07 13:12:01 +00:00
SteveAmor
37de10f47d applied clang-format 2021-11-07 12:10:23 +00:00
SteveAmor
5932391c8b Chimes option 2021-11-07 10:50:33 +00:00
271 changed files with 3829 additions and 10478 deletions

View File

@ -8,9 +8,9 @@ AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
@ -83,6 +83,8 @@ IndentGotoLabels: true
IndentPPDirectives: BeforeHash
IndentWidth: 2
IndentWrappedFunctionNames: false
# Requires Clang >= 15, could also cause incorrect code formatting:
# InsertBraces: true
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true

8
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: PineTime community chat (Matrix)
url: https://app.element.io/#/room/#pinetime:matrix.org
about: Please ask questions about PineTime here.
- name: PineTime developers chat (Matrix)
url: https://app.element.io/#/room/#pinetime-dev:matrix.org
about: Please ask questions about PineTime development here.

37
.github/workflows/format.yml vendored Normal file
View File

@ -0,0 +1,37 @@
name: Code formatting
on:
pull_request:
branches: [ master, develop ]
paths:
- '**.cpp'
- '**.h'
- '!src/libs/**'
- '!src/FreeRTOS/**'
jobs:
test-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1000
- name: Configure git
run: |
git fetch origin "$GITHUB_BASE_REF":"$GITHUB_BASE_REF" --depth=1000
- name: Install clang-format
run: |
sudo apt-get update
sudo apt-get -y install clang-format-12
- name: Check formatting
run: tests/test-format.sh
- name: Upload patches
uses: actions/upload-artifact@v3
if: failure()
with:
name: Patches
path: ./*.patch

66
.github/workflows/lv_sim.yml vendored Normal file
View File

@ -0,0 +1,66 @@
# GitHub Actions Workflow to build Simulator for PineTime Smart Watch LVGL Interface
name: Build PineTime LVGL Simulator
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
jobs:
build:
runs-on: ubuntu-latest
steps:
#########################################################################################
# Download and Install Dependencies
- name: Install cmake
uses: lukka/get-cmake@v3.18.3
- name: Install SDL2 development package
run: |
sudo apt-get update
sudo apt-get -y install libsdl2-dev
- name: Install lv_font_conv
run:
npm i -g lv_font_conv@1.5.2
#########################################################################################
# Checkout
- name: Checkout source files
uses: actions/checkout@v2
with:
submodules: recursive
#########################################################################################
# get InfiniSim repo
- name: Get InfiniSim repo
run: |
git clone https://github.com/InfiniTimeOrg/InfiniSim.git --depth 1 --branch main
git -C InfiniSim submodule update --init lv_drivers libpng
#########################################################################################
# CMake
- name: CMake
run: |
cmake -G Ninja -S InfiniSim -B build_lv_sim -DInfiniTime_DIR="${PWD}"
#########################################################################################
# Build and Upload simulator
- name: Build simulator executable
run: |
cmake --build build_lv_sim
- name: Upload simulator executable
uses: actions/upload-artifact@v3
with:
name: infinisim-${{ github.head_ref }}
path: build_lv_sim/infinisim

View File

@ -3,168 +3,45 @@
# Based on https://github.com/JF002/InfiniTime/blob/master/doc/buildAndProgram.md
# and https://github.com/JF002/InfiniTime/blob/master/bootloader/README.md
# Name of this Workflow
name: Build PineTime Firmware
# When to run this Workflow...
on:
# Run this Workflow when files are updated (Pushed) in the "master" and "develop" Branch
push:
branches: [ master, develop ]
# Also run this Workflow when a Pull Request is created or updated in the "master" and "develop" Branch
pull_request:
branches: [ master, develop ]
# Steps to run for the Workflow
jobs:
build:
# Run these steps on Ubuntu
runs-on: ubuntu-latest
container:
image: infinitime/infinitime-build
steps:
#########################################################################################
# Download and Cache Dependencies
- name: Install cmake
uses: lukka/get-cmake@v3.18.3
- name: Check cache for Embedded Arm Toolchain arm-none-eabi-gcc
id: cache-toolchain
uses: actions/cache@v2
env:
cache-name: cache-toolchain-9-2020-q2
with:
path: ${{ runner.temp }}/arm-none-eabi
key: ${{ runner.os }}-build-${{ env.cache-name }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}
- name: Install Embedded Arm Toolchain arm-none-eabi-gcc
if: steps.cache-toolchain.outputs.cache-hit != 'true' # Install toolchain if not found in cache
uses: fiam/arm-none-eabi-gcc@v1.0.4
with:
# GNU Embedded Toolchain for Arm release name, in the V-YYYY-qZ format (e.g. "9-2019-q4")
release: 9-2020-q2
# Directory to unpack GCC to. Defaults to a temporary directory.
directory: ${{ runner.temp }}/arm-none-eabi
- name: Check cache for nRF5 SDK
id: cache-nrf5sdk
uses: actions/cache@v2
env:
cache-name: cache-nrf5sdk
with:
path: ${{ runner.temp }}/nrf5_sdk
key: ${{ runner.os }}-build-${{ env.cache-name }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}
- name: Install nRF5 SDK
if: steps.cache-nrf5sdk.outputs.cache-hit != 'true' # Install SDK if not found in cache
run: |
cd ${{ runner.temp }}
curl https://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v15.x.x/nRF5_SDK_15.3.0_59ac345.zip -o nrf5_sdk.zip
unzip nrf5_sdk.zip
mv nRF5_SDK_15.3.0_59ac345 nrf5_sdk
- name: Check cache for MCUBoot
id: cache-mcuboot
uses: actions/cache@v2
env:
cache-name: cache-mcuboot
with:
path: ${{ runner.temp }}/mcuboot
key: ${{ runner.os }}-build-${{ env.cache-name }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}
- name: Install MCUBoot
if: steps.cache-mcuboot.outputs.cache-hit != 'true' # Install MCUBoot if not found in cache
run: |
cd ${{ runner.temp }}
git clone --branch v1.7.2 https://github.com/mcu-tools/mcuboot
- name: Install imgtool dependencies
run: |
pip3 install --user -r ${{ runner.temp }}/mcuboot/scripts/requirements.txt
- name: Install adafruit-nrfutil
run: |
pip3 install --user wheel
pip3 install --user setuptools
pip3 install --user adafruit-nrfutil
#########################################################################################
# Checkout
# This workaround fixes the error "unsafe repository (REPO is owned by someone else)".
# See https://github.com/actions/checkout/issues/760 and https://github.com/actions/checkout/issues/766
# The fix in "actions/checkout@v2" was not sufficient as the build process also uses git (to get the current
# commit hash, for example).
- name: Workaround permission issues
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Checkout source files
uses: actions/checkout@v2
with:
submodules: recursive
- name: Show files
run: set ; pwd ; ls -l
#########################################################################################
# CMake
- name: CMake
run: |
mkdir -p build
cd build
cmake -G Ninja -DARM_NONE_EABI_TOOLCHAIN_PATH=${{ runner.temp }}/arm-none-eabi -DNRF5_SDK_PATH=${{ runner.temp }}/nrf5_sdk -DUSE_OPENOCD=1 -DBUILD_DFU=1 ../
#########################################################################################
# Make and Upload DFU Package
# pinetime-mcuboot-app.img must be flashed at address 0x8000 in the internal flash memory with OpenOCD:
# program image.bin 0x8000
# For Debugging Builds: Remove "make" option "-j" for clearer output. Add "--trace" to see details.
# For Faster Builds: Add "make" option "-j"
- name: Make pinetime-mcuboot-app
run: |
cmake --build build --target pinetime-mcuboot-app
- name: Unzip DFU package
run: |
- name: Build
shell: bash
env:
SOURCES_DIR: .
run: /opt/build.sh all
# Unzip the package because Upload Artifact will zip up the files
unzip build/src/pinetime-mcuboot-app-dfu*.zip -d build/src/pinetime-mcuboot-app-dfu
- name: Upload DFU package
uses: actions/upload-artifact@v2
- name: Unzip DFU package
run: unzip ./build/output/pinetime-mcuboot-app-dfu-*.zip -d ./build/output/pinetime-mcuboot-app-dfu
- name: Upload DFU artifacts
uses: actions/upload-artifact@v3
with:
name: pinetime-mcuboot-app-dfu
path: build/src/pinetime-mcuboot-app-dfu/*
#########################################################################################
# Make and Upload Standalone Firmware
- name: Make pinetime-app
run: |
cmake --build build --target pinetime-app
- name: Upload standalone firmware
uses: actions/upload-artifact@v2
name: InfiniTime DFU ${{ github.head_ref }}
path: ./build/output/pinetime-mcuboot-app-dfu/*
- name: Upload MCUBoot image artifacts
uses: actions/upload-artifact@v3
with:
name: pinetime-app.out
path: build/src/pinetime-app*.out
#########################################################################################
# Make but don't Upload the Recovery Firmware to be sure it builds correctly
- name: Make pinetime-recovery
run: |
cmake --build build --target pinetime-recovery
#########################################################################################
# Finish
- name: Find output
run: |
find . -name "pinetime-app.*" -ls
find . -name "pinetime-mcuboot-app.*" -ls
# Embedded Arm Toolchain and nRF5 SDK will only be cached if the build succeeds.
# So make sure that the first build always succeeds, e.g. comment out the "Make" step.
name: InfiniTime MCUBoot image ${{ github.head_ref }}
path: ./build/output/pinetime-mcuboot-app-image-*.bin

2
.vscode/launch.json vendored
View File

@ -52,7 +52,7 @@
"servertype": "openocd",
"runToMain": true,
// Only use armToolchainPath if your arm-none-eabi-gdb is not in your path (some GCC packages does not contain arm-none-eabi-gdb)
"armToolchainPath": "${workspaceRoot}/../gcc-arm-none-eabi-9-2020-q2-update/bin",
"armToolchainPath": "${workspaceRoot}/../gcc-arm-11.2-2022.02-x86_64-arm-none-eabi/bin",
"svdFile": "${workspaceRoot}/nrf52.svd",
"configFiles": [
"interface/stlink.cfg",

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.10)
project(pinetime VERSION 1.7.1 LANGUAGES C CXX ASM)
project(pinetime VERSION 1.9.0 LANGUAGES C CXX ASM)
set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 14)
@ -66,7 +66,7 @@ execute_process(COMMAND git rev-parse --short HEAD
OUTPUT_VARIABLE PROJECT_GIT_COMMIT_HASH
RESULT_VARIABLE PROJECT_GIT_COMMIT_HASH_SUCCESS)
string(STRIP ${PROJECT_GIT_COMMIT_HASH} PROJECT_GIT_COMMIT_HASH)
string(STRIP "${PROJECT_GIT_COMMIT_HASH}" PROJECT_GIT_COMMIT_HASH)
message("PROJECT_GIT_COMMIT_HASH_SUCCESS? " ${PROJECT_GIT_COMMIT_HASH_SUCCESS})
@ -100,7 +100,7 @@ else()
endif()
set(VERSION_EDIT_WARNING "// Do not edit this file, it is automatically generated by CMAKE!")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/Version.h.in ${CMAKE_CURRENT_SOURCE_DIR}/src/Version.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/Version.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/Version.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/docker/post_build.sh.in ${CMAKE_CURRENT_BINARY_DIR}/post_build.sh)

View File

@ -15,7 +15,8 @@ Fast open-source firmware for the [PineTime smartwatch](https://www.pine64.org/p
- [Gadgetbridge](https://gadgetbridge.org/) (Android)
- [AmazFish](https://openrepos.net/content/piggz/amazfish/) (SailfishOS)
- [Siglo](https://github.com/alexr4535/siglo) (Linux)
- [InfiniLink](https://github.com/xan-m/InfiniLink) **[Experimental]** (iOS)
- [InfiniLink](https://github.com/InfiniTimeOrg/InfiniLink) **[Experimental]** **[Unmaintained, looking for developers/maintainers]** (iOS)
- [ITD](https://gitea.arsenm.dev/Arsen6331/itd) (Linux)
## Development
@ -25,6 +26,10 @@ Fast open-source firmware for the [PineTime smartwatch](https://www.pine64.org/p
- [Creating a stopwatch in Pinetime(article)](https://pankajraghav.com/2021/04/03/PINETIME-STOPCLOCK.html)
- [Tips on designing an app UI](doc/ui_guidelines.md)
### InfiniSim Simulator
Use the [InfiniSim Simulator](https://github.com/InfiniTimeOrg/InfiniSim) to experience the `InfiniTime` user interface directly on your PC, to shorten the time until you get your hands on a real [PineTime smartwatch](https://www.pine64.org/pinetime/).
Or use it to develop new Watchfaces, new Screens, or quickly iterate on the user interface.
### Contributing
- [How to contribute?](/doc/contribute.md)
- [Coding conventions](/doc/coding-convention.md)

View File

@ -9,14 +9,14 @@ Integrating a BLE stack for the OTA functionality would have used to much memory
When it is run, this bootloader looks in the SPI flash memory if a new firmware is available. It there is one, it *swaps* the current firmware with the new one (the new one is copied in the main flash memory, and the current one is copied in the SPI flash memory) and run the new one. If the new one fails to run properly, the bootloader is able to revert to the old one and mark the new one as not working.
As this bootloader does not provide any OTA capability, it is not able to actually download a new version of the application. Providing OTA functionality is thus the responsability of the application firmware.
As this bootloader does not provide any OTA capability, it is not able to actually download a new version of the application. Providing OTA functionality is thus the responsibility of the application firmware.
# About MCUBoot
MCUBoot is run at boot time. In normal operation, it just jumps to the reset handler of the application firmware to run it. Once the application firmware is running, MCUBoot does not run at all.
![MCUBoot boot sequence diagram](../doc/bootloader/boot.png "MCUBoot boot sequence diagram")
But MCUBoot does much more than that : it can upgrade the firmware that is currently running by a new one, and it is also able to revert to the previous version of the firmware in case the new one does not run propertly.
But MCUBoot does much more than that : it can upgrade the firmware that is currently running by a new one, and it is also able to revert to the previous version of the firmware in case the new one does not run properly.
To do this, it uses 2 memory 'slots' :
- **The primary slot** : it contains the current firmware, the one that will be executed by MCUBoot
@ -40,7 +40,7 @@ This chapter describes degraded cases that are handled by our bootloader and tho
Case | Current bootloader | Solution
-----|--------------------|----------------------------------------------
Data got corrupted during file transfer | [OK] Application firmware does a CRC check before applying the update, and does not proceed if it fails. | N/A
New firmware does not run at all (bad file) (1) | [NOK] MCU executes unknown instructions and will most likely end up in an infinite loop or freeze in an error handler. The bootloader does not run, it can do nothing, the MCU is stucked until next reset | [OK] The bootloader starts the watchdog just before running the new firmware. This way, the watchdog will reset the MCU after ~7s because the firmware does not refresh it. Bootloader reverts to the previous version of the firmware during the reset.
New firmware does not run at all (bad file) (1) | [NOK] MCU executes unknown instructions and will most likely end up in an infinite loop or freeze in an error handler. The bootloader does not run, it can do nothing, the MCU is stuck until next reset | [OK] The bootloader starts the watchdog just before running the new firmware. This way, the watchdog will reset the MCU after ~7s because the firmware does not refresh it. Bootloader reverts to the previous version of the firmware during the reset.
New firmware runs, does not set the valid bit and does not refresh the watchdog | [NOK] The new firmware runs until the next reset. The bootloader will be able to revert to the previous firmware only during the next reset. If the new firmware does not run properly and does not reset, the bootloader can do nothing until the next reset | [OK] The bootloader starts the watchdog just before running the new firmware. This way, the watchdog will reset the MCU after ~7s because the firmware does not refresh it. Bootloader reverts to the previous version of the firmware during the reset.
New firmware does not run properly, does not set the valid bit but refreshes the watchdog | [NOK] The bootloader will be able to revert to the previous firmware only during the next reset. If the new firmware does not run properly and does not reset, the bootloader can do nothing until the next reset | [~] Wait for the battery to drain. The CPU will reset the next time the device is charged and will be able to rollback to the previous version.
New firmware does not run properly but sets the valid bit and refreshes the watchdog | [NOK] The bootloader won't revert to the previous version because the valid flag is set | [~] Wait for the battery to drain. The CPU will reset the next time the device is charged. Then, the bootloader must provide a way for the user to force the rollback to the previous version

1
bootloader/ota-dfu-python/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
__pycache__

View File

@ -236,7 +236,7 @@ class BleDfuControllerSecure(NrfBleDfuController):
self._dfu_send_command(Procedures.EXECUTE)
self._wait_and_parse_notify()
print("Init packet successfully transfered")
print("Init packet successfully transferred")
# --------------------------------------------------------------------------
# Send the Firmware image to peripheral device.
@ -319,5 +319,5 @@ class BleDfuControllerSecure(NrfBleDfuController):
self._dfu_send_command(Procedures.EXECUTE)
self._wait_and_parse_notify()
# If everything executed correctly, return amount of bytes transfered
# If everything executed correctly, return amount of bytes transferred
return obj_max_size

View File

@ -106,7 +106,6 @@ macro(nRF5x_setup)
${NRF5_SDK_PATH}/external/freertos/source/stream_buffer.c
${NRF5_SDK_PATH}/external/freertos/source/tasks.c
${NRF5_SDK_PATH}/external/freertos/source/timers.c
${NRF5_SDK_PATH}/components/libraries/timer/app_timer_freertos.c
)
# freertos include
@ -335,7 +334,6 @@ endmacro(nRF5x_addAppFIFO)
# adds app-level Timer libraries
macro(nRF5x_addAppTimer)
list(APPEND SDK_SOURCE_FILES
"${NRF5_SDK_PATH}/components/libraries/timer/app_timer.c"
)
endmacro(nRF5x_addAppTimer)

View File

@ -7,7 +7,7 @@ Cmake script for projects targeting Nordic Semiconductor nRF5x series devices us
The script makes use of the following tools:
- nRF5x SDK by Nordic Semiconductor - SoC specific drivers and libraries (also includes a lot of examples)
- JLink by Segger - interface software for the JLink familiy of programmers
- JLink by Segger - interface software for the JLink family of programmers
- nrfjprog by Nordic Semiconductor - Wrapper utility around JLink
- arm-non-eabi-gcc by ARM and the GCC Team - compiler toolchain for embedded (= bare metal) ARM chips
@ -15,11 +15,11 @@ The script makes use of the following tools:
1. Download this repo (or add as submodule) to the directory `cmake-nRF5x` in your project
1. Search the SDK `example` directory for a `sdk_config.h`, `main.c` and a linker script (normally named `<project_name>_gcc_<chip familly>.ld`) that fits your chip and project needs.
1. Search the SDK `example` directory for a `sdk_config.h`, `main.c` and a linker script (normally named `<project_name>_gcc_<chip family>.ld`) that fits your chip and project needs.
1. Copy the `sdk_config.h` and the project `main.c` into a new directory `src`. Modify them as required for your project.
1. Copy the linker script into the root of your project. Rename it to just `gcc_<chip familly>.ld` For example:
1. Copy the linker script into the root of your project. Rename it to just `gcc_<chip family>.ld` For example:
```
gcc_nrf51.ld

View File

@ -51,16 +51,16 @@ Puncover is really easy to install:
- `python -m virtualenv venv`
- `source venv/bin/activate`
- Install : `pip install .`
- Run : `puncover --gcc_tools_base=/path/to/gcc-arm-none-eabi-9-2020-q2-update/bin/arm-none-eabi- --elf_file /path/to/build/directory/src/pinetime-app-1.1.0.out --src_root /path/to/sources --build_dir /path/to/build/directory`
- Run : `puncover --gcc_tools_base=/path/to/gcc-arm-11.2-2022.02-x86_64-arm-none-eabi/bin/arm-none-eabi- --elf_file /path/to/build/directory/src/pinetime-app-1.1.0.out --src_root /path/to/sources --build_dir /path/to/build/directory`
- Replace
* `/path/to/gcc-arm-none-eabi-9-2020-q2-update/bin` with the path to your gcc-arm-none-eabi toolchain
* `/path/to/gcc-arm-11.2-2022.02-x86_64-arm-none-eabi/bin` with the path to your gcc-arm-none-eabi toolchain
* `/path/to/build/directory/src/pinetime-app-1.1.0.out` with the path to the binary generated by GCC (.out file)
* `/path/to/sources` with the path to the root folder of the sources (checkout directory)
* `/path/to/build/directory` with the path to the build directory
- Launch a browser at http://localhost:5000/
### Analysis
Using the MAP file and tools, we can easily see what symbols are using most of the flash memory. In this case, unsuprisingly, fonts and graphics are the largest use of flash memory.
Using the MAP file and tools, we can easily see what symbols are using most of the flash memory. In this case, unsurprisingly, fonts and graphics are the largest use of flash memory.
![Puncover](./memoryAnalysis/puncover-all-symbols.png)
@ -150,7 +150,7 @@ You can then display the file using objdump:
hexdump ram.bin -v | less
```
The stack is positionned at the end of the RAM -> 0xFFFF. Its size is 8192 bytes, so the end of the stack is at 0xE000.
The stack is positioned at the end of the RAM -> 0xFFFF. Its size is 8192 bytes, so the end of the stack is at 0xE000.
On the following dump, the maximum stack usage is 520 bytes (0xFFFF - 0xFDF8):
```

View File

@ -13,7 +13,7 @@ The service UUID is 00010000-78fc-48fe-8e23-433b3a1942d0
## Characteristics
## Flags (UUID 00010001-78fc-48fe-8e23-433b3a1942d0)
All included icons are from pure-maps, which provides the actual routing from the client. The icon names ultimately come from the mapbox project "direction-icons", See https://github.com/rinigus/pure-maps/tree/master/qml/icons/navigation See the end of this document for the full lsit of supported icon names.
All included icons are from pure-maps, which provides the actual routing from the client. The icon names ultimately come from the mapbox project "direction-icons", See https://github.com/rinigus/pure-maps/tree/master/qml/icons/navigation See the end of this document for the full list of supported icon names.
## Narrative (UUID 00010002-78fc-48fe-8e23-433b3a1942d0)
This is a client supplied string describing the upcoming instruction such as "At the roundabout take the first exit".

View File

@ -1,5 +1,5 @@
# Build a stub for PineTime using NRF52-DK
[NRF52-DK](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52-DK) is the official developpment kit for the NRF52832 SoC from Nordic Semiconductor used in the PineTime.
[NRF52-DK](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52-DK) is the official development kit for the NRF52832 SoC from Nordic Semiconductor used in the PineTime.
This development kit can be very useful for PineTime development:
* You can use its embedded JLink SWD programmer/debugger to program and debug your code on the PineTime

View File

@ -1,7 +1,7 @@
# How to flash InfiniTime using the SWD interface
Download the files **bootloader.bin**, **image-x.y.z.bin** and **pinetime-graphics-x.y.z.bin** from the release page:
![Image file](imageFile.png)
![Image file](gettingStarted/imageFile.png)
The bootloader reads a boot logo from the external SPI flash memory. The first step consists of flashing a tool in the MCU that will flash the boot logo into this SPI flash memory. This first step is optional but recommended (the bootloader will display garbage on screen for a few second if you don't do it).
Using your SWD tool, flash **pinetime-graphics-x.y.z.bin** at offset **0x0000**. Reset the MCU and wait for a few seconds until the logo is completely drawn on the display.

View File

@ -146,14 +146,14 @@ The new alert characteristic allows sending new notifications to InfiniTime. It
For example, here is what a normal notification looks like in Golang (language of `itd`):
```go
// \x00 is the category for simple alert, and there is one new notifcation, hence \x01.
// \x00 is the category for simple alert, and there is one new notification, hence \x01.
"\x00\x01\x00Test Title\x00Test Body"
```
A call notification looks like so:
```go
// \x03 is the category for calls, and there is one new call notifcation, hence \x01.
// \x03 is the category for calls, and there is one new call notification, hence \x01.
"\x03\x01\x00Mary"
```

View File

@ -3,7 +3,7 @@ Pinetime --> CompanionApp: Start advertising
group BLE Connection
CompanionApp -> Pinetime: Connection request
CompanionApp <-> Pinetime: Connection parameters negociation, security procedure,...
CompanionApp <-> Pinetime: Connection parameters negotiation, security procedure,...
end
group Service Discovery

View File

@ -5,7 +5,7 @@ The project is based on 2 main branches:
- **master** : this branch is always ready to be deployed. It means that at any time, we should be able to build the branch and release a new version of the application.
- **develop** : this branch contains the latest development that will be integrated in the next release once it's considered as stable.
New features should be implemented in **feature branches** created from **develop**. When the feature is ready, a pull-request is created and it'll be merge into **develop** when it is succesfully reviewed and accepted.
New features should be implemented in **feature branches** created from **develop**. When the feature is ready, a pull-request is created and it'll be merge into **develop** when it is successfully reviewed and accepted.
To release a new version of the application, when develop is considered stable, a **release** branch is created from **develop**. This can be considered as a *release candidate* branch. When everything is OK, this release branch is merged into **master** and the release is generated (a tag is applied to git, the release note is finalized, binaries are built,...) from **master**.

View File

@ -1,7 +1,7 @@
# Build
## Dependencies
To build this project, you'll need:
- A cross-compiler : [ARM-GCC (9-2020-q2-update)](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads/9-2020-q2-update)
- A cross-compiler : [ARM-GCC (arm-none-eabi 11.2-2022.02)](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/downloads)
- The NRF52 SDK 15.3.0 : [nRF-SDK v15.3.0](https://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v15.x.x/nRF5_SDK_15.3.0_59ac345.zip)
- The Python 3 modules `cbor`, `intelhex`, `click` and `cryptography` modules for the `mcuboot` tool (see [requirements.txt](../tools/mcuboot/requirements.txt))
- To keep the system clean, you can install python modules into a python virtual environment (`venv`)
@ -12,6 +12,10 @@ To build this project, you'll need:
python -m pip install -r tools/mcuboot/requirements.txt
```
- A reasonably recent version of CMake (I use 3.16.5)
- lv_font_conv, to generate the font .c files
- see [lv_font_conv](https://github.com/lvgl/lv_font_conv#install-the-script)
- install npm (commonly done via the package manager, ensure node's version is at least 12)
- install lv_font_conv: `npm install lv_font_conv`
## Build steps
### Clone the repo
@ -27,7 +31,7 @@ CMake configures the project according to variables you specify the command line
Variable | Description | Example|
----------|-------------|--------|
**ARM_NONE_EABI_TOOLCHAIN_PATH**|path to the toolchain directory|`-DARM_NONE_EABI_TOOLCHAIN_PATH=/home/jf/nrf52/gcc-arm-none-eabi-9-2020-q2-update/`|
**ARM_NONE_EABI_TOOLCHAIN_PATH**|path to the toolchain directory|`-DARM_NONE_EABI_TOOLCHAIN_PATH=/home/jf/nrf52/gcc-arm-11.2-2022.02-x86_64-arm-none-eabi/`|
**NRF5_SDK_PATH**|path to the NRF52 SDK|`-DNRF5_SDK_PATH=/home/jf/nrf52/Pinetime/sdk`|
**USE_JLINK, USE_GDB_CLIENT and USE_OPENOCD**|Enable *JLink* mode, *GDB Client* (Black Magic Probe) mode or *OpenOCD* mode (set the one you want to use to `1`)|`-DUSE_JLINK=1`
**CMAKE_BUILD_TYPE (\*)**| Build type (Release or Debug). Release is applied by default if this variable is not specified.|`-DCMAKE_BUILD_TYPE=Debug`
@ -43,7 +47,7 @@ By default, this variable is set to *Release*. It compiles the code with size an
The *Debug* mode disables all optimizations, which makes the code easier to debug. However, the binary size will likely be too big to fit in the internal flash memory. If you want to build and debug a *Debug* binary, you'll need to disable some parts of the code. For example, the icons for the **Navigation** app use a lot of memory space. You can comment the content of `m_iconMap` in the [Navigation](https://github.com/InfiniTimeOrg/InfiniTime/blob/develop/src/displayapp/screens/Navigation.h#L148) application to free some memory.
####(**) Note about **BUILD_DFU**:
DFU files are the files you'll need to install your build of InfiniTime using OTA (over-the-air) mecanism. To generate the DFU file, the Python tool [adafruit-nrfutil](https://github.com/adafruit/Adafruit_nRF52_nrfutil) is needed on your system. Check that this tool is properly installed before enabling this option.
DFU files are the files you'll need to install your build of InfiniTime using OTA (over-the-air) mechanism. To generate the DFU file, the Python tool [adafruit-nrfutil](https://github.com/adafruit/Adafruit_nRF52_nrfutil) is needed on your system. Check that this tool is properly installed before enabling this option.
#### CMake command line for JLink
```

View File

@ -1,62 +1,58 @@
# Build the project using Docker
A [Docker image (Dockerfile)](../docker) containing all the build environment is available for X86_64 and AMD64 architectures. These images make the build of the firmware and the generation of the DFU file for OTA quite easy, as well as preventing clashes with any other toolchains or development environments you may have installed.
A [Docker image (Dockerfile)](../docker) containing all the build environment is available for X86_64 and AMD64 architectures.
These images make the build of the firmware and the generation of the DFU file for OTA quite easy, as well as preventing clashes with any other toolchains or development environments you may have installed.
Based on Ubuntu 18.04 with the following build dependencies:
Based on Ubuntu 22.04 with the following build dependencies:
* ARM GCC Toolchain
* nRF SDK
* MCUBoot
* adafruit-nrfutil
* lv_font_conv
## Run a container to build the project
The `infinitime-build` image contains all the dependencies you need. The default `CMD` will compile sources found in `/sources`, so you need only mount your code.
The `infinitime-build` image contains all the dependencies you need.
The default `CMD` will compile sources found in `/sources`, so you need only mount your code.
Before continuing, make sure you first build the image as indicated in the [Build the image](#build-the-image) section, or check the [Using the image from Docker Hub](#using-the-image-from-docker-hub) section if you prefer to use a pre-made image.
This example will build the firmware, generate the MCUBoot image and generate the DFU file. For cloning the repo, see [these instructions](../doc/buildAndProgram.md#clone-the-repo). Outputs will be written to **<project_root>/build/output**:
This example will build the firmware, generate the MCUBoot image and generate the DFU file.
For cloning the repo, see [these instructions](../doc/buildAndProgram.md#clone-the-repo). Outputs will be written to **<project_root>/build/output**:
```bash
cd <project_root> # e.g. cd ./work/Pinetime
docker run --rm -it -v $(pwd):/sources infinitime-build
docker run --rm -it -v ${PWD}:/sources --user $(id -u):$(id -g) infinitime-build
```
If you only want to build a single CMake target, you can pass it in as the first parameter to the build script. This means calling the script explicitly as it will override the `CMD`. Here's an example For `pinetime-app`:
By default, the container runs as `root`, which is not convenient as all the files generated by the build will also belong to `root`.
The parameter `--user` overrides that default behavior.
The command above will run as your current user.
If you only want to build a single CMake target, you can pass it in as the first parameter to the build script.
This means calling the script explicitly as it will override the `CMD`.
Here's an example for `pinetime-app`:
```bash
docker run --rm -it -v $(pwd):/sources infinitime-build /opt/build.sh pinetime-app
```
The image is built using 1000:1000 for the user id and group id. If this is different to your user or group ids (run `id -u` and `id -g` to find out what your id values are if you are unsure), you will need to override them via the `--user` parameter in order to prevent permission errors with the output files (and the cmake build cache).
Running with this image is the same as above, you just specify the ids to `docker run`:
```bash
docker run --rm -it -v $(pwd):/sources --user $(id -u):$(id -g) infinitime-build
```
Or you can specify your user id and group id (by number, not by name) directly:
```bash
docker run --rm -it -v $(pwd):/sources --user 1234:1234 infinitime-build
docker run --rm -it -v ${PWD}:/sources --user $(id -u):$(id -g) infinitime-build /opt/build.sh pinetime-app
```
## Using the image from Docker Hub
The image is available via Docker Hub for both the amd64 and arm64v8 architectures at [pfeerick/infinitime-build](https://hub.docker.com/r/pfeerick/infinitime-build).
The image is available via Docker Hub for both the amd64 and arm64v8 architectures at [infinitime/infinitime-build](https://hub.docker.com/repository/docker/infinitime/infinitime-build).
It can be pulled (downloaded) using the following command:
You can run it using the following command:
```bash
docker pull pfeerick/infinitime-build
docker run --rm -it -v ${PWD}:/sources --user $(id -u):$(id -g) infinitime/infinitime-build
```
The default `latest` tag *should* automatically identify the correct image architecture, but if for some reason Docker does not, you can specify it manually:
* For AMD64 (x86_64) systems: `docker pull pfeerick/infinitime-build:amd64`
* For AMD64 (x86_64) systems: `docker pull --platform linux/amd64 infinitime/infinitime-build`
* For ARM64v8 (ARM64/aarch64) systems: `docker pull pfeerick/infinitime-build:arm64v8`
* For ARM64v8 (ARM64/aarch64) systems: `docker pull --platform linux/arm64 infinitime/infinitime-build`
## Build the image
@ -65,11 +61,5 @@ You can build the image yourself if you like!
The following commands must be run from the root of the project. This operation will take some time but, when done, a new image named *infinitime-build* is available.
```bash
docker image build -t infinitime-build ./docker
```
The `PUID` and `PGID` build arguments are used to set the user and group ids used in the container, meaning you will not need to specify it later unless they change for some reason. Specifying them is not mandatory, as this can be over-ridden at build time via the `--user` flag, but doing so will make the command you need to run later a bit shorter. In the below examples, they are set to your current user id and group id automatically. You can specify them manually, but they must be specified by number, not by name.
```bash
docker image build -t infinitime-build --build-arg PUID=$(id -u) --build-arg PGID=$(id -g) ./docker
docker build -t infinitime-build ./docker
```

View File

@ -8,7 +8,7 @@ To support as many setups as possible the VS Code configuration files expect the
Variable | Description | Example
----------|-------------|--------
**ARM_NONE_EABI_TOOLCHAIN_PATH**|path to the toolchain directory|`export ARM_NONE_EABI_TOOLCHAIN_PATH=/opt/gcc-arm-none-eabi-9-2020-q2-update`
**ARM_NONE_EABI_TOOLCHAIN_PATH**|path to the toolchain directory|`export ARM_NONE_EABI_TOOLCHAIN_PATH=/opt/gcc-arm-11.2-2022.02-x86_64-arm-none-eabi`
**NRF5_SDK_PATH**|path to the NRF52 SDK|`export NRF5_SDK_PATH=/opt/nRF5_SDK_15.3.0_59ac345`
## VS Code Extensions

View File

@ -18,7 +18,7 @@ You can sync the time using companion apps.
You can also set the time in the settings without a companion app. (version >1.7.0)
InfiniTime doesn't handle daylight savings automatically, so make sure to set the correct the time or sync it with a companion app.
InfiniTime doesn't handle daylight savings automatically, so make sure to set the correct time or sync it with a companion app.
### Digital watch face

View File

@ -9,5 +9,6 @@
- Top bar takes at least 20px + padding
- Top bar right icons move 8px to the left when using a page indicator
- A black background helps to hide the screen border, allowing the UI to look less cramped when utilizing the entire display area.
- A switch should be twice as wide as it is tall.
![example layouts](./ui/example.png)

View File

@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -qq \
@ -11,21 +11,27 @@ RUN apt-get update -qq \
make \
python3 \
python3-pip \
python-is-python3 \
tar \
unzip \
wget \
# aarch64 packages
curl \
# aarch64 packages
libffi-dev \
libssl-dev \
python3-dev \
python \
git \
apt-utils \
&& curl -sL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/cache/apt/* /var/lib/apt/lists/*;
# Git needed for PROJECT_GIT_COMMIT_HASH variable setting
RUN pip3 install adafruit-nrfutil
RUN pip3 install -Iv cryptography==3.3
RUN pip3 install cbor
RUN npm i lv_font_conv@1.5.2 -g
# build.sh knows how to compile
COPY build.sh /opt/
@ -38,10 +44,5 @@ RUN bash -c "source /opt/build.sh; GetNrfSdk;"
# McuBoot
RUN bash -c "source /opt/build.sh; GetMcuBoot;"
ARG PUID=1000
ARG PGID=1000
RUN groupadd --system --gid $PGID infinitime && useradd --system --uid $PUID --gid $PGID infinitime
USER infinitime:infinitime
ENV SOURCES_DIR /sources
CMD ["/opt/build.sh"]

View File

@ -9,21 +9,23 @@ set -e
export TOOLS_DIR="${TOOLS_DIR:=/opt}"
export SOURCES_DIR="${SOURCES_DIR:=/sources}"
export BUILD_DIR="${BUILD_DIR:=$SOURCES_DIR/build}"
export OUTPUT_DIR="${OUTPUT_DIR:=$BUILD_DIR/output}"
export OUTPUT_DIR="${OUTPUT_DIR:=$SOURCES_DIR/build/output}"
export BUILD_TYPE=${BUILD_TYPE:=Release}
export GCC_ARM_VER=${GCC_ARM_VER:="gcc-arm-none-eabi-9-2020-q2-update"}
export GCC_ARM_VER=${GCC_ARM_VER:="11.2-2022.02"}
export NRF_SDK_VER=${NRF_SDK_VER:="nRF5_SDK_15.3.0_59ac345"}
MACHINE="$(uname -m)"
[[ "$MACHINE" == "arm64" ]] && MACHINE="aarch64"
export GCC_ARM_PATH="gcc-arm-$GCC_ARM_VER-$MACHINE-arm-none-eabi"
main() {
local target="$1"
mkdir -p "$TOOLS_DIR"
[[ ! -d "$TOOLS_DIR/$GCC_ARM_VER" ]] && GetGcc
[[ ! -d "$TOOLS_DIR/$GCC_ARM_PATH" ]] && GetGcc
[[ ! -d "$TOOLS_DIR/$NRF_SDK_VER" ]] && GetNrfSdk
[[ ! -d "$TOOLS_DIR/mcuboot" ]] && GetMcuBoot
@ -38,8 +40,7 @@ main() {
}
GetGcc() {
GCC_SRC="$GCC_ARM_VER-$MACHINE-linux.tar.bz"
wget -q https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/$GCC_SRC -O - | tar -xj -C $TOOLS_DIR/
wget -q https://developer.arm.com/-/media/Files/downloads/gnu/$GCC_ARM_VER/binrel/$GCC_ARM_PATH.tar.xz -O - | tar -xJ -C $TOOLS_DIR/
}
GetMcuBoot() {
@ -54,18 +55,14 @@ GetNrfSdk() {
}
CmakeGenerate() {
# We can swap the CD and trailing SOURCES_DIR for -B and -S respectively
# once we go to newer CMake (Ubuntu 18.10 gives us CMake 3.10)
cd "$BUILD_DIR"
cmake -G "Unix Makefiles" \
-S "$SOURCES_DIR" \
-B "$BUILD_DIR" \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DUSE_OPENOCD=1 \
-DARM_NONE_EABI_TOOLCHAIN_PATH="$TOOLS_DIR/$GCC_ARM_VER" \
-DARM_NONE_EABI_TOOLCHAIN_PATH="$TOOLS_DIR/$GCC_ARM_PATH" \
-DNRF5_SDK_PATH="$TOOLS_DIR/$NRF_SDK_VER" \
-DBUILD_DFU=1 \
"$SOURCES_DIR"
cmake -L -N .
-DBUILD_DFU=1
}
CmakeBuild() {

View File

@ -15,12 +15,10 @@ cp "$BUILD_DIR/src/pinetime-mcuboot-app-dfu-$PROJECT_VERSION.zip" "$OUTPUT_DIR/p
cp "$BUILD_DIR/src/pinetime-mcuboot-recovery-loader-image-$PROJECT_VERSION.bin" "$OUTPUT_DIR/pinetime-mcuboot-recovery-loader-image-$PROJECT_VERSION.bin"
cp "$BUILD_DIR/src/pinetime-mcuboot-recovery-loader-dfu-$PROJECT_VERSION.zip" "$OUTPUT_DIR/pinetime-mcuboot-recovery-loader-dfu-$PROJECT_VERSION.zip"
mkdir -p "$OUTPUT_DIR/src"
cd "$BUILD_DIR"
cp src/*.bin "$OUTPUT_DIR/src"
cp src/*.hex "$OUTPUT_DIR/src"
cp src/*.out "$OUTPUT_DIR/src"
cp src/*.map "$OUTPUT_DIR/src"
cp $BUILD_DIR/src/*.bin "$OUTPUT_DIR/src/"
cp $BUILD_DIR/src/*.hex "$OUTPUT_DIR/src/"
cp $BUILD_DIR/src/*.out "$OUTPUT_DIR/src/"
cp $BUILD_DIR/src/*.map "$OUTPUT_DIR/src/"
ls -RUv1 "$OUTPUT_DIR" | sed 's;^\([^/]\); \1;g'

View File

@ -13659,12 +13659,12 @@ POSSIBILITY OF SUCH DAMAGE.\n
<usage>read</usage>
<enumeratedValue>
<name>NotPresent</name>
<description>Read: no overrun occured</description>
<description>Read: no overrun occurred</description>
<value>0</value>
</enumeratedValue>
<enumeratedValue>
<name>Present</name>
<description>Read: overrun occured</description>
<description>Read: overrun occurred</description>
<value>1</value>
</enumeratedValue>
</enumeratedValues>

View File

@ -31,6 +31,10 @@ const bool BootloaderVersion::IsValid() {
void BootloaderVersion::SetVersion(uint32_t v) {
BootloaderVersion::version = v;
snprintf(BootloaderVersion::versionString, BootloaderVersion::VERSION_STR_LEN, "%ld.%ld.%ld",
BootloaderVersion::Major(), BootloaderVersion::Minor(), BootloaderVersion::Patch());
snprintf(BootloaderVersion::versionString,
BootloaderVersion::VERSION_STR_LEN,
"%ld.%ld.%ld",
BootloaderVersion::Major(),
BootloaderVersion::Minor(),
BootloaderVersion::Patch());
}

View File

@ -12,6 +12,7 @@ namespace Pinetime {
static const char* VersionString();
static const bool IsValid();
static void SetVersion(uint32_t v);
private:
static uint32_t version;
static constexpr size_t VERSION_STR_LEN = 12;

View File

@ -42,7 +42,6 @@ set(SDK_SOURCE_FILES
"${NRF5_SDK_PATH}/modules/nrfx/drivers/src/nrfx_gpiote.c"
"${NRF5_SDK_PATH}/modules/nrfx/soc/nrfx_atomic.c"
"${NRF5_SDK_PATH}/modules/nrfx/drivers/src/nrfx_saadc.c"
"${NRF5_SDK_PATH}/components/libraries/timer/app_timer.h"
# FreeRTOS
${NRF5_SDK_PATH}/external/freertos/source/croutine.c
@ -53,7 +52,6 @@ set(SDK_SOURCE_FILES
${NRF5_SDK_PATH}/external/freertos/source/stream_buffer.c
${NRF5_SDK_PATH}/external/freertos/source/tasks.c
${NRF5_SDK_PATH}/external/freertos/source/timers.c
${NRF5_SDK_PATH}/components/libraries/timer/app_timer_freertos.c
# Libs
"${NRF5_SDK_PATH}/components/libraries/atomic/nrf_atomic.c"
@ -367,36 +365,8 @@ set(QCBOR_SRC
)
list(APPEND IMAGE_FILES
displayapp/icons/battery/os_battery_error.c
displayapp/icons/battery/os_battery_100.c
displayapp/icons/battery/os_battery_090.c
displayapp/icons/battery/os_battery_080.c
displayapp/icons/battery/os_battery_070.c
displayapp/icons/battery/os_battery_060.c
displayapp/icons/battery/os_battery_050.c
displayapp/icons/battery/os_battery_040.c
displayapp/icons/battery/os_battery_030.c
displayapp/icons/battery/os_battery_020.c
displayapp/icons/battery/os_battery_010.c
displayapp/icons/battery/os_battery_005.c
displayapp/icons/battery/os_batterycharging_100.c
displayapp/icons/battery/os_batterycharging_090.c
displayapp/icons/battery/os_batterycharging_080.c
displayapp/icons/battery/os_batterycharging_070.c
displayapp/icons/battery/os_batterycharging_060.c
displayapp/icons/battery/os_batterycharging_050.c
displayapp/icons/battery/os_batterycharging_040.c
displayapp/icons/battery/os_batterycharging_030.c
displayapp/icons/battery/os_batterycharging_020.c
displayapp/icons/battery/os_batterycharging_010.c
displayapp/icons/battery/os_batterycharging_005.c
displayapp/icons/bluetooth/os_bt_connected.c
displayapp/icons/bluetooth/os_bt_disconnected.c
displayapp/icons/battery/batteryicon.c
)
list(APPEND SOURCE_FILES
BootloaderVersion.cpp
logging/NrfLogger.cpp
@ -404,14 +374,12 @@ list(APPEND SOURCE_FILES
displayapp/screens/Screen.cpp
displayapp/screens/Clock.cpp
displayapp/screens/Tile.cpp
displayapp/screens/Meter.cpp
displayapp/screens/InfiniPaint.cpp
displayapp/screens/Paddle.cpp
displayapp/screens/StopWatch.cpp
displayapp/screens/BatteryIcon.cpp
displayapp/screens/BleIcon.cpp
displayapp/screens/NotificationIcon.cpp
displayapp/screens/Brightness.cpp
displayapp/screens/SystemInfo.cpp
displayapp/screens/Label.cpp
displayapp/screens/FirmwareUpdate.cpp
@ -435,7 +403,9 @@ list(APPEND SOURCE_FILES
displayapp/screens/Error.cpp
displayapp/screens/Alarm.cpp
displayapp/screens/Styles.cpp
displayapp/screens/Agenda.cpp
displayapp/Colors.cpp
displayapp/widgets/Counter.cpp
## Settings
displayapp/screens/settings/QuickSettings.cpp
@ -447,12 +417,16 @@ list(APPEND SOURCE_FILES
displayapp/screens/settings/SettingSteps.cpp
displayapp/screens/settings/SettingSetDate.cpp
displayapp/screens/settings/SettingSetTime.cpp
displayapp/screens/settings/SettingChimes.cpp
displayapp/screens/settings/SettingShakeThreshold.cpp
displayapp/screens/settings/SettingBluetooth.cpp
## Watch faces
displayapp/icons/bg_clock.c
displayapp/screens/WatchFaceAnalog.cpp
displayapp/screens/WatchFaceDigital.cpp
displayapp/screens/PineTimeStyle.cpp
displayapp/screens/WatchFaceTerminal.cpp
displayapp/screens/WatchFacePineTimeStyle.cpp
##
@ -484,7 +458,7 @@ list(APPEND SOURCE_FILES
components/ble/MusicService.cpp
components/ble/weather/WeatherService.cpp
components/ble/NavigationService.cpp
displayapp/fonts/lv_font_navi_80.c
components/ble/AgendaService.cpp
components/ble/BatteryInformationService.cpp
components/ble/FSService.cpp
components/ble/ImmediateAlertService.cpp
@ -503,15 +477,10 @@ list(APPEND SOURCE_FILES
FreeRTOS/port_cmsis.c
displayapp/LittleVgl.cpp
displayapp/fonts/jetbrains_mono_extrabold_compressed.c
displayapp/fonts/jetbrains_mono_bold_20.c
displayapp/fonts/jetbrains_mono_76.c
displayapp/fonts/jetbrains_mono_42.c
displayapp/fonts/lv_font_sys_48.c
displayapp/fonts/open_sans_light.c
displayapp/lv_pinetime_theme.c
systemtask/SystemTask.cpp
systemtask/SystemMonitor.cpp
drivers/TwiMaster.cpp
heartratetask/HeartRateTask.cpp
@ -561,6 +530,7 @@ list(APPEND RECOVERY_SOURCE_FILES
components/ble/ImmediateAlertService.cpp
components/ble/ServiceDiscovery.cpp
components/ble/NavigationService.cpp
components/ble/AgendaService.cpp
components/ble/HeartRateService.cpp
components/ble/MotionService.cpp
components/firmwarevalidator/FirmwareValidator.cpp
@ -573,6 +543,7 @@ list(APPEND RECOVERY_SOURCE_FILES
FreeRTOS/port_cmsis.c
systemtask/SystemTask.cpp
systemtask/SystemMonitor.cpp
drivers/TwiMaster.cpp
components/gfx/Gfx.cpp
components/rle/RleDecoder.cpp
@ -610,6 +581,7 @@ list(APPEND RECOVERYLOADER_SOURCE_FILES
set(INCLUDE_FILES
${CMAKE_CURRENT_BINARY_DIR}/src/Version.h
BootloaderVersion.h
logging/Logger.h
logging/NrfLogger.h
@ -619,15 +591,12 @@ set(INCLUDE_FILES
displayapp/screens/Screen.h
displayapp/screens/Clock.h
displayapp/screens/Tile.h
displayapp/screens/Meter.h
displayapp/screens/InfiniPaint.h
displayapp/screens/StopWatch.h
displayapp/screens/Paddle.h
displayapp/screens/DropDownDemo.h
displayapp/screens/BatteryIcon.h
displayapp/screens/BleIcon.h
displayapp/screens/NotificationIcon.h
displayapp/screens/Brightness.h
displayapp/screens/SystemInfo.h
displayapp/screens/ScreenList.h
displayapp/screens/Label.h
@ -642,6 +611,7 @@ set(INCLUDE_FILES
displayapp/screens/Timer.h
displayapp/screens/Alarm.h
displayapp/Colors.h
displayapp/widgets/Counter.h
drivers/St7789.h
drivers/SpiNorFlash.h
drivers/SpiMaster.h
@ -708,6 +678,7 @@ set(INCLUDE_FILES
)
include_directories(
${CMAKE_BINARY_DIR}/src # include generated files like Version.h
.
../
libs/
@ -819,6 +790,15 @@ if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif ()
add_subdirectory(displayapp/fonts)
target_compile_options(infinitime_fonts PUBLIC
$<$<AND:$<COMPILE_LANGUAGE:C>,$<CONFIG:DEBUG>>: ${COMMON_FLAGS} -Og -g3>
$<$<AND:$<COMPILE_LANGUAGE:C>,$<CONFIG:RELEASE>>: ${COMMON_FLAGS} -Os>
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CONFIG:DEBUG>>: ${COMMON_FLAGS} -Og -g3 -fno-rtti>
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CONFIG:RELEASE>>: ${COMMON_FLAGS} -Os -fno-rtti>
$<$<COMPILE_LANGUAGE:ASM>: -MP -MD -x assembler-with-cpp>
)
# NRF SDK
add_library(nrf-sdk STATIC ${SDK_SOURCE_FILES})
target_include_directories(nrf-sdk SYSTEM PUBLIC . ../)
@ -892,7 +872,7 @@ set(EXECUTABLE_FILE_NAME ${EXECUTABLE_NAME}-${pinetime_VERSION_MAJOR}.${pinetime
set(NRF5_LINKER_SCRIPT "${CMAKE_SOURCE_DIR}/gcc_nrf52.ld")
add_executable(${EXECUTABLE_NAME} ${SOURCE_FILES})
set_target_properties(${EXECUTABLE_NAME} PROPERTIES OUTPUT_NAME ${EXECUTABLE_FILE_NAME})
target_link_libraries(${EXECUTABLE_NAME} nimble nrf-sdk lvgl littlefs QCBOR)
target_link_libraries(${EXECUTABLE_NAME} nimble nrf-sdk lvgl littlefs QCBOR infinitime_fonts)
target_compile_options(${EXECUTABLE_NAME} PUBLIC
$<$<AND:$<COMPILE_LANGUAGE:C>,$<CONFIG:DEBUG>>: ${COMMON_FLAGS} -Wextra -Wformat -Wno-missing-field-initializers -Wno-unused-parameter -Og -g3>
$<$<AND:$<COMPILE_LANGUAGE:C>,$<CONFIG:RELEASE>>: ${COMMON_FLAGS} -Wextra -Wformat -Wno-missing-field-initializers -Wno-unused-parameter -Os>
@ -913,15 +893,14 @@ add_custom_command(TARGET ${EXECUTABLE_NAME}
COMMAND ${CMAKE_OBJCOPY} -O ihex ${EXECUTABLE_FILE_NAME}.out "${EXECUTABLE_FILE_NAME}.hex"
COMMENT "post build steps for ${EXECUTABLE_FILE_NAME}")
# Build binary intended to be used by bootloader
set(EXECUTABLE_MCUBOOT_NAME "pinetime-mcuboot-app")
set(EXECUTABLE_MCUBOOT_FILE_NAME ${EXECUTABLE_MCUBOOT_NAME}-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH})
set(IMAGE_MCUBOOT_FILE_NAME ${EXECUTABLE_MCUBOOT_NAME}-image-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH}.bin)
set(IMAGE_MCUBOOT_FILE_NAME ${EXECUTABLE_MCUBOOT_NAME}-image-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH}.hex)
set(DFU_MCUBOOT_FILE_NAME ${EXECUTABLE_MCUBOOT_NAME}-dfu-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH}.zip)
set(NRF5_LINKER_SCRIPT_MCUBOOT "${CMAKE_SOURCE_DIR}/gcc_nrf52-mcuboot.ld")
add_executable(${EXECUTABLE_MCUBOOT_NAME} ${SOURCE_FILES})
target_link_libraries(${EXECUTABLE_MCUBOOT_NAME} nimble nrf-sdk lvgl littlefs QCBOR)
target_link_libraries(${EXECUTABLE_MCUBOOT_NAME} nimble nrf-sdk lvgl littlefs QCBOR infinitime_fonts)
set_target_properties(${EXECUTABLE_MCUBOOT_NAME} PROPERTIES OUTPUT_NAME ${EXECUTABLE_MCUBOOT_FILE_NAME})
target_compile_options(${EXECUTABLE_MCUBOOT_NAME} PUBLIC
$<$<AND:$<COMPILE_LANGUAGE:C>,$<CONFIG:DEBUG>>: ${COMMON_FLAGS} -Og -g3>
@ -941,7 +920,7 @@ add_custom_command(TARGET ${EXECUTABLE_MCUBOOT_NAME}
COMMAND ${CMAKE_SIZE_UTIL} ${EXECUTABLE_MCUBOOT_FILE_NAME}.out
COMMAND ${CMAKE_OBJCOPY} -O binary ${EXECUTABLE_MCUBOOT_FILE_NAME}.out "${EXECUTABLE_MCUBOOT_FILE_NAME}.bin"
COMMAND ${CMAKE_OBJCOPY} -O ihex ${EXECUTABLE_MCUBOOT_FILE_NAME}.out "${EXECUTABLE_MCUBOOT_FILE_NAME}.hex"
COMMAND ${CMAKE_SOURCE_DIR}/tools/mcuboot/imgtool.py create --align 4 --version 1.0.0 --header-size 32 --slot-size 475136 --pad-header ${EXECUTABLE_MCUBOOT_FILE_NAME}.bin ${IMAGE_MCUBOOT_FILE_NAME}
COMMAND ${CMAKE_SOURCE_DIR}/tools/mcuboot/imgtool.py create --align 4 --version 1.0.0 --header-size 32 --slot-size 475136 --pad-header ${EXECUTABLE_MCUBOOT_FILE_NAME}.hex ${IMAGE_MCUBOOT_FILE_NAME}
COMMENT "post build steps for ${EXECUTABLE_MCUBOOT_FILE_NAME}"
)
@ -957,7 +936,7 @@ endif()
set(EXECUTABLE_RECOVERY_NAME "pinetime-recovery")
set(EXECUTABLE_RECOVERY_FILE_NAME ${EXECUTABLE_RECOVERY_NAME}-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH})
add_executable(${EXECUTABLE_RECOVERY_NAME} ${RECOVERY_SOURCE_FILES})
target_link_libraries(${EXECUTABLE_RECOVERY_NAME} nimble nrf-sdk littlefs QCBOR)
target_link_libraries(${EXECUTABLE_RECOVERY_NAME} nimble nrf-sdk littlefs QCBOR infinitime_fonts)
set_target_properties(${EXECUTABLE_RECOVERY_NAME} PROPERTIES OUTPUT_NAME ${EXECUTABLE_RECOVERY_FILE_NAME})
target_compile_definitions(${EXECUTABLE_RECOVERY_NAME} PUBLIC "PINETIME_IS_RECOVERY")
target_compile_options(${EXECUTABLE_RECOVERY_NAME} PUBLIC
@ -984,10 +963,10 @@ add_custom_command(TARGET ${EXECUTABLE_RECOVERY_NAME}
# InfiniTime recovery firmware (mcuboot)
set(EXECUTABLE_RECOVERY_MCUBOOT_NAME "pinetime-mcuboot-recovery")
set(EXECUTABLE_RECOVERY_MCUBOOT_FILE_NAME ${EXECUTABLE_RECOVERY_MCUBOOT_NAME}-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH})
set(IMAGE_RECOVERY_MCUBOOT_FILE_NAME ${EXECUTABLE_RECOVERY_MCUBOOT_NAME}-image-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH}.bin)
set(IMAGE_RECOVERY_MCUBOOT_FILE_NAME ${EXECUTABLE_RECOVERY_MCUBOOT_NAME}-image-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH}.hex)
set(DFU_RECOVERY_MCUBOOT_FILE_NAME ${EXECUTABLE_RECOVERY_MCUBOOT_NAME}-dfu-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH}.zip)
add_executable(${EXECUTABLE_RECOVERY_MCUBOOT_NAME} ${RECOVERY_SOURCE_FILES})
target_link_libraries(${EXECUTABLE_RECOVERY_MCUBOOT_NAME} nimble nrf-sdk littlefs QCBOR)
target_link_libraries(${EXECUTABLE_RECOVERY_MCUBOOT_NAME} nimble nrf-sdk littlefs QCBOR infinitime_fonts)
set_target_properties(${EXECUTABLE_RECOVERY_MCUBOOT_NAME} PROPERTIES OUTPUT_NAME ${EXECUTABLE_RECOVERY_MCUBOOT_FILE_NAME})
target_compile_definitions(${EXECUTABLE_RECOVERY_MCUBOOT_NAME} PUBLIC "PINETIME_IS_RECOVERY")
target_compile_options(${EXECUTABLE_RECOVERY_MCUBOOT_NAME} PUBLIC
@ -1000,16 +979,17 @@ target_compile_options(${EXECUTABLE_RECOVERY_MCUBOOT_NAME} PUBLIC
set_target_properties(${EXECUTABLE_RECOVERY_MCUBOOT_NAME} PROPERTIES
SUFFIX ".out"
LINK_FLAGS "-mthumb -mabi=aapcs -L ${NRF5_SDK_PATH}/modules/nrfx/mdk -T${NRF5_LINKER_SCRIPT} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,--gc-sections -Wl,--print-memory-usage --specs=nano.specs -lc -lnosys -lm -Wl,-Map=${EXECUTABLE_GRAPHICS_FILE_NAME}.map"
LINK_FLAGS "-mthumb -mabi=aapcs -L ${NRF5_SDK_PATH}/modules/nrfx/mdk -T${NRF5_LINKER_SCRIPT_MCUBOOT} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,--gc-sections -Wl,--print-memory-usage --specs=nano.specs -lc -lnosys -lm -Wl,-Map=${EXECUTABLE_GRAPHICS_FILE_NAME}.map"
)
add_custom_command(TARGET ${EXECUTABLE_RECOVERY_MCUBOOT_NAME}
POST_BUILD
COMMAND ${CMAKE_SIZE_UTIL} ${EXECUTABLE_RECOVERY_MCUBOOT_FILE_NAME}.out
COMMAND ${CMAKE_OBJCOPY} -O binary ${EXECUTABLE_RECOVERY_MCUBOOT_FILE_NAME}.out "${EXECUTABLE_RECOVERY_MCUBOOT_FILE_NAME}.bin"
COMMAND ${CMAKE_OBJCOPY} -O ihex ${EXECUTABLE_RECOVERY_MCUBOOT_FILE_NAME}.out "${EXECUTABLE_RECOVERYY_MCUBOOT_FILE_NAME}.hex"
COMMAND ${CMAKE_SOURCE_DIR}/tools/mcuboot/imgtool.py create --align 4 --version 1.0.0 --header-size 32 --slot-size 475136 --pad-header ${EXECUTABLE_RECOVERY_MCUBOOT_FILE_NAME}.bin ${IMAGE_RECOVERY_MCUBOOT_FILE_NAME}
COMMAND python3 ${CMAKE_SOURCE_DIR}/tools/bin2c.py ${IMAGE_RECOVERY_MCUBOOT_FILE_NAME} recoveryImage > recoveryImage.h
COMMAND ${CMAKE_OBJCOPY} -O ihex ${EXECUTABLE_RECOVERY_MCUBOOT_FILE_NAME}.out "${EXECUTABLE_RECOVERY_MCUBOOT_FILE_NAME}.hex"
COMMAND ${CMAKE_SOURCE_DIR}/tools/mcuboot/imgtool.py create --align 4 --version 1.0.0 --header-size 32 --slot-size 475136 --pad-header ${EXECUTABLE_RECOVERY_MCUBOOT_FILE_NAME}.hex ${IMAGE_RECOVERY_MCUBOOT_FILE_NAME}
COMMAND ${CMAKE_OBJCOPY} -I ihex -O binary ${IMAGE_RECOVERY_MCUBOOT_FILE_NAME} "${IMAGE_RECOVERY_MCUBOOT_FILE_NAME}.bin"
COMMAND python3 ${CMAKE_SOURCE_DIR}/tools/bin2c.py ${IMAGE_RECOVERY_MCUBOOT_FILE_NAME}.bin recoveryImage > recoveryImage.h
COMMENT "post build steps for ${EXECUTABLE_RECOVERY_MCUBOOT_FILE_NAME}"
)
@ -1025,7 +1005,7 @@ endif()
set(EXECUTABLE_RECOVERYLOADER_NAME "pinetime-recovery-loader")
set(EXECUTABLE_RECOVERYLOADER_FILE_NAME ${EXECUTABLE_RECOVERYLOADER_NAME}-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH})
add_executable(${EXECUTABLE_RECOVERYLOADER_NAME} ${RECOVERYLOADER_SOURCE_FILES})
target_link_libraries(${EXECUTABLE_RECOVERYLOADER_NAME} nrf-sdk QCBOR)
target_link_libraries(${EXECUTABLE_RECOVERYLOADER_NAME} nrf-sdk QCBOR infinitime_fonts)
set_target_properties(${EXECUTABLE_RECOVERYLOADER_NAME} PROPERTIES OUTPUT_NAME ${EXECUTABLE_RECOVERYLOADER_FILE_NAME})
target_compile_options(${EXECUTABLE_RECOVERYLOADER_NAME} PUBLIC
$<$<AND:$<COMPILE_LANGUAGE:C>,$<CONFIG:DEBUG>>: ${COMMON_FLAGS} -Og -g3>
@ -1055,10 +1035,10 @@ add_custom_command(TARGET ${EXECUTABLE_RECOVERYLOADER_NAME}
# Build binary that writes the recovery image (MCUBoot version)
set(EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME "pinetime-mcuboot-recovery-loader")
set(EXECUTABLE_MCUBOOT_RECOVERYLOADER_FILE_NAME ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME}-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH})
set(IMAGE_MCUBOOT_RECOVERYLOADER_FILE_NAME ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME}-image-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH}.bin)
set(IMAGE_MCUBOOT_RECOVERYLOADER_FILE_NAME ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME}-image-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH}.hex)
set(DFU_MCUBOOT_RECOVERYLOADER_FILE_NAME ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME}-dfu-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH}.zip)
add_executable(${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME} ${RECOVERYLOADER_SOURCE_FILES})
target_link_libraries(${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME} nrf-sdk QCBOR)
target_link_libraries(${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME} nrf-sdk QCBOR infinitime_fonts)
set_target_properties(${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME} PROPERTIES OUTPUT_NAME ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_FILE_NAME})
target_compile_options(${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME} PUBLIC
$<$<AND:$<COMPILE_LANGUAGE:C>,$<CONFIG:DEBUG>>: ${COMMON_FLAGS} -Og -g3>
@ -1082,8 +1062,9 @@ add_custom_command(TARGET ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME}
COMMAND ${CMAKE_SIZE_UTIL} ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_FILE_NAME}.out
COMMAND ${CMAKE_OBJCOPY} -O binary ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_FILE_NAME}.out "${EXECUTABLE_MCUBOOT_RECOVERYLOADER_FILE_NAME}.bin"
COMMAND ${CMAKE_OBJCOPY} -O ihex ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_FILE_NAME}.out "${EXECUTABLE_MCUBOOT_RECOVERYLOADER_FILE_NAME}.hex"
COMMAND ${CMAKE_SOURCE_DIR}/tools/mcuboot/imgtool.py create --align 4 --version 1.0.0 --header-size 32 --slot-size 475136 --pad-header ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_FILE_NAME}.bin ${IMAGE_MCUBOOT_RECOVERYLOADER_FILE_NAME}
COMMAND python3 ${CMAKE_SOURCE_DIR}/tools/bin2c.py ${IMAGE_MCUBOOT_RECOVERYLOADER_FILE_NAME} recoveryLoaderImage > recoveryLoaderImage.h
COMMAND ${CMAKE_SOURCE_DIR}/tools/mcuboot/imgtool.py create --align 4 --version 1.0.0 --header-size 32 --slot-size 475136 --pad-header ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_FILE_NAME}.hex ${IMAGE_MCUBOOT_RECOVERYLOADER_FILE_NAME}
COMMAND ${CMAKE_OBJCOPY} -I ihex -O binary ${IMAGE_MCUBOOT_RECOVERYLOADER_FILE_NAME} "${IMAGE_MCUBOOT_RECOVERYLOADER_FILE_NAME}.bin"
COMMAND python3 ${CMAKE_SOURCE_DIR}/tools/bin2c.py ${IMAGE_MCUBOOT_RECOVERYLOADER_FILE_NAME}.bin recoveryLoaderImage > recoveryLoaderImage.h
COMMENT "post build steps for ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_FILE_NAME}"
)

View File

@ -93,7 +93,7 @@
/* Software timer definitions. */
#define configUSE_TIMERS 1
#define configTIMER_TASK_PRIORITY (0)
#define configTIMER_TASK_PRIORITY (1)
#define configTIMER_QUEUE_LENGTH 32
#define configTIMER_TASK_STACK_DEPTH (300)

View File

@ -1,4 +1,4 @@
#include "ButtonHandler.h"
#include "buttonhandler/ButtonHandler.h"
using namespace Pinetime::Controllers;

View File

@ -1,6 +1,6 @@
#pragma once
#include "ButtonActions.h"
#include "buttonhandler/ButtonActions.h"
#include "systemtask/SystemTask.h"
#include <FreeRTOS.h>
#include <timers.h>

View File

@ -17,7 +17,6 @@
*/
#include "components/alarm/AlarmController.h"
#include "systemtask/SystemTask.h"
#include "app_timer.h"
#include "task.h"
#include <chrono>
@ -27,20 +26,16 @@ using namespace std::chrono_literals;
AlarmController::AlarmController(Controllers::DateTime& dateTimeController) : dateTimeController {dateTimeController} {
}
APP_TIMER_DEF(alarmAppTimer);
namespace {
void SetOffAlarm(void* p_context) {
auto* controller = static_cast<Pinetime::Controllers::AlarmController*>(p_context);
if (controller != nullptr) {
void SetOffAlarm(TimerHandle_t xTimer) {
auto controller = static_cast<Pinetime::Controllers::AlarmController*>(pvTimerGetTimerID(xTimer));
controller->SetOffAlarmNow();
}
}
}
void AlarmController::Init(System::SystemTask* systemTask) {
app_timer_create(&alarmAppTimer, APP_TIMER_MODE_SINGLE_SHOT, SetOffAlarm);
this->systemTask = systemTask;
alarmTimer = xTimerCreate("Alarm", 1, pdFALSE, this, SetOffAlarm);
}
void AlarmController::SetAlarmTime(uint8_t alarmHr, uint8_t alarmMin) {
@ -49,12 +44,12 @@ void AlarmController::SetAlarmTime(uint8_t alarmHr, uint8_t alarmMin) {
}
void AlarmController::ScheduleAlarm() {
// Determine the next time the alarm needs to go off and set the app_timer
app_timer_stop(alarmAppTimer);
// Determine the next time the alarm needs to go off and set the timer
xTimerStop(alarmTimer, 0);
auto now = dateTimeController.CurrentDateTime();
alarmTime = now;
time_t ttAlarmTime = std::chrono::system_clock::to_time_t(alarmTime);
time_t ttAlarmTime = std::chrono::system_clock::to_time_t(std::chrono::time_point_cast<std::chrono::system_clock::duration>(alarmTime));
tm* tmAlarmTime = std::localtime(&ttAlarmTime);
// If the time being set has already passed today,the alarm should be set for tomorrow
@ -80,8 +75,9 @@ void AlarmController::ScheduleAlarm() {
// now can convert back to a time_point
alarmTime = std::chrono::system_clock::from_time_t(std::mktime(tmAlarmTime));
auto mSecToAlarm = std::chrono::duration_cast<std::chrono::milliseconds>(alarmTime - now).count();
app_timer_start(alarmAppTimer, APP_TIMER_TICKS(mSecToAlarm), this);
auto secondsToAlarm = std::chrono::duration_cast<std::chrono::seconds>(alarmTime - now).count();
xTimerChangePeriod(alarmTimer, secondsToAlarm * configTICK_RATE_HZ, 0);
xTimerStart(alarmTimer, 0);
state = AlarmState::Set;
}
@ -91,7 +87,7 @@ uint32_t AlarmController::SecondsToAlarm() {
}
void AlarmController::DisableAlarm() {
app_timer_stop(alarmAppTimer);
xTimerStop(alarmTimer, 0);
state = AlarmState::Not_Set;
}
@ -101,14 +97,12 @@ void AlarmController::SetOffAlarmNow() {
}
void AlarmController::StopAlerting() {
systemTask->PushMessage(System::Messages::StopRinging);
// Alarm state is off unless this is a recurring alarm
if (recurrence == RecurType::None) {
state = AlarmState::Not_Set;
} else {
state = AlarmState::Set;
// set next instance
ScheduleAlarm();
}
systemTask->PushMessage(System::Messages::StopRinging);
}

View File

@ -17,6 +17,8 @@
*/
#pragma once
#include <FreeRTOS.h>
#include <timers.h>
#include <cstdint>
#include "components/datetime/DateTimeController.h"
@ -57,6 +59,7 @@ namespace Pinetime {
private:
Controllers::DateTime& dateTimeController;
System::SystemTask* systemTask = nullptr;
TimerHandle_t alarmTimer;
uint8_t hours = 7;
uint8_t minutes = 0;
std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> alarmTime;

View File

@ -0,0 +1,109 @@
/* Copyright (C) 2021 Adam Pigg
This file is part of InfiniTime.
InfiniTime is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
InfiniTime is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "components/ble/AgendaService.h"
#include "systemtask/SystemTask.h"
namespace {
// 3fdaYYXX-e246-472e-b7e0-d2b0f3d9c17a
constexpr ble_uuid128_t CharUuid(uint8_t x, uint8_t y) {
return ble_uuid128_t {.u = {.type = BLE_UUID_TYPE_128},
.value = {0x7a, 0xc1, 0xd9, 0xf3, 0xb0, 0xd2, 0xe0, 0xb7, 0x2e, 0x47, 0x46, 0xe2, x, y, 0xda, 0x3f}};
}
// 00010000-78fc-48fe-8e23-433b3a1942d0
constexpr ble_uuid128_t BaseUuid() {
return CharUuid(0x00, 0x00);
}
constexpr ble_uuid128_t agendaUuid {BaseUuid()};
constexpr ble_uuid128_t agendaItemCharUuid {CharUuid(0x01, 0x00)};
/*constexpr ble_uuid128_t navNarrativeCharUuid {CharUuid(0x02, 0x00)};
constexpr ble_uuid128_t navManDistCharUuid {CharUuid(0x03, 0x00)};
constexpr ble_uuid128_t navProgressCharUuid {CharUuid(0x04, 0x00)};*/
int AgendaCallback(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt, void* arg) {
auto agendaService = static_cast<Pinetime::Controllers::AgendaService*>(arg);
return agendaService->OnCommand(conn_handle, attr_handle, ctxt);
}
} // namespace
Pinetime::Controllers::AgendaService::AgendaService(Pinetime::System::SystemTask& system) : m_system(system) {
characteristicDefinition[0] = {.uuid = &agendaItemCharUuid.u,
.access_cb = AgendaCallback,
.arg = this,
.flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ};
characteristicDefinition[1] = {0};
serviceDefinition[0] = {.type = BLE_GATT_SVC_TYPE_PRIMARY, .uuid = &agendaUuid.u, .characteristics = characteristicDefinition};
serviceDefinition[1] = {0};
}
void Pinetime::Controllers::AgendaService::Init() {
int res = 0;
res = ble_gatts_count_cfg(serviceDefinition);
ASSERT(res == 0);
res = ble_gatts_add_svcs(serviceDefinition);
ASSERT(res == 0);
m_agenda_times[0] = 1655327841;
m_agenda_pieces[0] = "C++ Fumbling";
}
int Pinetime::Controllers::AgendaService::OnCommand(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt) {
if (ctxt->op == BLE_GATT_ACCESS_OP_WRITE_CHR) {
size_t notifSize = OS_MBUF_PKTLEN(ctxt->om);
uint8_t data[notifSize + 1];
data[notifSize] = '\0';
os_mbuf_copydata(ctxt->om, 0, notifSize, data);
if (ble_uuid_cmp(ctxt->chr->uuid, &agendaItemCharUuid.u) == 0) {
if (notifSize >= 5) {
uint8_t itemIndex = (uint8_t) data[0];
uint32_t itemTime = ((uint32_t) data[1]) << 24 | ((uint32_t) data[2]) << 16 | ((uint32_t) data[3]) << 8 | ((uint32_t) data[4]);
char* sAgendaItem = (char*) &data[5];
if (itemIndex < AGENDA_CAPACITY) { // don't allow a buffer overflow
m_agenda_times[itemIndex] = itemTime;
// implicit std::string copy/conversion here:
m_agenda_pieces[itemIndex] = sAgendaItem;
}
}
}
}
return 0;
}
uint32_t Pinetime::Controllers::AgendaService::getAgendaTime(uint8_t index) {
if (index < AGENDA_CAPACITY) {
return m_agenda_times[index];
} else {
return 0;
}
}
std::string Pinetime::Controllers::AgendaService::getAgendaPiece(uint8_t index) {
if (index < AGENDA_CAPACITY) {
return m_agenda_pieces[index];
} else {
return 0;
}
}

View File

@ -0,0 +1,59 @@
/* Copyright (C) 2021 Adam Pigg
This file is part of InfiniTime.
InfiniTime is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
InfiniTime is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include <cstdint>
#include <string>
#define min // workaround: nimble's min/max macros conflict with libstdc++
#define max
#include <host/ble_gap.h>
#include <host/ble_uuid.h>
#undef max
#undef min
namespace Pinetime {
namespace System {
class SystemTask;
}
namespace Controllers {
class AgendaService {
public:
static const uint8_t AGENDA_CAPACITY = 35;
explicit AgendaService(Pinetime::System::SystemTask& system);
void Init();
int OnCommand(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt);
uint32_t getAgendaTime(uint8_t index);
std::string getAgendaPiece(uint8_t index);
private:
struct ble_gatt_chr_def characteristicDefinition[2];
struct ble_gatt_svc_def serviceDefinition[2];
uint32_t m_agenda_times[AGENDA_CAPACITY];
std::string m_agenda_pieces[AGENDA_CAPACITY];
Pinetime::System::SystemTask& m_system;
};
}
}

View File

@ -2,6 +2,7 @@
#include <algorithm>
#include "components/ble/NotificationManager.h"
#include "systemtask/SystemTask.h"
#include <nrf_log.h>
using namespace Pinetime::Controllers;
constexpr ble_uuid16_t AlertNotificationClient::ansServiceUuid;
@ -25,8 +26,11 @@ namespace {
return client->OnCharacteristicsDiscoveryEvent(conn_handle, error, chr);
}
int OnAlertNotificationDescriptorDiscoveryEventCallback(
uint16_t conn_handle, const struct ble_gatt_error* error, uint16_t chr_val_handle, const struct ble_gatt_dsc* dsc, void* arg) {
int OnAlertNotificationDescriptorDiscoveryEventCallback(uint16_t conn_handle,
const struct ble_gatt_error* error,
uint16_t chr_val_handle,
const struct ble_gatt_dsc* dsc,
void* arg) {
auto client = static_cast<AlertNotificationClient*>(arg);
return client->OnDescriptorDiscoveryEventCallback(conn_handle, error, chr_val_handle, dsc);
}

View File

@ -18,6 +18,7 @@ namespace Pinetime {
int OnBatteryServiceRequested(uint16_t connectionHandle, uint16_t attributeHandle, ble_gatt_access_ctxt* context);
void NotifyBatteryLevel(uint16_t connectionHandle, uint8_t level);
private:
Controllers::Battery& batteryController;
static constexpr uint16_t batteryInformationServiceId {0x180F};

View File

@ -2,6 +2,10 @@
using namespace Pinetime::Controllers;
bool Ble::IsConnected() const {
return isConnected;
}
void Ble::Connect() {
isConnected = true;
}
@ -10,6 +14,18 @@ void Ble::Disconnect() {
isConnected = false;
}
bool Ble::IsRadioEnabled() const {
return isRadioEnabled;
}
void Ble::EnableRadio() {
isRadioEnabled = true;
}
void Ble::DisableRadio() {
isRadioEnabled = false;
}
void Ble::StartFirmwareUpdate() {
isFirmwareUpdating = true;
}

View File

@ -12,12 +12,14 @@ namespace Pinetime {
enum class AddressTypes { Public, Random, RPA_Public, RPA_Random };
Ble() = default;
bool IsConnected() const {
return isConnected;
}
bool IsConnected() const;
void Connect();
void Disconnect();
bool IsRadioEnabled() const;
void EnableRadio();
void DisableRadio();
void StartFirmwareUpdate();
void StopFirmwareUpdate();
void FirmwareUpdateTotalBytes(uint32_t totalBytes);
@ -57,6 +59,7 @@ namespace Pinetime {
private:
bool isConnected = false;
bool isRadioEnabled = true;
bool isFirmwareUpdating = false;
uint32_t firmwareUpdateTotalBytes = 0;
uint32_t firmwareUpdateCurrentBytes = 0;

View File

@ -85,10 +85,21 @@ int CurrentTimeClient::OnCurrentTimeReadResult(uint16_t conn_handle, const ble_g
// TODO check that attribute->handle equals the handle discovered in OnCharacteristicDiscoveryEvent
CtsData result;
os_mbuf_copydata(attribute->om, 0, sizeof(CtsData), &result);
NRF_LOG_INFO(
"Received data: %d-%d-%d %d:%d:%d", result.year, result.month, result.dayofmonth, result.hour, result.minute, result.second);
dateTimeController.SetTime(
result.year, result.month, result.dayofmonth, 0, result.hour, result.minute, result.second, nrf_rtc_counter_get(portNRF_RTC_REG));
NRF_LOG_INFO("Received data: %d-%d-%d %d:%d:%d",
result.year,
result.month,
result.dayofmonth,
result.hour,
result.minute,
result.second);
dateTimeController.SetTime(result.year,
result.month,
result.dayofmonth,
0,
result.hour,
result.minute,
result.second,
nrf_rtc_counter_get(portNRF_RTC_REG));
} else {
NRF_LOG_INFO("Error retrieving current time: %d", error->status);
}

View File

@ -29,11 +29,22 @@ int CurrentTimeService::OnTimeAccessed(uint16_t conn_handle, uint16_t attr_handl
CtsData result;
os_mbuf_copydata(ctxt->om, 0, sizeof(CtsData), &result);
NRF_LOG_INFO(
"Received data: %d-%d-%d %d:%d:%d", result.year, result.month, result.dayofmonth, result.hour, result.minute, result.second);
NRF_LOG_INFO("Received data: %d-%d-%d %d:%d:%d",
result.year,
result.month,
result.dayofmonth,
result.hour,
result.minute,
result.second);
m_dateTimeController.SetTime(
result.year, result.month, result.dayofmonth, 0, result.hour, result.minute, result.second, nrf_rtc_counter_get(portNRF_RTC_REG));
m_dateTimeController.SetTime(result.year,
result.month,
result.dayofmonth,
0,
result.hour,
result.minute,
result.second,
nrf_rtc_counter_get(portNRF_RTC_REG));
} else if (ctxt->op == BLE_GATT_ACCESS_OP_READ_CHR) {
CtsData currentDateTime;

View File

@ -3,6 +3,7 @@
#include "components/ble/BleController.h"
#include "drivers/SpiNorFlash.h"
#include "systemtask/SystemTask.h"
#include <nrf_log.h>
using namespace Pinetime::Controllers;
@ -118,8 +119,10 @@ int DfuService::WritePacketHandler(uint16_t connectionHandle, os_mbuf* om) {
bootloaderSize = om->om_data[4] + (om->om_data[5] << 8) + (om->om_data[6] << 16) + (om->om_data[7] << 24);
applicationSize = om->om_data[8] + (om->om_data[9] << 8) + (om->om_data[10] << 16) + (om->om_data[11] << 24);
bleController.FirmwareUpdateTotalBytes(applicationSize);
NRF_LOG_INFO(
"[DFU] -> Start data received : SD size : %d, BT size : %d, app size : %d", softdeviceSize, bootloaderSize, applicationSize);
NRF_LOG_INFO("[DFU] -> Start data received : SD size : %d, BT size : %d, app size : %d",
softdeviceSize,
bootloaderSize,
applicationSize);
// wait until SystemTask has finished waking up all devices
while (systemTask.IsSleeping()) {
@ -164,10 +167,10 @@ int DfuService::WritePacketHandler(uint16_t connectionHandle, os_mbuf* om) {
if ((nbPacketReceived % nbPacketsToNotify) == 0 && bytesReceived != applicationSize) {
uint8_t data[5] {static_cast<uint8_t>(Opcodes::PacketReceiptNotification),
(uint8_t)(bytesReceived & 0x000000FFu),
(uint8_t)(bytesReceived >> 8u),
(uint8_t)(bytesReceived >> 16u),
(uint8_t)(bytesReceived >> 24u)};
static_cast<uint8_t>(bytesReceived & 0x000000FFu),
static_cast<uint8_t>(bytesReceived >> 8u),
static_cast<uint8_t>(bytesReceived >> 16u),
static_cast<uint8_t>(bytesReceived >> 24u)};
NRF_LOG_INFO("[DFU] -> Send packet notification: %d bytes received", bytesReceived);
notificationManager.Send(connectionHandle, controlPointCharacteristicHandle, data, 5);
}
@ -243,7 +246,7 @@ int DfuService::ControlPointHandler(uint16_t connectionHandle, os_mbuf* om) {
NRF_LOG_INFO("[DFU] -> Receive firmware image requested, but we are not in Start Init");
return 0;
}
// TODO the chunk size is dependant of the implementation of the host application...
// TODO the chunk size is dependent of the implementation of the host application...
dfuImage.Init(20, applicationSize, expectedCrc);
NRF_LOG_INFO("[DFU] -> Starting receive firmware");
state = States::Data;
@ -422,9 +425,9 @@ uint16_t DfuService::DfuImage::ComputeCrc(uint8_t const* p_data, uint32_t size,
uint16_t crc = (p_crc == NULL) ? 0xFFFF : *p_crc;
for (uint32_t i = 0; i < size; i++) {
crc = (uint8_t)(crc >> 8) | (crc << 8);
crc = static_cast<uint8_t>(crc >> 8) | (crc << 8);
crc ^= p_data[i];
crc ^= (uint8_t)(crc & 0xFF) >> 4;
crc ^= static_cast<uint8_t>(crc & 0xFF) >> 4;
crc ^= (crc << 8) << 4;
crc ^= ((crc & 0xFF) << 4) << 1;
}

View File

@ -81,7 +81,7 @@ int FSService::FSCommandHandler(uint16_t connectionHandle, os_mbuf* om) {
return -1;
}
memcpy(filepath, header->pathstr, plen);
filepath[plen] = 0; // Copy and null teminate string
filepath[plen] = 0; // Copy and null terminate string
ReadResponse resp;
os_mbuf* om;
resp.command = commands::READ_DATA;
@ -148,7 +148,7 @@ int FSService::FSCommandHandler(uint16_t connectionHandle, os_mbuf* om) {
return -1; // TODO make this actually return a BLE notif
}
memcpy(filepath, header->pathstr, plen);
filepath[plen] = 0; // Copy and null teminate string
filepath[plen] = 0; // Copy and null terminate string
fileSize = header->totalSize;
WriteResponse resp;
resp.command = commands::WRITE_PACING;
@ -193,7 +193,7 @@ int FSService::FSCommandHandler(uint16_t connectionHandle, os_mbuf* om) {
uint16_t plen = header->pathlen;
char path[plen + 1] = {0};
memcpy(path, header->pathstr, plen);
path[plen] = 0; // Copy and null teminate string
path[plen] = 0; // Copy and null terminate string
DelResponse resp {};
resp.command = commands::DELETE_STATUS;
int res = fs.FileDelete(path);
@ -208,7 +208,7 @@ int FSService::FSCommandHandler(uint16_t connectionHandle, os_mbuf* om) {
uint16_t plen = header->pathlen;
char path[plen + 1] = {0};
memcpy(path, header->pathstr, plen);
path[plen] = 0; // Copy and null teminate string
path[plen] = 0; // Copy and null terminate string
MKDirResponse resp {};
resp.command = commands::MKDIR_STATUS;
resp.modification_time = 0;
@ -223,7 +223,7 @@ int FSService::FSCommandHandler(uint16_t connectionHandle, os_mbuf* om) {
ListDirHeader* header = (ListDirHeader*) om->om_data;
uint16_t plen = header->pathlen;
char path[plen + 1] = {0};
path[plen] = 0; // Copy and null teminate string
path[plen] = 0; // Copy and null terminate string
memcpy(path, header->pathstr, plen);
ListDirResponse resp {};
@ -290,7 +290,7 @@ int FSService::FSCommandHandler(uint16_t connectionHandle, os_mbuf* om) {
header->pathstr[plen] = 0;
char path[header->NewPathLength + 1] = {0};
memcpy(path, &header->pathstr[plen + 1], header->NewPathLength);
path[header->NewPathLength] = 0; // Copy and null teminate string
path[header->NewPathLength] = 0; // Copy and null terminate string
MoveResponse resp {};
resp.command = commands::MOVE_STATUS;
int8_t res = (int8_t) fs.Rename(header->pathstr, path);

View File

@ -1,6 +1,7 @@
#include "components/ble/HeartRateService.h"
#include "components/heartrate/HeartRateController.h"
#include "systemtask/SystemTask.h"
#include <nrf_log.h>
using namespace Pinetime::Controllers;
@ -56,7 +57,8 @@ int HeartRateService::OnHeartRateRequested(uint16_t connectionHandle, uint16_t a
}
void HeartRateService::OnNewHeartRateValue(uint8_t heartRateValue) {
if(!heartRateMeasurementNotificationEnable) return;
if (!heartRateMeasurementNotificationEnable)
return;
uint8_t buffer[2] = {0, heartRateController.HeartRate()}; // [0] = flags, [1] = hr value
auto* om = ble_hs_mbuf_from_flat(buffer, 2);
@ -71,11 +73,11 @@ void HeartRateService::OnNewHeartRateValue(uint8_t heartRateValue) {
}
void HeartRateService::SubscribeNotification(uint16_t connectionHandle, uint16_t attributeHandle) {
if(attributeHandle == heartRateMeasurementHandle)
if (attributeHandle == heartRateMeasurementHandle)
heartRateMeasurementNotificationEnable = true;
}
void HeartRateService::UnsubscribeNotification(uint16_t connectionHandle, uint16_t attributeHandle) {
if(attributeHandle == heartRateMeasurementHandle)
if (attributeHandle == heartRateMeasurementHandle)
heartRateMeasurementNotificationEnable = false;
}

View File

@ -1,16 +1,15 @@
#include "components/ble/MotionService.h"
#include "components/motion/MotionController.h"
#include "systemtask/SystemTask.h"
#include <nrf_log.h>
using namespace Pinetime::Controllers;
namespace {
// 0003yyxx-78fc-48fe-8e23-433b3a1942d0
constexpr ble_uuid128_t CharUuid(uint8_t x, uint8_t y) {
return ble_uuid128_t{
.u = {.type = BLE_UUID_TYPE_128},
.value = { 0xd0, 0x42, 0x19, 0x3a, 0x3b, 0x43, 0x23, 0x8e, 0xfe, 0x48, 0xfc, 0x78, x, y, 0x03, 0x00 }
};
return ble_uuid128_t {.u = {.type = BLE_UUID_TYPE_128},
.value = {0xd0, 0x42, 0x19, 0x3a, 0x3b, 0x43, 0x23, 0x8e, 0xfe, 0x48, 0xfc, 0x78, x, y, 0x03, 0x00}};
}
// 00030000-78fc-48fe-8e23-433b3a1942d0
@ -44,11 +43,7 @@ MotionService::MotionService(Pinetime::System::SystemTask& system, Controllers::
.val_handle = &motionValuesHandle},
{0}},
serviceDefinition {
{
.type = BLE_GATT_SVC_TYPE_PRIMARY,
.uuid = &motionServiceUuid.u,
.characteristics = characteristicDefinition
},
{.type = BLE_GATT_SVC_TYPE_PRIMARY, .uuid = &motionServiceUuid.u, .characteristics = characteristicDefinition},
{0},
} {
// TODO refactor to prevent this loop dependency (service depends on controller and controller depends on service)
@ -71,8 +66,8 @@ int MotionService::OnStepCountRequested(uint16_t connectionHandle, uint16_t attr
int res = os_mbuf_append(context->om, &buffer, 4);
return (res == 0) ? 0 : BLE_ATT_ERR_INSUFFICIENT_RES;
} else if(attributeHandle == motionValuesHandle) {
int16_t buffer[3] = { motionController.X(), motionController.Y(), motionController.Z() };
} else if (attributeHandle == motionValuesHandle) {
int16_t buffer[3] = {motionController.X(), motionController.Y(), motionController.Z()};
int res = os_mbuf_append(context->om, buffer, 3 * sizeof(int16_t));
return (res == 0) ? 0 : BLE_ATT_ERR_INSUFFICIENT_RES;
@ -81,7 +76,8 @@ int MotionService::OnStepCountRequested(uint16_t connectionHandle, uint16_t attr
}
void MotionService::OnNewStepCountValue(uint32_t stepCount) {
if(!stepCountNoficationEnabled) return;
if (!stepCountNoficationEnabled)
return;
uint32_t buffer = stepCount;
auto* om = ble_hs_mbuf_from_flat(&buffer, 4);
@ -95,9 +91,10 @@ void MotionService::OnNewStepCountValue(uint32_t stepCount) {
ble_gattc_notify_custom(connectionHandle, stepCountHandle, om);
}
void MotionService::OnNewMotionValues(int16_t x, int16_t y, int16_t z) {
if(!motionValuesNoficationEnabled) return;
if (!motionValuesNoficationEnabled)
return;
int16_t buffer[3] = { motionController.X(), motionController.Y(), motionController.Z() };
int16_t buffer[3] = {motionController.X(), motionController.Y(), motionController.Z()};
auto* om = ble_hs_mbuf_from_flat(buffer, 3 * sizeof(int16_t));
uint16_t connectionHandle = system.nimble().connHandle();
@ -110,15 +107,15 @@ void MotionService::OnNewMotionValues(int16_t x, int16_t y, int16_t z) {
}
void MotionService::SubscribeNotification(uint16_t connectionHandle, uint16_t attributeHandle) {
if(attributeHandle == stepCountHandle)
if (attributeHandle == stepCountHandle)
stepCountNoficationEnabled = true;
else if(attributeHandle == motionValuesHandle)
else if (attributeHandle == motionValuesHandle)
motionValuesNoficationEnabled = true;
}
void MotionService::UnsubscribeNotification(uint16_t connectionHandle, uint16_t attributeHandle) {
if(attributeHandle == stepCountHandle)
if (attributeHandle == stepCountHandle)
stepCountNoficationEnabled = false;
else if(attributeHandle == motionValuesHandle)
else if (attributeHandle == motionValuesHandle)
motionValuesNoficationEnabled = false;
}

View File

@ -17,14 +17,13 @@
*/
#include "components/ble/MusicService.h"
#include "systemtask/SystemTask.h"
#include <cstring>
namespace {
// 0000yyxx-78fc-48fe-8e23-433b3a1942d0
constexpr ble_uuid128_t CharUuid(uint8_t x, uint8_t y) {
return ble_uuid128_t{
.u = {.type = BLE_UUID_TYPE_128},
.value = { 0xd0, 0x42, 0x19, 0x3a, 0x3b, 0x43, 0x23, 0x8e, 0xfe, 0x48, 0xfc, 0x78, x, y, 0x00, 0x00 }
};
return ble_uuid128_t {.u = {.type = BLE_UUID_TYPE_128},
.value = {0xd0, 0x42, 0x19, 0x3a, 0x3b, 0x43, 0x23, 0x8e, 0xfe, 0x48, 0xfc, 0x78, x, y, 0x00, 0x00}};
}
// 00000000-78fc-48fe-8e23-433b3a1942d0
@ -47,6 +46,8 @@ namespace {
constexpr ble_uuid128_t msRepeatCharUuid {CharUuid(0x0b, 0x00)};
constexpr ble_uuid128_t msShuffleCharUuid {CharUuid(0x0c, 0x00)};
constexpr uint8_t MaxStringSize {40};
int MusicCallback(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt, void* arg) {
return static_cast<Pinetime::Controllers::MusicService*>(arg)->OnCommand(conn_handle, attr_handle, ctxt);
}
@ -108,8 +109,7 @@ Pinetime::Controllers::MusicService::MusicService(Pinetime::System::SystemTask&
.flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ};
characteristicDefinition[13] = {0};
serviceDefinition[0] = {
.type = BLE_GATT_SVC_TYPE_PRIMARY, .uuid = &msUuid.u, .characteristics = characteristicDefinition};
serviceDefinition[0] = {.type = BLE_GATT_SVC_TYPE_PRIMARY, .uuid = &msUuid.u, .characteristics = characteristicDefinition};
serviceDefinition[1] = {0};
}
@ -125,9 +125,21 @@ void Pinetime::Controllers::MusicService::Init() {
int Pinetime::Controllers::MusicService::OnCommand(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt) {
if (ctxt->op == BLE_GATT_ACCESS_OP_WRITE_CHR) {
size_t notifSize = OS_MBUF_PKTLEN(ctxt->om);
char data[notifSize + 1];
data[notifSize] = '\0';
os_mbuf_copydata(ctxt->om, 0, notifSize, data);
size_t bufferSize = notifSize;
if (notifSize > MaxStringSize) {
bufferSize = MaxStringSize;
}
char data[bufferSize + 1];
os_mbuf_copydata(ctxt->om, 0, bufferSize, data);
if (notifSize > bufferSize) {
data[bufferSize - 1] = '.';
data[bufferSize - 2] = '.';
data[bufferSize - 3] = '.';
}
data[bufferSize] = '\0';
char* s = &data[0];
if (ble_uuid_cmp(ctxt->chr->uuid, &msArtistCharUuid.u) == 0) {
artistName = s;
@ -137,12 +149,21 @@ int Pinetime::Controllers::MusicService::OnCommand(uint16_t conn_handle, uint16_
albumName = s;
} else if (ble_uuid_cmp(ctxt->chr->uuid, &msStatusCharUuid.u) == 0) {
playing = s[0];
// These variables need to be updated, because the progress may not be updated immediately,
// leading to getProgress() returning an incorrect position.
if (playing) {
trackProgressUpdateTime = xTaskGetTickCount();
} else {
trackProgress +=
static_cast<int>((static_cast<float>(xTaskGetTickCount() - trackProgressUpdateTime) / 1024.0f) * getPlaybackSpeed());
}
} else if (ble_uuid_cmp(ctxt->chr->uuid, &msRepeatCharUuid.u) == 0) {
repeat = s[0];
} else if (ble_uuid_cmp(ctxt->chr->uuid, &msShuffleCharUuid.u) == 0) {
shuffle = s[0];
} else if (ble_uuid_cmp(ctxt->chr->uuid, &msPositionCharUuid.u) == 0) {
trackProgress = (s[0] << 24) | (s[1] << 16) | (s[2] << 8) | s[3];
trackProgressUpdateTime = xTaskGetTickCount();
} else if (ble_uuid_cmp(ctxt->chr->uuid, &msTotalLengthCharUuid.u) == 0) {
trackLength = (s[0] << 24) | (s[1] << 16) | (s[2] << 8) | s[3];
} else if (ble_uuid_cmp(ctxt->chr->uuid, &msTrackNumberCharUuid.u) == 0) {
@ -177,6 +198,10 @@ float Pinetime::Controllers::MusicService::getPlaybackSpeed() const {
}
int Pinetime::Controllers::MusicService::getProgress() const {
if (isPlaying()) {
return trackProgress +
static_cast<int>((static_cast<float>(xTaskGetTickCount() - trackProgressUpdateTime) / 1024.0f) * getPlaybackSpeed());
}
return trackProgress;
}

View File

@ -81,6 +81,7 @@ namespace Pinetime {
int trackLength {0};
int trackNumber {};
int tracksTotal {};
TickType_t trackProgressUpdateTime {0};
float playbackSpeed {1.0f};

View File

@ -46,15 +46,23 @@ namespace {
} // namespace
Pinetime::Controllers::NavigationService::NavigationService(Pinetime::System::SystemTask& system) : m_system(system) {
characteristicDefinition[0] = {
.uuid = &navFlagCharUuid.u, .access_cb = NAVCallback, .arg = this, .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ};
characteristicDefinition[0] = {.uuid = &navFlagCharUuid.u,
.access_cb = NAVCallback,
.arg = this,
.flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ};
characteristicDefinition[1] = {
.uuid = &navNarrativeCharUuid.u, .access_cb = NAVCallback, .arg = this, .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ};
characteristicDefinition[2] = {
.uuid = &navManDistCharUuid.u, .access_cb = NAVCallback, .arg = this, .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ};
characteristicDefinition[3] = {
.uuid = &navProgressCharUuid.u, .access_cb = NAVCallback, .arg = this, .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ};
characteristicDefinition[1] = {.uuid = &navNarrativeCharUuid.u,
.access_cb = NAVCallback,
.arg = this,
.flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ};
characteristicDefinition[2] = {.uuid = &navManDistCharUuid.u,
.access_cb = NAVCallback,
.arg = this,
.flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ};
characteristicDefinition[3] = {.uuid = &navProgressCharUuid.u,
.access_cb = NAVCallback,
.arg = this,
.flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ};
characteristicDefinition[4] = {0};

View File

@ -2,6 +2,7 @@
#include <cstring>
#include <hal/nrf_rtc.h>
#include <nrf_log.h>
#define min // workaround: nimble's min/max macros conflict with libstdc++
#define max
#include <host/ble_gap.h>
@ -23,18 +24,17 @@
using namespace Pinetime::Controllers;
NimbleController::NimbleController(Pinetime::System::SystemTask& systemTask,
Pinetime::Controllers::Ble& bleController,
Ble& bleController,
DateTime& dateTimeController,
Pinetime::Controllers::NotificationManager& notificationManager,
Controllers::Battery& batteryController,
NotificationManager& notificationManager,
Battery& batteryController,
Pinetime::Drivers::SpiNorFlash& spiNorFlash,
Controllers::HeartRateController& heartRateController,
Controllers::MotionController& motionController,
Controllers::FS& fs)
HeartRateController& heartRateController,
MotionController& motionController,
FS& fs)
: systemTask {systemTask},
bleController {bleController},
dateTimeController {dateTimeController},
notificationManager {notificationManager},
spiNorFlash {spiNorFlash},
fs {fs},
dfuService {systemTask, bleController, spiNorFlash},
@ -51,6 +51,7 @@ NimbleController::NimbleController(Pinetime::System::SystemTask& systemTask,
heartRateService {systemTask, heartRateController},
motionService {systemTask, motionController},
fsService {systemTask, fs},
agendaService {systemTask},
serviceDiscovery({&currentTimeClient, &alertNotificationClient}) {
}
@ -76,6 +77,7 @@ int GAPEventCallback(struct ble_gap_event* event, void* arg) {
void NimbleController::Init() {
while (!ble_hs_synced()) {
vTaskDelay(10);
}
nptr = this;
@ -92,6 +94,7 @@ void NimbleController::Init() {
musicService.Init();
weatherService.Init();
navService.Init();
agendaService.Init();
anService.Init();
dfuService.Init();
batteryInformationService.Init();
@ -184,7 +187,9 @@ int NimbleController::OnGAPEvent(ble_gap_event* event) {
case BLE_GAP_EVENT_ADV_COMPLETE:
NRF_LOG_INFO("Advertising event : BLE_GAP_EVENT_ADV_COMPLETE");
NRF_LOG_INFO("reason=%d; status=%0X", event->adv_complete.reason, event->connect.status);
if (bleController.IsRadioEnabled() && !bleController.IsConnected()) {
StartAdvertising();
}
break;
case BLE_GAP_EVENT_CONNECT:
@ -220,9 +225,11 @@ int NimbleController::OnGAPEvent(ble_gap_event* event) {
currentTimeClient.Reset();
alertNotificationClient.Reset();
connectionHandle = BLE_HS_CONN_HANDLE_NONE;
if (bleController.IsConnected()) {
bleController.Disconnect();
fastAdvCount = 0;
StartAdvertising();
}
break;
case BLE_GAP_EVENT_CONN_UPDATE:
@ -278,7 +285,28 @@ int NimbleController::OnGAPEvent(ble_gap_event* event) {
if (event->passkey.params.action == BLE_SM_IOACT_DISP) {
struct ble_sm_io pkey = {0};
pkey.action = event->passkey.params.action;
pkey.passkey = ble_ll_rand() % 1000000;
/*
* Passkey is a 6 digits code (1'000'000 possibilities).
* It is important every possible value has an equal probability
* of getting generated. Simply applying a modulo creates a bias
* since 2^32 is not a multiple of 1'000'000.
* To prevent that, we can reject values greater than 999'999.
*
* Rejecting values would happen a lot since 2^32-1 is way greater
* than 1'000'000. An optimisation is to use a multiple of 1'000'000.
* The greatest multiple of 1'000'000 lesser than 2^32-1 is
* 4'294'000'000.
*
* Great explanation at:
* https://research.kudelskisecurity.com/2020/07/28/the-definitive-guide-to-modulo-bias-and-how-to-avoid-it/
*/
uint32_t passkey_rand;
do {
passkey_rand = ble_ll_rand();
} while (passkey_rand > 4293999999);
pkey.passkey = passkey_rand % 1000000;
bleController.SetPairingKey(pkey.passkey);
systemTask.PushMessage(Pinetime::System::Messages::OnPairing);
ble_sm_inject_io(event->passkey.conn_handle, &pkey);
@ -376,6 +404,23 @@ void NimbleController::NotifyBatteryLevel(uint8_t level) {
}
}
void NimbleController::EnableRadio() {
bleController.EnableRadio();
bleController.Disconnect();
fastAdvCount = 0;
StartAdvertising();
}
void NimbleController::DisableRadio() {
bleController.DisableRadio();
if (bleController.IsConnected()) {
ble_gap_terminate(connectionHandle, BLE_ERR_REM_USER_CONN_TERM);
bleController.Disconnect();
} else {
ble_gap_adv_stop();
}
}
void NimbleController::PersistBond(struct ble_gap_conn_desc& desc) {
union ble_store_key key;
union ble_store_value our_sec, peer_sec, peer_cccd_set[MYNEWT_VAL(BLE_STORE_MAX_CCCDS)] = {0};

View File

@ -14,15 +14,16 @@
#include "components/ble/CurrentTimeService.h"
#include "components/ble/DeviceInformationService.h"
#include "components/ble/DfuService.h"
#include "components/ble/FSService.h"
#include "components/ble/HeartRateService.h"
#include "components/ble/ImmediateAlertService.h"
#include "components/ble/MusicService.h"
#include "components/ble/NavigationService.h"
#include "components/ble/ServiceDiscovery.h"
#include "components/ble/MotionService.h"
#include "components/ble/AgendaService.h"
#include "components/ble/weather/WeatherService.h"
#include "components/fs/FS.h"
#include "components/ble/FSService.h"
namespace Pinetime {
namespace Drivers {
@ -42,27 +43,17 @@ namespace Pinetime {
public:
NimbleController(Pinetime::System::SystemTask& systemTask,
Pinetime::Controllers::Ble& bleController,
Ble& bleController,
DateTime& dateTimeController,
Pinetime::Controllers::NotificationManager& notificationManager,
Controllers::Battery& batteryController,
NotificationManager& notificationManager,
Battery& batteryController,
Pinetime::Drivers::SpiNorFlash& spiNorFlash,
Controllers::HeartRateController& heartRateController,
Controllers::MotionController& motionController,
Pinetime::Controllers::FS& fs);
HeartRateController& heartRateController,
MotionController& motionController,
FS& fs);
void Init();
void StartAdvertising();
int OnGAPEvent(ble_gap_event* event);
int OnDiscoveryEvent(uint16_t i, const ble_gatt_error* pError, const ble_gatt_svc* pSvc);
int OnCTSCharacteristicDiscoveryEvent(uint16_t connectionHandle, const ble_gatt_error* error, const ble_gatt_chr* characteristic);
int OnANSCharacteristicDiscoveryEvent(uint16_t connectionHandle, const ble_gatt_error* error, const ble_gatt_chr* characteristic);
int OnCurrentTimeReadResult(uint16_t connectionHandle, const ble_gatt_error* error, ble_gatt_attr* attribute);
int OnANSDescriptorDiscoveryEventCallback(uint16_t connectionHandle,
const ble_gatt_error* error,
uint16_t characteristicValueHandle,
const ble_gatt_dsc* descriptor);
void StartDiscovery();
Pinetime::Controllers::MusicService& music() {
@ -71,6 +62,9 @@ namespace Pinetime {
Pinetime::Controllers::NavigationService& navigation() {
return navService;
};
Pinetime::Controllers::AgendaService& agenda() {
return agendaService;
};
Pinetime::Controllers::AlertNotificationService& alertService() {
return anService;
};
@ -83,7 +77,10 @@ namespace Pinetime {
void RestartFastAdv() {
fastAdvCount = 0;
}
};
void EnableRadio();
void DisableRadio();
private:
void PersistBond(struct ble_gap_conn_desc& desc);
@ -91,12 +88,11 @@ namespace Pinetime {
static constexpr const char* deviceName = "InfiniTime";
Pinetime::System::SystemTask& systemTask;
Pinetime::Controllers::Ble& bleController;
Ble& bleController;
DateTime& dateTimeController;
Pinetime::Controllers::NotificationManager& notificationManager;
Pinetime::Drivers::SpiNorFlash& spiNorFlash;
Pinetime::Controllers::FS& fs;
Pinetime::Controllers::DfuService dfuService;
FS& fs;
DfuService dfuService;
DeviceInformationService deviceInformationService;
CurrentTimeClient currentTimeClient;
@ -111,6 +107,7 @@ namespace Pinetime {
HeartRateService heartRateService;
MotionService motionService;
FSService fsService;
AgendaService agendaService;
ServiceDiscovery serviceDiscovery;
uint8_t addrType;

View File

@ -127,7 +127,8 @@ namespace Pinetime {
{.uuid = &weatherControlCharUuid.u, .access_cb = WeatherCallback, .arg = this, .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ},
{nullptr}};
const struct ble_gatt_svc_def serviceDefinition[2] = {
{.type = BLE_GATT_SVC_TYPE_PRIMARY, .uuid = &weatherUuid.u, .characteristics = characteristicDefinition}, {0}};
{.type = BLE_GATT_SVC_TYPE_PRIMARY, .uuid = &weatherUuid.u, .characteristics = characteristicDefinition},
{0}};
uint16_t eventHandle {};

View File

@ -11,13 +11,22 @@ namespace {
char const* MonthsStringLow[] = {"--", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
}
DateTime::DateTime(Controllers::Settings& settingsController) : settingsController {settingsController} {
}
void DateTime::SetCurrentTime(std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> t) {
this->currentDateTime = t;
UpdateTime(previousSystickCounter); // Update internal state without updating the time
}
void DateTime::SetTime(
uint16_t year, uint8_t month, uint8_t day, uint8_t dayOfWeek, uint8_t hour, uint8_t minute, uint8_t second, uint32_t systickCounter) {
void DateTime::SetTime(uint16_t year,
uint8_t month,
uint8_t day,
uint8_t dayOfWeek,
uint8_t hour,
uint8_t minute,
uint8_t second,
uint32_t systickCounter) {
std::tm tm = {
/* .tm_sec = */ second,
/* .tm_min = */ minute,
@ -36,6 +45,8 @@ void DateTime::SetTime(
UpdateTime(systickCounter);
NRF_LOG_INFO("* %d %d %d ", this->hour, this->minute, this->second);
NRF_LOG_INFO("* %d %d %d ", this->day, this->month, this->year);
systemTask->PushMessage(System::Messages::OnNewTime);
}
void DateTime::UpdateTime(uint32_t systickCounter) {
@ -75,6 +86,24 @@ void DateTime::UpdateTime(uint32_t systickCounter) {
minute = time.minutes().count();
second = time.seconds().count();
if (minute == 0 && !isHourAlreadyNotified) {
isHourAlreadyNotified = true;
if (systemTask != nullptr) {
systemTask->PushMessage(System::Messages::OnNewHour);
}
} else if (minute != 0) {
isHourAlreadyNotified = false;
}
if ((minute == 0 || minute == 30) && !isHalfHourAlreadyNotified) {
isHalfHourAlreadyNotified = true;
if (systemTask != nullptr) {
systemTask->PushMessage(System::Messages::OnNewHalfHour);
}
} else if (minute != 0 && minute != 30) {
isHalfHourAlreadyNotified = false;
}
// Notify new day to SystemTask
if (hour == 0 and not isMidnightAlreadyNotified) {
isMidnightAlreadyNotified = true;
@ -85,11 +114,11 @@ void DateTime::UpdateTime(uint32_t systickCounter) {
}
}
const char* DateTime::MonthShortToString() {
const char* DateTime::MonthShortToString() const {
return MonthsString[static_cast<uint8_t>(month)];
}
const char* DateTime::DayOfWeekShortToString() {
const char* DateTime::DayOfWeekShortToString() const {
return DaysStringShort[static_cast<uint8_t>(dayOfWeek)];
}
@ -101,3 +130,23 @@ void DateTime::Register(Pinetime::System::SystemTask* systemTask) {
this->systemTask = systemTask;
}
using ClockType = Pinetime::Controllers::Settings::ClockType;
std::string DateTime::FormattedTime() {
// Return time as a string in 12- or 24-hour format
char buff[9];
if (settingsController.GetClockType() == ClockType::H12) {
uint8_t hour12;
const char* amPmStr;
if (hour < 12) {
hour12 = (hour == 0) ? 12 : hour;
amPmStr = "AM";
} else {
hour12 = (hour == 12) ? 12 : hour - 12;
amPmStr = "PM";
}
sprintf(buff, "%i:%02i %s", hour12, minute, amPmStr);
} else {
sprintf(buff, "%02i:%02i", hour, minute);
}
return std::string(buff);
}

View File

@ -2,6 +2,8 @@
#include <cstdint>
#include <chrono>
#include <string>
#include "components/settings/Settings.h"
namespace Pinetime {
namespace System {
@ -10,6 +12,7 @@ namespace Pinetime {
namespace Controllers {
class DateTime {
public:
DateTime(Controllers::Settings& settingsController);
enum class Days : uint8_t { Unknown, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday };
enum class Months : uint8_t {
Unknown,
@ -58,8 +61,8 @@ namespace Pinetime {
return second;
}
const char* MonthShortToString();
const char* DayOfWeekShortToString();
const char* MonthShortToString() const;
const char* DayOfWeekShortToString() const;
static const char* MonthShortToStringLow(Months month);
std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> CurrentDateTime() const {
@ -71,6 +74,7 @@ namespace Pinetime {
void Register(System::SystemTask* systemTask);
void SetCurrentTime(std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> t);
std::string FormattedTime();
private:
uint16_t year = 0;
@ -86,7 +90,10 @@ namespace Pinetime {
std::chrono::seconds uptime {0};
bool isMidnightAlreadyNotified = false;
bool isHourAlreadyNotified = true;
bool isHalfHourAlreadyNotified = true;
System::SystemTask* systemTask = nullptr;
Controllers::Settings& settingsController;
};
}
}

View File

@ -95,8 +95,8 @@ int FS::DirRewind(lfs_dir_t* dir) {
int FS::DirCreate(const char* path) {
return lfs_mkdir(&lfs, path);
}
int FS::Rename(const char* oldPath, const char* newPath){
return lfs_rename(&lfs,oldPath,newPath);
int FS::Rename(const char* oldPath, const char* newPath) {
return lfs_rename(&lfs, oldPath, newPath);
}
int FS::Stat(const char* path, lfs_info* info) {
return lfs_stat(&lfs, path, info);

View File

@ -1,6 +1,8 @@
#pragma once
#include <array>
#include <cstddef>
#include <cstdint>
#include "components/heartrate/Biquad.h"
#include "components/heartrate/Ptagc.h"

View File

@ -1,5 +1,5 @@
#include "components/motion/MotionController.h"
#include "os/os_cputime.h"
using namespace Pinetime::Controllers;
void MotionController::Update(int16_t x, int16_t y, int16_t z, uint32_t nbSteps) {
@ -7,7 +7,7 @@ void MotionController::Update(int16_t x, int16_t y, int16_t z, uint32_t nbSteps)
service->OnNewStepCountValue(nbSteps);
}
if(service != nullptr && (this->x != x || this->y != y || this->z != z)) {
if (service != nullptr && (this->x != x || this->y != y || this->z != z)) {
service->OnNewMotionValues(x, y, z);
}
@ -21,7 +21,7 @@ void MotionController::Update(int16_t x, int16_t y, int16_t z, uint32_t nbSteps)
}
}
bool MotionController::ShouldWakeUp(bool isSleeping) {
bool MotionController::Should_RaiseWake(bool isSleeping) {
if ((x + 335) <= 670 && z < 0) {
if (not isSleeping) {
if (y <= 0) {
@ -43,6 +43,29 @@ bool MotionController::ShouldWakeUp(bool isSleeping) {
}
return false;
}
bool MotionController::Should_ShakeWake(uint16_t thresh) {
bool wake = false;
auto diff = xTaskGetTickCount() - lastShakeTime;
lastShakeTime = xTaskGetTickCount();
/* Currently Polling at 10hz, If this ever goes faster scalar and EMA might need adjusting */
int32_t speed = std::abs(z + (y / 2) + (x / 4) - lastYForShake - lastZForShake) / diff * 100;
//(.2 * speed) + ((1 - .2) * accumulatedspeed);
// implemented without floats as .25Alpha
accumulatedspeed = (speed / 5) + ((accumulatedspeed / 5) * 4);
if (accumulatedspeed > thresh) {
wake = true;
}
lastXForShake = x / 4;
lastYForShake = y / 2;
lastZForShake = z;
return wake;
}
int32_t MotionController::currentShakeSpeed() {
return accumulatedspeed;
}
void MotionController::IsSensorOk(bool isOk) {
isSensorOk = isOk;
}

View File

@ -35,8 +35,10 @@ namespace Pinetime {
uint32_t GetTripSteps() const {
return currentTripSteps;
}
bool ShouldWakeUp(bool isSleeping);
bool Should_ShakeWake(uint16_t thresh);
bool Should_RaiseWake(bool isSleeping);
int32_t currentShakeSpeed();
void IsSensorOk(bool isOk);
bool IsSensorOk() const {
return isSensorOk;
@ -59,6 +61,12 @@ namespace Pinetime {
bool isSensorOk = false;
DeviceTypes deviceType = DeviceTypes::Unknown;
Pinetime::Controllers::MotionService* service = nullptr;
int16_t lastXForShake = 0;
int16_t lastYForShake = 0;
int16_t lastZForShake = 0;
int32_t accumulatedspeed = 0;
uint32_t lastShakeTime = 0;
};
}
}

View File

@ -1,43 +1,39 @@
#include "components/motor/MotorController.h"
#include <hal/nrf_gpio.h>
#include "systemtask/SystemTask.h"
#include "app_timer.h"
#include "drivers/PinMap.h"
APP_TIMER_DEF(shortVibTimer);
APP_TIMER_DEF(longVibTimer);
using namespace Pinetime::Controllers;
void MotorController::Init() {
nrf_gpio_cfg_output(PinMap::Motor);
nrf_gpio_pin_set(PinMap::Motor);
app_timer_init();
app_timer_create(&shortVibTimer, APP_TIMER_MODE_SINGLE_SHOT, StopMotor);
app_timer_create(&longVibTimer, APP_TIMER_MODE_REPEATED, Ring);
shortVib = xTimerCreate("shortVib", 1, pdFALSE, nullptr, StopMotor);
longVib = xTimerCreate("longVib", pdMS_TO_TICKS(1000), pdTRUE, this, Ring);
}
void MotorController::Ring(void* p_context) {
auto* motorController = static_cast<MotorController*>(p_context);
void MotorController::Ring(TimerHandle_t xTimer) {
auto* motorController = static_cast<MotorController*>(pvTimerGetTimerID(xTimer));
motorController->RunForDuration(50);
}
void MotorController::RunForDuration(uint8_t motorDuration) {
if (xTimerChangePeriod(shortVib, pdMS_TO_TICKS(motorDuration), 0) == pdPASS && xTimerStart(shortVib, 0) == pdPASS) {
nrf_gpio_pin_clear(PinMap::Motor);
app_timer_start(shortVibTimer, APP_TIMER_TICKS(motorDuration), nullptr);
}
}
void MotorController::StartRinging() {
Ring(this);
app_timer_start(longVibTimer, APP_TIMER_TICKS(1000), this);
RunForDuration(50);
xTimerStart(longVib, 0);
}
void MotorController::StopRinging() {
app_timer_stop(longVibTimer);
xTimerStop(longVib, 0);
nrf_gpio_pin_set(PinMap::Motor);
}
void MotorController::StopMotor(void* p_context) {
void MotorController::StopMotor(TimerHandle_t xTimer) {
nrf_gpio_pin_set(PinMap::Motor);
}

View File

@ -1,5 +1,7 @@
#pragma once
#include <FreeRTOS.h>
#include <timers.h>
#include <cstdint>
namespace Pinetime {
@ -12,11 +14,13 @@ namespace Pinetime {
void Init();
void RunForDuration(uint8_t motorDuration);
void StartRinging();
static void StopRinging();
void StopRinging();
private:
static void Ring(void* p_context);
static void StopMotor(void* p_context);
static void Ring(TimerHandle_t xTimer);
static void StopMotor(TimerHandle_t xTimer);
TimerHandle_t shortVib;
TimerHandle_t longVib;
};
}
}

View File

@ -26,12 +26,12 @@ void Settings::LoadSettingsFromFile() {
SettingsData bufferSettings;
lfs_file_t settingsFile;
if ( fs.FileOpen(&settingsFile, "/settings.dat", LFS_O_RDWR | LFS_O_CREAT) != LFS_ERR_OK) {
if (fs.FileOpen(&settingsFile, "/settings.dat", LFS_O_RDONLY) != LFS_ERR_OK) {
return;
}
fs.FileRead(&settingsFile, reinterpret_cast<uint8_t*>(&bufferSettings), sizeof(settings));
fs.FileClose(&settingsFile);
if ( bufferSettings.version == settingsVersion ) {
if (bufferSettings.version == settingsVersion) {
settings = bufferSettings;
}
}
@ -39,7 +39,7 @@ void Settings::LoadSettingsFromFile() {
void Settings::SaveSettingsToFile() {
lfs_file_t settingsFile;
if ( fs.FileOpen(&settingsFile, "/settings.dat", LFS_O_RDWR | LFS_O_CREAT) != LFS_ERR_OK) {
if (fs.FileOpen(&settingsFile, "/settings.dat", LFS_O_WRONLY | LFS_O_CREAT) != LFS_ERR_OK) {
return;
}
fs.FileWrite(&settingsFile, reinterpret_cast<uint8_t*>(&settings), sizeof(settings));

View File

@ -1,7 +1,6 @@
#pragma once
#include <cstdint>
#include <bitset>
#include "components/datetime/DateTimeController.h"
#include "components/brightness/BrightnessController.h"
#include "components/fs/FS.h"
@ -11,13 +10,31 @@ namespace Pinetime {
public:
enum class ClockType : uint8_t { H24, H12 };
enum class Notification : uint8_t { ON, OFF };
enum class ChimesOption : uint8_t { None, Hours, HalfHours };
enum class WakeUpMode : uint8_t {
SingleTap = 0,
DoubleTap = 1,
RaiseWrist = 2,
Shake = 3,
};
enum class Colors : uint8_t {
White, Silver, Gray, Black, Red, Maroon, Yellow, Olive, Lime, Green, Cyan, Teal, Blue, Navy, Magenta, Purple, Orange
White,
Silver,
Gray,
Black,
Red,
Maroon,
Yellow,
Olive,
Lime,
Green,
Cyan,
Teal,
Blue,
Navy,
Magenta,
Purple,
Orange
};
struct PineTimeStyle {
Colors ColorTime = Colors::Teal;
@ -40,6 +57,16 @@ namespace Pinetime {
return settings.clockFace;
};
void SetChimeOption(ChimesOption chimeOption) {
if (chimeOption != settings.chimesOption) {
settingsChanged = true;
}
settings.chimesOption = chimeOption;
};
ChimesOption GetChimeOption() const {
return settings.chimesOption;
};
void SetPTSColorTime(Colors colorTime) {
if (colorTime != settings.PTS.ColorTime)
settingsChanged = true;
@ -108,10 +135,22 @@ namespace Pinetime {
}
settings.screenTimeOut = timeout;
};
uint32_t GetScreenTimeOut() const {
return settings.screenTimeOut;
};
void SetShakeThreshold(uint16_t thresh) {
if (settings.shakeWakeThreshold != thresh) {
settings.shakeWakeThreshold = thresh;
settingsChanged = true;
}
}
int16_t GetShakeThreshold() const {
return settings.shakeWakeThreshold;
}
void setWakeUpMode(WakeUpMode wakeUp, bool enabled) {
if (enabled != isWakeUpModeOn(wakeUp)) {
settingsChanged = true;
@ -126,13 +165,13 @@ namespace Pinetime {
case WakeUpMode::DoubleTap:
settings.wakeUpMode.set(static_cast<size_t>(WakeUpMode::SingleTap), false);
break;
case WakeUpMode::RaiseWrist:
default:
break;
}
}
};
std::bitset<3> getWakeUpModes() const {
std::bitset<4> getWakeUpModes() const {
return settings.wakeUpMode;
}
@ -146,23 +185,34 @@ namespace Pinetime {
}
settings.brightLevel = level;
};
Controllers::BrightnessController::Levels GetBrightness() const {
return settings.brightLevel;
};
void SetStepsGoal( uint32_t goal ) {
if ( goal != settings.stepsGoal ) {
void SetStepsGoal(uint32_t goal) {
if (goal != settings.stepsGoal) {
settingsChanged = true;
}
settings.stepsGoal = goal;
};
uint32_t GetStepsGoal() const { return settings.stepsGoal; };
uint32_t GetStepsGoal() const {
return settings.stepsGoal;
};
void SetBleRadioEnabled(bool enabled) {
bleRadioEnabled = enabled;
};
bool GetBleRadioEnabled() const {
return bleRadioEnabled;
};
private:
Pinetime::Controllers::FS& fs;
static constexpr uint32_t settingsVersion = 0x0002;
static constexpr uint32_t settingsVersion = 0x0003;
struct SettingsData {
uint32_t version = settingsVersion;
uint32_t stepsGoal = 10000;
@ -172,11 +222,12 @@ namespace Pinetime {
Notification notificationStatus = Notification::ON;
uint8_t clockFace = 0;
ChimesOption chimesOption = ChimesOption::None;
PineTimeStyle PTS;
std::bitset<3> wakeUpMode {0};
std::bitset<4> wakeUpMode {0};
uint16_t shakeWakeThreshold = 150;
Controllers::BrightnessController::Levels brightLevel = Controllers::BrightnessController::Levels::Medium;
};
@ -185,6 +236,10 @@ namespace Pinetime {
uint8_t appMenu = 0;
uint8_t settingsMenu = 0;
/* ble state is intentionally not saved with the other watch settings and initialized
* to off (false) on every boot because we always want ble to be enabled on startup
*/
bool bleRadioEnabled = true;
void LoadSettingsFromFile();
void SaveSettingsToFile();

View File

@ -1,69 +1,39 @@
//
// Created by florian on 16.05.21.
//
#include "components/timer/TimerController.h"
#include "systemtask/SystemTask.h"
#include "app_timer.h"
#include "task.h"
using namespace Pinetime::Controllers;
APP_TIMER_DEF(timerAppTimer);
namespace {
void TimerEnd(void* p_context) {
auto* controller = static_cast<Pinetime::Controllers::TimerController*> (p_context);
if(controller != nullptr)
void TimerCallback(TimerHandle_t xTimer) {
auto* controller = static_cast<TimerController*>(pvTimerGetTimerID(xTimer));
controller->OnTimerEnd();
}
}
void TimerController::Init() {
app_timer_create(&timerAppTimer, APP_TIMER_MODE_SINGLE_SHOT, TimerEnd);
void TimerController::Init(Pinetime::System::SystemTask* systemTask) {
this->systemTask = systemTask;
timer = xTimerCreate("Timer", 1, pdFALSE, this, TimerCallback);
}
void TimerController::StartTimer(uint32_t duration) {
app_timer_stop(timerAppTimer);
auto currentTicks = xTaskGetTickCount();
app_timer_start(timerAppTimer, APP_TIMER_TICKS(duration), this);
endTicks = currentTicks + APP_TIMER_TICKS(duration);
timerRunning = true;
xTimerChangePeriod(timer, pdMS_TO_TICKS(duration), 0);
xTimerStart(timer, 0);
}
uint32_t TimerController::GetTimeRemaining() {
if (!timerRunning) {
if (IsRunning()) {
TickType_t remainingTime = xTimerGetExpiryTime(timer) - xTaskGetTickCount();
return (remainingTime * 1000 / configTICK_RATE_HZ);
}
return 0;
}
auto currentTicks = xTaskGetTickCount();
TickType_t deltaTicks = 0;
if (currentTicks > endTicks) {
deltaTicks = 0xffffffff - currentTicks;
deltaTicks += (endTicks + 1);
} else {
deltaTicks = endTicks - currentTicks;
}
return (static_cast<TickType_t>(deltaTicks) / static_cast<TickType_t>(configTICK_RATE_HZ)) * 1000;
}
void TimerController::StopTimer() {
app_timer_stop(timerAppTimer);
timerRunning = false;
xTimerStop(timer, 0);
}
bool TimerController::IsRunning() {
return timerRunning;
}
void TimerController::OnTimerEnd() {
timerRunning = false;
if(systemTask != nullptr)
systemTask->PushMessage(System::Messages::OnTimerDone);
return (xTimerIsTimerActive(timer) == pdTRUE);
}
void TimerController::Register(Pinetime::System::SystemTask* systemTask) {
this->systemTask = systemTask;
void TimerController::OnTimerEnd() {
systemTask->PushMessage(System::Messages::OnTimerDone);
}

View File

@ -1,8 +1,7 @@
#pragma once
#include <cstdint>
#include "app_timer.h"
#include "portmacro_cmsis.h"
#include <FreeRTOS.h>
#include <timers.h>
namespace Pinetime {
namespace System {
@ -14,7 +13,7 @@ namespace Pinetime {
public:
TimerController() = default;
void Init();
void Init(System::SystemTask* systemTask);
void StartTimer(uint32_t duration);
@ -26,12 +25,9 @@ namespace Pinetime {
void OnTimerEnd();
void Register(System::SystemTask* systemTask);
private:
System::SystemTask* systemTask = nullptr;
TickType_t endTicks;
bool timerRunning = false;
TimerHandle_t timer;
};
}
}

View File

@ -36,7 +36,12 @@ namespace Pinetime {
SettingSteps,
SettingSetDate,
SettingSetTime,
SettingChimes,
SettingShakeThreshold,
SettingBluetooth,
Error,
// oli: custom
Agenda
};
}
}

View File

@ -5,23 +5,41 @@ using namespace Pinetime::Controllers;
lv_color_t Pinetime::Applications::Convert(Pinetime::Controllers::Settings::Colors color) {
switch (color) {
case Pinetime::Controllers::Settings::Colors::White: return LV_COLOR_WHITE;
case Pinetime::Controllers::Settings::Colors::Silver: return LV_COLOR_SILVER;
case Pinetime::Controllers::Settings::Colors::Gray: return LV_COLOR_GRAY;
case Pinetime::Controllers::Settings::Colors::Black: return LV_COLOR_BLACK;
case Pinetime::Controllers::Settings::Colors::Red: return LV_COLOR_RED;
case Pinetime::Controllers::Settings::Colors::Maroon: return LV_COLOR_MAROON;
case Pinetime::Controllers::Settings::Colors::Yellow: return LV_COLOR_YELLOW;
case Pinetime::Controllers::Settings::Colors::Olive: return LV_COLOR_OLIVE;
case Pinetime::Controllers::Settings::Colors::Lime: return LV_COLOR_LIME;
case Pinetime::Controllers::Settings::Colors::Green: return LV_COLOR_GREEN;
case Pinetime::Controllers::Settings::Colors::Cyan: return LV_COLOR_CYAN;
case Pinetime::Controllers::Settings::Colors::Teal: return LV_COLOR_TEAL;
case Pinetime::Controllers::Settings::Colors::Blue: return LV_COLOR_BLUE;
case Pinetime::Controllers::Settings::Colors::Navy: return LV_COLOR_NAVY;
case Pinetime::Controllers::Settings::Colors::Magenta: return LV_COLOR_MAGENTA;
case Pinetime::Controllers::Settings::Colors::Purple: return LV_COLOR_PURPLE;
case Pinetime::Controllers::Settings::Colors::Orange: return LV_COLOR_ORANGE;
default: return LV_COLOR_WHITE;
case Pinetime::Controllers::Settings::Colors::White:
return LV_COLOR_WHITE;
case Pinetime::Controllers::Settings::Colors::Silver:
return LV_COLOR_SILVER;
case Pinetime::Controllers::Settings::Colors::Gray:
return LV_COLOR_GRAY;
case Pinetime::Controllers::Settings::Colors::Black:
return LV_COLOR_BLACK;
case Pinetime::Controllers::Settings::Colors::Red:
return LV_COLOR_RED;
case Pinetime::Controllers::Settings::Colors::Maroon:
return LV_COLOR_MAKE(0xb0, 0x0, 0x0);
case Pinetime::Controllers::Settings::Colors::Yellow:
return LV_COLOR_YELLOW;
case Pinetime::Controllers::Settings::Colors::Olive:
return LV_COLOR_MAKE(0xb0, 0xb0, 0x0);
case Pinetime::Controllers::Settings::Colors::Lime:
return LV_COLOR_LIME;
case Pinetime::Controllers::Settings::Colors::Green:
return LV_COLOR_MAKE(0x0, 0xb0, 0x0);
case Pinetime::Controllers::Settings::Colors::Cyan:
return LV_COLOR_CYAN;
case Pinetime::Controllers::Settings::Colors::Teal:
return LV_COLOR_MAKE(0x0, 0xb0, 0xb0);
case Pinetime::Controllers::Settings::Colors::Blue:
return LV_COLOR_BLUE;
case Pinetime::Controllers::Settings::Colors::Navy:
return LV_COLOR_MAKE(0x0, 0x0, 0xb0);
case Pinetime::Controllers::Settings::Colors::Magenta:
return LV_COLOR_MAGENTA;
case Pinetime::Controllers::Settings::Colors::Purple:
return LV_COLOR_MAKE(0xb0, 0x0, 0xb0);
case Pinetime::Controllers::Settings::Colors::Orange:
return LV_COLOR_ORANGE;
default:
return LV_COLOR_WHITE;
}
}

View File

@ -11,14 +11,12 @@
#include "components/motion/MotionController.h"
#include "components/motor/MotorController.h"
#include "displayapp/screens/ApplicationList.h"
#include "displayapp/screens/Brightness.h"
#include "displayapp/screens/Clock.h"
#include "displayapp/screens/FirmwareUpdate.h"
#include "displayapp/screens/FirmwareValidation.h"
#include "displayapp/screens/InfiniPaint.h"
#include "displayapp/screens/Paddle.h"
#include "displayapp/screens/StopWatch.h"
#include "displayapp/screens/Meter.h"
#include "displayapp/screens/Metronome.h"
#include "displayapp/screens/Music.h"
#include "displayapp/screens/Navigation.h"
@ -32,6 +30,8 @@
#include "displayapp/screens/PassKey.h"
#include "displayapp/screens/Error.h"
#include "displayapp/screens/Agenda.h"
#include "drivers/Cst816s.h"
#include "drivers/St7789.h"
#include "drivers/Watchdog.h"
@ -47,6 +47,9 @@
#include "displayapp/screens/settings/SettingSteps.h"
#include "displayapp/screens/settings/SettingSetDate.h"
#include "displayapp/screens/settings/SettingSetTime.h"
#include "displayapp/screens/settings/SettingChimes.h"
#include "displayapp/screens/settings/SettingShakeThreshold.h"
#include "displayapp/screens/settings/SettingBluetooth.h"
#include "libs/lv_conf.h"
@ -57,28 +60,6 @@ namespace {
static inline bool in_isr(void) {
return (SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) != 0;
}
TouchEvents ConvertGesture(Pinetime::Drivers::Cst816S::Gestures gesture) {
switch (gesture) {
case Pinetime::Drivers::Cst816S::Gestures::SingleTap:
return TouchEvents::Tap;
case Pinetime::Drivers::Cst816S::Gestures::LongPress:
return TouchEvents::LongTap;
case Pinetime::Drivers::Cst816S::Gestures::DoubleTap:
return TouchEvents::DoubleTap;
case Pinetime::Drivers::Cst816S::Gestures::SlideRight:
return TouchEvents::SwipeRight;
case Pinetime::Drivers::Cst816S::Gestures::SlideLeft:
return TouchEvents::SwipeLeft;
case Pinetime::Drivers::Cst816S::Gestures::SlideDown:
return TouchEvents::SwipeDown;
case Pinetime::Drivers::Cst816S::Gestures::SlideUp:
return TouchEvents::SwipeUp;
case Pinetime::Drivers::Cst816S::Gestures::None:
default:
return TouchEvents::None;
}
}
}
DisplayApp::DisplayApp(Drivers::St7789& lcd,
@ -95,6 +76,7 @@ DisplayApp::DisplayApp(Drivers::St7789& lcd,
Pinetime::Controllers::MotionController& motionController,
Pinetime::Controllers::TimerController& timerController,
Pinetime::Controllers::AlarmController& alarmController,
Pinetime::Controllers::BrightnessController& brightnessController,
Pinetime::Controllers::TouchHandler& touchHandler)
: lcd {lcd},
lvgl {lvgl},
@ -110,6 +92,7 @@ DisplayApp::DisplayApp(Drivers::St7789& lcd,
motionController {motionController},
timerController {timerController},
alarmController {alarmController},
brightnessController {brightnessController},
touchHandler {touchHandler} {
}
@ -180,12 +163,10 @@ void DisplayApp::Refresh() {
brightnessController.Lower();
vTaskDelay(100);
}
lcd.DisplayOff();
PushMessageToSystemTask(Pinetime::System::Messages::OnDisplayTaskSleeping);
state = States::Idle;
break;
case Messages::GoToRunning:
lcd.DisplayOn();
brightnessController.Restore();
state = States::Running;
break;
@ -202,7 +183,7 @@ void DisplayApp::Refresh() {
case Messages::TimerDone:
if (currentApp == Apps::Timer) {
auto* timer = static_cast<Screens::Timer*>(currentScreen.get());
timer->setDone();
timer->SetDone();
} else {
LoadApp(Apps::Timer, DisplayApp::FullRefreshDirections::Down);
}
@ -222,7 +203,7 @@ void DisplayApp::Refresh() {
if (state != States::Running) {
break;
}
auto gesture = ConvertGesture(touchHandler.GestureGet());
auto gesture = touchHandler.GestureGet();
if (gesture == TouchEvents::None) {
break;
}
@ -288,21 +269,27 @@ void DisplayApp::Refresh() {
case Messages::BleFirmwareUpdateStarted:
LoadApp(Apps::FirmwareUpdate, DisplayApp::FullRefreshDirections::Down);
break;
case Messages::BleRadioEnableToggle:
PushMessageToSystemTask(System::Messages::BleRadioEnableToggle);
break;
case Messages::UpdateDateTime:
// Added to remove warning
// What should happen here?
break;
case Messages::Clock:
LoadApp(Apps::Clock, DisplayApp::FullRefreshDirections::None);
break;
}
}
if (touchHandler.IsTouching()) {
currentScreen->OnTouchEvent(touchHandler.GetX(), touchHandler.GetY());
}
if (nextApp != Apps::None) {
LoadApp(nextApp, nextDirection);
nextApp = Apps::None;
}
if (touchHandler.IsTouching()) {
currentScreen->OnTouchEvent(touchHandler.GetX(), touchHandler.GetY());
}
}
void DisplayApp::StartApp(Apps app, DisplayApp::FullRefreshDirections direction) {
@ -338,7 +325,8 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction)
notificationManager,
settingsController,
heartRateController,
motionController);
motionController,
systemTask->nimble().agenda());
break;
case Apps::Error:
@ -361,26 +349,38 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction)
break;
case Apps::Notifications:
currentScreen = std::make_unique<Screens::Notifications>(
this, notificationManager, systemTask->nimble().alertService(), motorController, Screens::Notifications::Modes::Normal);
currentScreen = std::make_unique<Screens::Notifications>(this,
notificationManager,
systemTask->nimble().alertService(),
motorController,
*systemTask,
Screens::Notifications::Modes::Normal);
ReturnApp(Apps::Clock, FullRefreshDirections::Up, TouchEvents::SwipeUp);
break;
case Apps::NotificationsPreview:
currentScreen = std::make_unique<Screens::Notifications>(
this, notificationManager, systemTask->nimble().alertService(), motorController, Screens::Notifications::Modes::Preview);
currentScreen = std::make_unique<Screens::Notifications>(this,
notificationManager,
systemTask->nimble().alertService(),
motorController,
*systemTask,
Screens::Notifications::Modes::Preview);
ReturnApp(Apps::Clock, FullRefreshDirections::Up, TouchEvents::SwipeUp);
break;
case Apps::Timer:
currentScreen = std::make_unique<Screens::Timer>(this, timerController);
break;
case Apps::Alarm:
currentScreen = std::make_unique<Screens::Alarm>(this, alarmController);
currentScreen = std::make_unique<Screens::Alarm>(this, alarmController, settingsController, *systemTask);
break;
// Settings
case Apps::QuickSettings:
currentScreen = std::make_unique<Screens::QuickSettings>(
this, batteryController, dateTimeController, brightnessController, motorController, settingsController);
currentScreen = std::make_unique<Screens::QuickSettings>(this,
batteryController,
dateTimeController,
brightnessController,
motorController,
settingsController);
ReturnApp(Apps::Clock, FullRefreshDirections::LeftAnim, TouchEvents::SwipeLeft);
break;
case Apps::Settings:
@ -412,7 +412,19 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction)
ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
break;
case Apps::SettingSetTime:
currentScreen = std::make_unique<Screens::SettingSetTime>(this, dateTimeController);
currentScreen = std::make_unique<Screens::SettingSetTime>(this, dateTimeController, settingsController);
ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
break;
case Apps::SettingChimes:
currentScreen = std::make_unique<Screens::SettingChimes>(this, settingsController);
ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
break;
case Apps::SettingShakeThreshold:
currentScreen = std::make_unique<Screens::SettingShakeThreshold>(this, settingsController, motionController, *systemTask);
ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
break;
case Apps::SettingBluetooth:
currentScreen = std::make_unique<Screens::SettingBluetooth>(this, settingsController);
ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
break;
case Apps::BatteryInfo:
@ -420,8 +432,14 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction)
ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
break;
case Apps::SysInfo:
currentScreen = std::make_unique<Screens::SystemInfo>(
this, dateTimeController, batteryController, brightnessController, bleController, watchdog, motionController, touchPanel);
currentScreen = std::make_unique<Screens::SystemInfo>(this,
dateTimeController,
batteryController,
brightnessController,
bleController,
watchdog,
motionController,
touchPanel);
ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
break;
case Apps::FlashLight:
@ -459,6 +477,10 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction)
case Apps::Steps:
currentScreen = std::make_unique<Screens::Steps>(this, motionController, settingsController);
break;
case Apps::Agenda:
currentScreen = std::make_unique<Screens::Agenda>(this, systemTask->nimble().agenda(), dateTimeController);
break;
}
currentApp = app;
}
@ -496,6 +518,9 @@ void DisplayApp::SetFullRefresh(DisplayApp::FullRefreshDirections direction) {
case DisplayApp::FullRefreshDirections::RightAnim:
lvgl.SetFullRefresh(Components::LittleVgl::FullRefreshDirections::RightAnim);
break;
// case DisplayApp::FullRefreshDirections::None:
// lvgl.SetFullRefresh(Components::LittleVgl::FullRefreshDirections::None);
// break;
default:
break;
}

View File

@ -61,6 +61,7 @@ namespace Pinetime {
Pinetime::Controllers::MotionController& motionController,
Pinetime::Controllers::TimerController& timerController,
Pinetime::Controllers::AlarmController& alarmController,
Pinetime::Controllers::BrightnessController& brightnessController,
Pinetime::Controllers::TouchHandler& touchHandler);
void Start(System::BootErrors error);
void PushMessage(Display::Messages msg);
@ -87,10 +88,10 @@ namespace Pinetime {
Pinetime::Controllers::MotionController& motionController;
Pinetime::Controllers::TimerController& timerController;
Pinetime::Controllers::AlarmController& alarmController;
Pinetime::Controllers::BrightnessController& brightnessController;
Pinetime::Controllers::TouchHandler& touchHandler;
Pinetime::Controllers::FirmwareValidator validator;
Controllers::BrightnessController brightnessController;
TaskHandle_t taskHandle;

View File

@ -23,9 +23,9 @@ DisplayApp::DisplayApp(Drivers::St7789& lcd,
Pinetime::Controllers::MotionController& motionController,
Pinetime::Controllers::TimerController& timerController,
Pinetime::Controllers::AlarmController& alarmController,
Pinetime::Controllers::BrightnessController& brightnessController,
Pinetime::Controllers::TouchHandler& touchHandler)
: lcd {lcd}, bleController {bleController} {
}
void DisplayApp::Start() {
@ -120,5 +120,4 @@ void DisplayApp::PushMessage(Display::Messages msg) {
}
void DisplayApp::Register(Pinetime::System::SystemTask* systemTask) {
}

View File

@ -34,6 +34,7 @@ namespace Pinetime {
class MotorController;
class TimerController;
class AlarmController;
class BrightnessController;
}
namespace System {
@ -57,9 +58,12 @@ namespace Pinetime {
Pinetime::Controllers::MotionController& motionController,
Pinetime::Controllers::TimerController& timerController,
Pinetime::Controllers::AlarmController& alarmController,
Pinetime::Controllers::BrightnessController& brightnessController,
Pinetime::Controllers::TouchHandler& touchHandler);
void Start();
void Start(Pinetime::System::BootErrors){ Start(); };
void Start(Pinetime::System::BootErrors) {
Start();
};
void PushMessage(Pinetime::Applications::Display::Messages msg);
void Register(Pinetime::System::SystemTask* systemTask);

View File

@ -20,7 +20,6 @@ namespace Pinetime {
LittleVgl& operator=(LittleVgl&&) = delete;
void Init() {
}
void FlushDisplay(const lv_area_t* area, lv_color_t* color_p) {
@ -33,7 +32,6 @@ namespace Pinetime {
void SetNewTapEvent(uint16_t x, uint16_t y) {
}
void SetNewTouchPoint(uint16_t x, uint16_t y, bool contact) {
}
};
}

View File

@ -16,14 +16,22 @@ static void disp_flush(lv_disp_drv_t* disp_drv, const lv_area_t* area, lv_color_
lvgl->FlushDisplay(area, color_p);
}
static void rounder(lv_disp_drv_t* disp_drv, lv_area_t* area) {
auto* lvgl = static_cast<LittleVgl*>(disp_drv->user_data);
if (lvgl->GetFullRefresh()) {
area->x1 = 0;
area->x2 = LV_HOR_RES - 1;
area->y1 = 0;
area->y2 = LV_VER_RES - 1;
}
}
bool touchpad_read(lv_indev_drv_t* indev_drv, lv_indev_data_t* data) {
auto* lvgl = static_cast<LittleVgl*>(indev_drv->user_data);
return lvgl->GetTouchPadInfo(data);
}
LittleVgl::LittleVgl(Pinetime::Drivers::St7789& lcd, Pinetime::Drivers::Cst816S& touchPanel)
: lcd {lcd}, touchPanel {touchPanel}, previousClick {0, 0} {
LittleVgl::LittleVgl(Pinetime::Drivers::St7789& lcd, Pinetime::Drivers::Cst816S& touchPanel) : lcd {lcd}, touchPanel {touchPanel} {
}
void LittleVgl::Init() {
@ -48,6 +56,7 @@ void LittleVgl::InitDisplay() {
/*Set a display buffer*/
disp_drv.buffer = &disp_buf_2;
disp_drv.user_data = this;
disp_drv.rounder_cb = rounder;
/*Finally register the driver*/
lv_disp_drv_register(&disp_drv);
@ -78,14 +87,15 @@ void LittleVgl::SetFullRefresh(FullRefreshDirections direction) {
lv_disp_set_direction(lv_disp_get_default(), 4);
}
}
fullRefresh = true;
}
void LittleVgl::FlushDisplay(const lv_area_t* area, lv_color_t* color_p) {
uint16_t y1, y2, width, height = 0;
ulTaskNotifyTake(pdTRUE, 200);
// NOtification is still needed (even if there is a mutex on SPI) because of the DataCommand pin
// which cannot be set/clear during a transfert.
// Notification is still needed (even if there is a mutex on SPI) because of the DataCommand pin
// which cannot be set/clear during a transfer.
if ((scrollDirection == LittleVgl::FullRefreshDirections::Down) && (area->y2 == visibleNbLines - 1)) {
writeOffset = ((writeOffset + totalNbLines) - visibleNbLines) % totalNbLines;
@ -185,8 +195,13 @@ bool LittleVgl::GetTouchPadInfo(lv_indev_data_t* ptr) {
void LittleVgl::InitTheme() {
lv_theme_t* th = lv_pinetime_theme_init(
LV_COLOR_WHITE, LV_COLOR_SILVER, 0, &jetbrains_mono_bold_20, &jetbrains_mono_bold_20, &jetbrains_mono_bold_20, &jetbrains_mono_bold_20);
lv_theme_t* th = lv_pinetime_theme_init(LV_COLOR_WHITE,
LV_COLOR_SILVER,
0,
&jetbrains_mono_bold_20,
&jetbrains_mono_bold_20,
&jetbrains_mono_bold_20,
&jetbrains_mono_bold_20);
lv_theme_set_act(th);
}

View File

@ -26,6 +26,14 @@ namespace Pinetime {
void SetFullRefresh(FullRefreshDirections direction);
void SetNewTouchPoint(uint16_t x, uint16_t y, bool contact);
bool GetFullRefresh() {
bool returnValue = fullRefresh;
if (fullRefresh) {
fullRefresh = false;
}
return returnValue;
}
private:
void InitDisplay();
void InitTouchpad();
@ -39,9 +47,8 @@ namespace Pinetime {
lv_color_t buf2_2[LV_HOR_RES_MAX * 4];
lv_disp_drv_t disp_drv;
lv_point_t previousClick;
bool firstTouch = true;
bool fullRefresh = false;
static constexpr uint8_t nbWriteLines = 4;
static constexpr uint16_t totalNbLines = 320;
static constexpr uint16_t visibleNbLines = 240;

View File

@ -20,7 +20,9 @@ namespace Pinetime {
DimScreen,
RestoreBrightness,
ShowPairingKey,
AlarmTriggered
AlarmTriggered,
Clock,
BleRadioEnableToggle
};
}
}

View File

@ -0,0 +1,35 @@
set(FONTS jetbrains_mono_42 jetbrains_mono_76 jetbrains_mono_bold_20
jetbrains_mono_extrabold_compressed lv_font_navi_80 lv_font_sys_48
open_sans_light)
find_program(LV_FONT_CONV "lv_font_conv" NO_CACHE REQUIRED
HINTS "${CMAKE_SOURCE_DIR}/node_modules/.bin")
message(STATUS "Using ${LV_FONT_CONV} to generate font files")
configure_file(${CMAKE_CURRENT_LIST_DIR}/jetbrains_mono_bold_20.c_zero.patch
${CMAKE_CURRENT_BINARY_DIR}/jetbrains_mono_bold_20.c_zero.patch COPYONLY)
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12)
# FindPython3 module introduces with CMake 3.12
# https://cmake.org/cmake/help/latest/module/FindPython3.html
find_package(Python3 REQUIRED)
else()
set(Python3_EXECUTABLE "python")
endif()
# create static library building fonts
add_library(infinitime_fonts STATIC)
# add include directory to lvgl headers needed to compile the font files on its own
target_include_directories(infinitime_fonts PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../../libs")
foreach(FONT ${FONTS})
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FONT}.c
COMMAND "${Python3_EXECUTABLE}" ${CMAKE_CURRENT_SOURCE_DIR}/generate.py
--lv-font-conv "${LV_FONT_CONV}"
--font ${FONT} ${CMAKE_CURRENT_SOURCE_DIR}/fonts.json
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/fonts.json
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
add_custom_target(infinitime_fonts_${FONT}
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${FONT}.c
)
target_sources(infinitime_fonts PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/${FONT}.c")
add_dependencies(infinitime_fonts infinitime_fonts_${FONT})
endforeach()

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -4,25 +4,10 @@
* [Awesome font from LVGL](https://lvgl.io/assets/others/FontAwesome5-Solid+Brands+Regular.woff)
* [Open Sans Light from Google](https://fonts.google.com/specimen/Open+Sans)
## Generate the fonts:
### How to add new symbols:
* Open the [LVGL font converter](https://lvgl.io/tools/fontconverter)
* Name : jetbrains_mono_bold_20
* Size : 20
* Bpp : 1 bit-per-pixel
* Do not enable font compression and horizontal subpixel hinting
* Load the file `JetBrainsMono-Bold.tff` (use the file in this repo to ensure the version matches) and specify the following range : `0x20-0x7f, 0x410-0x44f`
* Add a 2nd font, load the file `FontAwesome5-Solid+Brands+Regular.woff` and specify the following
range : `0xf293, 0xf294, 0xf244, 0xf240, 0xf242, 0xf243, 0xf241, 0xf54b, 0xf21e, 0xf1e6, 0xf54b, 0xf017, 0xf129, 0xf03a, 0xf185, 0xf560, 0xf001, 0xf3fd, 0xf069, 0xf1fc, 0xf45d, 0xf59f, 0xf5a0, 0xf029, 0xf027, 0xf028, 0xf6a9, 0xf04b, 0xf04c, 0xf048, 0xf051, 0xf095, 0xf3dd, 0xf04d, 0xf2f2, 0xf024, 0xf252, 0xf569, 0xf201, 0xf06e, 0xf015`
* Click on Convert, and download the file `jetbrains_mono_bold_20.c` and copy it in `src/DisplayApp/Fonts`
* Add the font .c file path to src/CMakeLists.txt
* Add an LV_FONT_DECLARE line in src/libs/lv_conf.h
Add new symbols:
* Browse the [cheatsheet](https://fontawesome.com/cheatsheet/free/solid) and find your new symbols
* For each symbol, add its hex code (0xf641 for the 'Ad' icon, for example) to the *Range* list (Remember to keep this
readme updated with newest range list)
* Browse [this cheatsheet](https://fontawesome.com/cheatsheet/free/solid) and pick symbols
* For each symbol, add its hex code (0xf641 for the 'Ad' icon, for example) to the *Range* list (or the symbol list when its simple enough) in the `fonts.json` file
* Convert this hex value into a UTF-8 code
using [this site](http://www.ltg.ed.ac.uk/~richard/utf-8.cgi?input=f185&mode=hex)
* Define the new symbols in `src/displayapp/screens/Symbols.h`:
@ -31,32 +16,17 @@ Add new symbols:
static constexpr const char* newSymbol = "\xEF\x86\x85";
```
## Simple method to generate a font
### the config file format:
If you want to generate a basic font containing only numbers and letters, you can use the above settings but instead of specifying a range, simply list the characters you need in the Symbols field and leave the range blank. This is the approach used for the PineTimeStyle watchface.
This works well for fonts which will only be used to display numbers, but will fail if you try to add a colon or other punctuation.
inside `fonts`, there is a dictionary of fonts,
and for each font there is:
* sources - list of file,range(,symbols) wanted (as a dictionary of those)
* bpp - bits per pixel.
* size - size.
* patches - list of extra "patches" to run: a path to a .patch file. (may be relative)
* compress - optional. default disabled. add `"compress": true` to enable
* Open the [LVGL font converter](https://lvgl.io/tools/fontconverter)
* Name : open_sans_light
* Size : 150
* Bpp : 1 bit-per-pixel
* Do not enable font compression and horizontal subpixel hinting
* Load the file `open_sans_light.tff` (use the file in this repo to ensure the version matches) and specify the following symbols : `0123456789`
* Click on Convert, and download the file `open_sans_light.c` and copy it in `src/DisplayApp/Fonts`
* Add the font .c file path to src/CMakeLists.txt (search for jetbrains to find the appropriate location/format)
* Add an LV_FONT_DECLARE line in src/libs/lv_conf.h (as above)
### Navigation font
#### Navigation font
`navigtion.ttf` is created with the web app [icomoon](https://icomoon.io/app) by importing the svg files from `src/displayapp/icons/navigation/unique` and generating the font. `lv_font_navi_80.json` is a project file for the site, which you can import to add or remove icons.
To create the navigtion.ttf I use the web app [icomoon](https://icomoon.io/app)
this app can import the svg files from the folder *src/displayapp/icons/navigation/unique* and creat a ttf file the
project for the site is *lv_font_navi_80.json* you can import it to add or remove icons
You can also use the online LVGL tool to create the .c
ttf file : navigation.ttf name : lv_font_navi_80 size : 80px Bpp : 2 bit-per-pixel range : 0xe900-0xe929
$lv_font_conv --font navigation.ttf -r '0xe900-0xe929' --size 80 --format lvgl --bpp 2 --no-prefilter -o
lv_font_navi_80.c
#### I use the method above to create the other ttf

View File

@ -0,0 +1,78 @@
{
"jetbrains_mono_bold_20": {
"sources": [
{
"file": "JetBrainsMono-Bold.ttf",
"range": "0x20-0x7e, 0x410-0x44f"
},
{
"file": "FontAwesome5-Solid+Brands+Regular.woff",
"range": "0xf294, 0xf242, 0xf54b, 0xf21e, 0xf1e6, 0xf017, 0xf129, 0xf03a, 0xf185, 0xf560, 0xf001, 0xf3fd, 0xf1fc, 0xf45d, 0xf59f, 0xf5a0, 0xf027, 0xf028, 0xf6a9, 0xf04b, 0xf04c, 0xf048, 0xf051, 0xf095, 0xf3dd, 0xf04d, 0xf2f2, 0xf024, 0xf252, 0xf569, 0xf201, 0xf06e, 0xf015"
}
],
"bpp": 1,
"size": 20,
"patches": ["jetbrains_mono_bold_20.c_zero.patch"]
},
"jetbrains_mono_42": {
"sources": [
{
"file": "JetBrainsMono-Regular.ttf",
"range": "0x25, 0x2b, 0x2d, 0x30-0x3a"
}
],
"bpp": 1,
"size": 42
},
"jetbrains_mono_76": {
"sources": [
{
"file": "JetBrainsMono-Light.ttf",
"range": "0x25, 0x2D, 0x2F, 0x30-0x3a"
}
],
"bpp": 1,
"size": 76
},
"jetbrains_mono_extrabold_compressed": {
"sources": [
{
"file": "JetBrainsMono-ExtraBold.ttf",
"range": "0x30-0x3a"
}
],
"bpp": 1,
"size": 80
},
"open_sans_light": {
"sources": [
{
"file": "open_sans_light.ttf",
"symbols": "0123456789"
}
],
"bpp": 1,
"size": 150
},
"lv_font_sys_48": {
"sources": [
{
"file": "icons_sys_48.ttf",
"range": "0xe902, 0xe904-0xe907, 0xe90b-0xe90c"
}
],
"bpp": 1,
"size": 48
},
"lv_font_navi_80": {
"sources": [
{
"file": "navigation.ttf",
"range": "0xe900-0xe929"
}
],
"bpp": 2,
"size": 80,
"compress": true
}
}

View File

@ -0,0 +1,75 @@
#!/usr/bin/env python
import io
import sys
import json
import shutil
import typing
import os.path
import argparse
import subprocess
class Source(object):
def __init__(self, d):
self.file = d['file']
if not os.path.exists(self.file):
self.file = os.path.join(os.path.dirname(sys.argv[0]), self.file)
self.range = d.get('range')
self.symbols = d.get('symbols')
def gen_lvconv_line(lv_font_conv: str, dest: str, size: int, bpp: int, sources: typing.List[Source], compress:bool=False):
args = [lv_font_conv, '--size', str(size), '--output', dest, '--bpp', str(bpp), '--format', 'lvgl']
if not compress:
args.append('--no-compress')
for source in sources:
args.extend(['--font', source.file])
if source.range:
args.extend(['--range', source.range])
if source.symbols:
args.extend(['--symbols', source.symbols])
return args
def main():
ap = argparse.ArgumentParser(description='auto generate LVGL font files from fonts')
ap.add_argument('config', type=str, help='config file to use')
ap.add_argument('-f', '--font', type=str, action='append', help='Choose specific fonts to generate (default: all)', default=[])
ap.add_argument('--lv-font-conv', type=str, help='Path to "lv_font_conf" executable', default="lv_font_conv")
args = ap.parse_args()
if not shutil.which(args.lv_font_conv):
sys.exit(f"Missing lv_font_conv. Make sure it's findable (in PATH) or specify it manually")
if not os.path.exists(args.config):
sys.exit(f'Error: the config file {args.config} does not exist.')
if not os.access(args.config, os.R_OK):
sys.exit(f'Error: the config file {args.config} is not accessible (permissions?).')
with open(args.config, 'r') as fd:
data = json.load(fd)
fonts_to_run = set(data.keys())
if args.font:
enabled_fonts = set()
for font in args.font:
enabled_fonts.add(font[:-2] if font.endswith('.c') else font)
d = enabled_fonts.difference(fonts_to_run)
if d:
print(f'Warning: requested font{"s" if len(d)>1 else ""} missing: {" ".join(d)}')
fonts_to_run = fonts_to_run.intersection(enabled_fonts)
for name in fonts_to_run:
font = data[name]
sources = font.pop('sources')
patches = font.pop('patches') if 'patches' in font else []
font['sources'] = [Source(thing) for thing in sources]
line = gen_lvconv_line(args.lv_font_conv, f'{name}.c', **font)
subprocess.check_call(line)
if patches:
for patch in patches:
subprocess.check_call(['/usr/bin/patch', name+'.c', patch])
if __name__ == '__main__':
main()

View File

@ -1,258 +0,0 @@
/*******************************************************************************
* Size: 42 px
* Bpp: 1
* Opts:
******************************************************************************/
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif
#ifndef JETBRAINS_MONO_42
#define JETBRAINS_MONO_42 1
#endif
#if JETBRAINS_MONO_42
/*-----------------
* BITMAPS
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
/* U+0025 "%" */
0x1f, 0x80, 0x7, 0x3f, 0xc0, 0xe, 0x7f, 0xe0,
0x1c, 0xf0, 0xf0, 0x1c, 0xe0, 0x70, 0x38, 0xe0,
0x70, 0x70, 0xe0, 0x70, 0x70, 0xe0, 0x70, 0xe0,
0xe0, 0x71, 0xc0, 0xe0, 0x71, 0xc0, 0xf0, 0xf3,
0x80, 0x7f, 0xe7, 0x0, 0x3f, 0xc7, 0x0, 0x1f,
0x8e, 0x0, 0x0, 0x1c, 0x0, 0x0, 0x3c, 0x0,
0x0, 0x38, 0x0, 0x0, 0x71, 0xf8, 0x0, 0xe3,
0xfc, 0x0, 0xe7, 0xfe, 0x1, 0xcf, 0xf, 0x3,
0x8e, 0x7, 0x3, 0x8e, 0x7, 0x7, 0xe, 0x7,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 0xe7, 0x80,
0x0, 0xf8, 0x0, 0xf, 0x0, 0x1, 0xe0, 0x0,
0x1e, 0x0, 0x3, 0xc0, 0x0, 0x3c, 0x0, 0x7,
0x80, 0x0, 0xf8, 0x0, 0xf, 0x0, 0x1, 0xe0,
0x0, 0x1e, 0x0, 0x3, 0xc0, 0x0,
/* U+003A ":" */
0x7d, 0xff, 0xff, 0xff, 0xef, 0x80, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1,
0xf7, 0xff, 0xff, 0xff, 0xbe
};
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
{.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
{.bitmap_index = 0, .adv_w = 403, .box_w = 24, .box_h = 31, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 93, .adv_w = 403, .box_w = 19, .box_h = 31, .ofs_x = 3, .ofs_y = 0},
{.bitmap_index = 167, .adv_w = 403, .box_w = 19, .box_h = 31, .ofs_x = 4, .ofs_y = 0},
{.bitmap_index = 241, .adv_w = 403, .box_w = 19, .box_h = 31, .ofs_x = 3, .ofs_y = 0},
{.bitmap_index = 315, .adv_w = 403, .box_w = 19, .box_h = 31, .ofs_x = 3, .ofs_y = 0},
{.bitmap_index = 389, .adv_w = 403, .box_w = 18, .box_h = 31, .ofs_x = 3, .ofs_y = 0},
{.bitmap_index = 459, .adv_w = 403, .box_w = 18, .box_h = 31, .ofs_x = 3, .ofs_y = 0},
{.bitmap_index = 529, .adv_w = 403, .box_w = 20, .box_h = 31, .ofs_x = 3, .ofs_y = 0},
{.bitmap_index = 607, .adv_w = 403, .box_w = 20, .box_h = 31, .ofs_x = 3, .ofs_y = 0},
{.bitmap_index = 685, .adv_w = 403, .box_w = 20, .box_h = 31, .ofs_x = 3, .ofs_y = 0},
{.bitmap_index = 763, .adv_w = 403, .box_w = 20, .box_h = 31, .ofs_x = 3, .ofs_y = 0},
{.bitmap_index = 841, .adv_w = 403, .box_w = 7, .box_h = 24, .ofs_x = 9, .ofs_y = 0}
};
/*---------------------
* CHARACTER MAPPING
*--------------------*/
/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
{
.range_start = 37, .range_length = 1, .glyph_id_start = 1,
.unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
},
{
.range_start = 48, .range_length = 11, .glyph_id_start = 2,
.unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
}
};
/*--------------------
* ALL CUSTOM DATA
*--------------------*/
#if LV_VERSION_CHECK(8, 0, 0)
/*Store all the custom data of the font*/
static lv_font_fmt_txt_glyph_cache_t cache;
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = NULL,
.kern_scale = 0,
.cmap_num = 2,
.bpp = 1,
.kern_classes = 0,
.bitmap_format = 0,
#if LV_VERSION_CHECK(8, 0, 0)
.cache = &cache
#endif
};
/*-----------------
* PUBLIC FONT
*----------------*/
/*Initialize a public general font descriptor*/
#if LV_VERSION_CHECK(8, 0, 0)
const lv_font_t jetbrains_mono_42 = {
#else
lv_font_t jetbrains_mono_42 = {
#endif
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
.line_height = 31, /*The maximum line height required by the font*/
.base_line = 0, /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
.subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0)
.underline_position = -7,
.underline_thickness = 2,
#endif
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
#endif /*#if JETBRAINS_MONO_42*/

View File

@ -1,554 +0,0 @@
/*******************************************************************************
* Size: 76 px
* Bpp: 1
* Opts:
******************************************************************************/
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif
#ifndef JETBRAINS_MONO_76
#define JETBRAINS_MONO_76 1
#endif
#if JETBRAINS_MONO_76
/*-----------------
* BITMAPS
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
/* U+0025 "%" */
0x1, 0xfc, 0x0, 0x0, 0x7, 0xe1, 0xff, 0xf0,
0x0, 0x1, 0xf8, 0x7f, 0xff, 0x0, 0x0, 0x3f,
0x1f, 0xff, 0xf0, 0x0, 0xf, 0xc7, 0xff, 0xff,
0x0, 0x3, 0xf0, 0xfe, 0xf, 0xe0, 0x0, 0x7e,
0x3f, 0x80, 0xfc, 0x0, 0x1f, 0x87, 0xe0, 0xf,
0xc0, 0x7, 0xe0, 0xfc, 0x1, 0xf8, 0x0, 0xfc,
0x1f, 0x80, 0x3f, 0x0, 0x3f, 0x3, 0xf0, 0x7,
0xe0, 0xf, 0xc0, 0x7e, 0x0, 0xfc, 0x1, 0xf8,
0xf, 0xc0, 0x1f, 0x80, 0x7e, 0x1, 0xf8, 0x3,
0xf0, 0x1f, 0x80, 0x3f, 0x0, 0x7e, 0x3, 0xf0,
0x7, 0xe0, 0xf, 0xc0, 0xfc, 0x0, 0xfc, 0x1,
0xf8, 0x3f, 0x0, 0x1f, 0x80, 0x3f, 0x7, 0xe0,
0x3, 0xf8, 0xf, 0xe1, 0xf8, 0x0, 0x3f, 0x83,
0xf8, 0x7e, 0x0, 0x7, 0xff, 0xff, 0xf, 0xc0,
0x0, 0x7f, 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_dsc_t glyph_dsc[] = {
{.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
{.bitmap_index = 0, .adv_w = 730, .box_w = 43, .box_h = 57, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 307, .adv_w = 730, .box_w = 24, .box_h = 6, .ofs_x = 11, .ofs_y = 22},
{.bitmap_index = 325, .adv_w = 730, .box_w = 34, .box_h = 72, .ofs_x = 6, .ofs_y = -8},
{.bitmap_index = 631, .adv_w = 730, .box_w = 34, .box_h = 58, .ofs_x = 6, .ofs_y = -1},
{.bitmap_index = 878, .adv_w = 730, .box_w = 34, .box_h = 56, .ofs_x = 7, .ofs_y = 0},
{.bitmap_index = 1116, .adv_w = 730, .box_w = 34, .box_h = 57, .ofs_x = 6, .ofs_y = 0},
{.bitmap_index = 1359, .adv_w = 730, .box_w = 34, .box_h = 57, .ofs_x = 5, .ofs_y = -1},
{.bitmap_index = 1602, .adv_w = 730, .box_w = 32, .box_h = 56, .ofs_x = 6, .ofs_y = 0},
{.bitmap_index = 1826, .adv_w = 730, .box_w = 32, .box_h = 57, .ofs_x = 7, .ofs_y = -1},
{.bitmap_index = 2054, .adv_w = 730, .box_w = 36, .box_h = 58, .ofs_x = 5, .ofs_y = -1},
{.bitmap_index = 2315, .adv_w = 730, .box_w = 36, .box_h = 56, .ofs_x = 5, .ofs_y = 0},
{.bitmap_index = 2567, .adv_w = 730, .box_w = 36, .box_h = 58, .ofs_x = 5, .ofs_y = -1},
{.bitmap_index = 2828, .adv_w = 730, .box_w = 36, .box_h = 57, .ofs_x = 5, .ofs_y = 0},
{.bitmap_index = 3085, .adv_w = 730, .box_w = 13, .box_h = 44, .ofs_x = 16, .ofs_y = -1}
};
/*---------------------
* CHARACTER MAPPING
*--------------------*/
static const uint16_t unicode_list_0[] = {
0x0, 0x8
};
/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
{
.range_start = 37, .range_length = 9, .glyph_id_start = 1,
.unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 2, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
},
{
.range_start = 47, .range_length = 12, .glyph_id_start = 3,
.unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
}
};
/*--------------------
* ALL CUSTOM DATA
*--------------------*/
#if LV_VERSION_CHECK(8, 0, 0)
/*Store all the custom data of the font*/
static lv_font_fmt_txt_glyph_cache_t cache;
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = NULL,
.kern_scale = 0,
.cmap_num = 2,
.bpp = 1,
.kern_classes = 0,
.bitmap_format = 0,
#if LV_VERSION_CHECK(8, 0, 0)
.cache = &cache
#endif
};
/*-----------------
* PUBLIC FONT
*----------------*/
/*Initialize a public general font descriptor*/
#if LV_VERSION_CHECK(8, 0, 0)
const lv_font_t jetbrains_mono_76 = {
#else
lv_font_t jetbrains_mono_76 = {
#endif
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
.line_height = 72, /*The maximum line height required by the font*/
.base_line = 8, /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
.subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0)
.underline_position = -12,
.underline_thickness = 4,
#endif
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
#endif /*#if JETBRAINS_MONO_76*/

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,6 @@
91,92c91,92
< 0x3f, 0x1f, 0xef, 0x3f, 0x87, 0xe1, 0xf8, 0x7f,
< 0xdf, 0xf7, 0xe1, 0xf8, 0x7e, 0x1f, 0xcf, 0x7f,
---
> 0x3f, 0x1f, 0xef, 0x3f, 0x87, 0xe1, 0xf8, 0x7e,
> 0xdf, 0xb7, 0xe1, 0xf8, 0x7e, 0x1f, 0xcf, 0x7f,

View File

@ -1,507 +0,0 @@
#include "lvgl/lvgl.h"
/*******************************************************************************
* Size: 80 px
* Bpp: 1
* Opts:
******************************************************************************/
#ifndef JETBRAINS_MONO_EXTRABOLD_COMPRESSED
#define JETBRAINS_MONO_EXTRABOLD_COMPRESSED 1
#endif
#if JETBRAINS_MONO_EXTRABOLD_COMPRESSED
/*-----------------
* BITMAPS
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
/* U+30 "0" */
0x0, 0x1, 0xff, 0xc0, 0x0, 0x0, 0xf, 0xff,
0xfe, 0x0, 0x0, 0x1f, 0xff, 0xff, 0xc0, 0x0,
0x3f, 0xff, 0xff, 0xf8, 0x0, 0x3f, 0xff, 0xff,
0xfe, 0x0, 0x3f, 0xff, 0xff, 0xff, 0x80, 0x3f,
0xff, 0xff, 0xff, 0xe0, 0x3f, 0xff, 0xff, 0xff,
0xf8, 0x1f, 0xff, 0xff, 0xff, 0xfc, 0x1f, 0xff,
0xff, 0xff, 0xff, 0x1f, 0xff, 0xe0, 0x3f, 0xff,
0xcf, 0xff, 0xc0, 0x7, 0xff, 0xe7, 0xff, 0xc0,
0x1, 0xff, 0xf7, 0xff, 0xc0, 0x0, 0x7f, 0xff,
0xff, 0xe0, 0x0, 0x3f, 0xff, 0xff, 0xe0, 0x0,
0xf, 0xff, 0xff, 0xf0, 0x0, 0x7, 0xff, 0xff,
0xf8, 0x0, 0x3, 0xff, 0xff, 0xfc, 0x0, 0x1,
0xff, 0xff, 0xfe, 0x0, 0x0, 0xff, 0xff, 0xff,
0x0, 0x0, 0x7f,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e,
0x7f, 0xfe, 0x3f, 0xfc, 0x1f, 0xf8, 0x7, 0xe0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x7, 0xe0, 0x1f, 0xf8,
0x3f, 0xfc, 0x7f, 0xfe, 0x7f, 0xfe, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0x7f, 0xfe, 0x7f, 0xfe, 0x3f, 0xfc,
0x1f, 0xf8, 0x7, 0xe0
};
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
{.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
{.bitmap_index = 0, .adv_w = 768, .box_w = 41, .box_h = 59, .ofs_x = 4, .ofs_y = -1},
{.bitmap_index = 303, .adv_w = 768, .box_w = 40, .box_h = 58, .ofs_x = 6, .ofs_y = 0},
{.bitmap_index = 593, .adv_w = 768, .box_w = 41, .box_h = 58, .ofs_x = 4, .ofs_y = 0},
{.bitmap_index = 891, .adv_w = 768, .box_w = 41, .box_h = 59, .ofs_x = 3, .ofs_y = -1},
{.bitmap_index = 1194, .adv_w = 768, .box_w = 38, .box_h = 58, .ofs_x = 4, .ofs_y = 0},
{.bitmap_index = 1470, .adv_w = 768, .box_w = 41, .box_h = 58, .ofs_x = 4, .ofs_y = -1},
{.bitmap_index = 1768, .adv_w = 768, .box_w = 42, .box_h = 59, .ofs_x = 3, .ofs_y = -1},
{.bitmap_index = 2078, .adv_w = 768, .box_w = 40, .box_h = 58, .ofs_x = 4, .ofs_y = 0},
{.bitmap_index = 2368, .adv_w = 768, .box_w = 42, .box_h = 60, .ofs_x = 3, .ofs_y = -1},
{.bitmap_index = 2683, .adv_w = 768, .box_w = 42, .box_h = 59, .ofs_x = 3, .ofs_y = 0},
{.bitmap_index = 2993, .adv_w = 768, .box_w = 16, .box_h = 46, .ofs_x = 16, .ofs_y = -1}
};
/*---------------------
* CHARACTER MAPPING
*--------------------*/
/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
{
.range_start = 48, .range_length = 11, .glyph_id_start = 1,
.unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
}
};
/*--------------------
* ALL CUSTOM DATA
*--------------------*/
/*Store all the custom data of the font*/
static lv_font_fmt_txt_dsc_t font_dsc = {
.glyph_bitmap = gylph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = NULL,
.kern_scale = 0,
.cmap_num = 1,
.bpp = 1,
.kern_classes = 0,
.bitmap_format = 0
};
/*-----------------
* PUBLIC FONT
*----------------*/
/*Initialize a public general font descriptor*/
lv_font_t jetbrains_mono_extrabold_compressed = {
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
.line_height = 60, /*The maximum line height required by the font*/
.base_line = 1, /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
.subpx = LV_FONT_SUBPX_NONE,
#endif
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
#endif /*#if JETBRAINS_MONO_EXTRABOLD_COMPRESSED*/

File diff suppressed because it is too large Load Diff

View File

@ -1,324 +0,0 @@
/*******************************************************************************
* Size: 48 px
* Bpp: 1
* Opts:
******************************************************************************/
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif
#ifndef LV_FONT_SYS_48
#define LV_FONT_SYS_48 1
#endif
#if LV_FONT_SYS_48
/*-----------------
* BITMAPS
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
/* U+E902 "" */
0x0, 0x1, 0xff, 0x80, 0x0, 0x0, 0x1, 0xff,
0x80, 0x0, 0x0, 0x1, 0xff, 0x80, 0x0, 0x0,
0x1, 0xff, 0x80, 0x0, 0x0, 0x1, 0xff, 0x80,
0x0, 0x0, 0x3, 0xff, 0xc0, 0x0, 0x6, 0x7,
0xff, 0xe0, 0x60, 0xf, 0x8f, 0xff, 0xf1, 0xf0,
0xf, 0xff, 0xff, 0xff, 0xf0, 0x1f, 0xff, 0xff,
0xff, 0xf8, 0x3f, 0xff, 0xff, 0xff, 0xfc, 0x3f,
0xff, 0xff, 0xff, 0xfc, 0x7f, 0xff, 0xff, 0xff,
0xfe, 0x7f, 0xff, 0x81, 0xff, 0xfe, 0x7f, 0xff,
0x0, 0xff, 0xfe, 0x3f, 0xfe, 0x0, 0x7f, 0xfc,
0x1f, 0xfc, 0x0, 0x3f, 0xf8, 0xf, 0xf8, 0x0,
0x1f, 0xf0, 0x7, 0xf8, 0x0, 0x1f, 0xe0, 0x7,
0xf8, 0x0, 0x1f, 0xe0, 0x7, 0xf8, 0x0, 0x1f,
0xe0, 0x7, 0xf8, 0x0, 0x1f, 0xe0, 0xf, 0xf8,
0x0, 0x1f, 0xf0, 0x1f, 0xfc, 0x0, 0x3f, 0xf8,
0x3f, 0xfe, 0x0, 0x7f, 0xfc, 0x7f, 0xff, 0x0,
0xff, 0xfe, 0x7f, 0xff, 0x81, 0xff, 0xfe, 0x7f,
0xff, 0xff, 0xff, 0xfe, 0x3f, 0xff, 0xff, 0xff,
0xfc, 0x3f, 0xff, 0xff, 0xff, 0xfc, 0x1f, 0xff,
0xff, 0xff, 0xf8, 0xf, 0xff, 0xff, 0xff, 0xf0,
0xf, 0x8f, 0xff, 0xf1, 0xf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0, 0x0,
0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0,
0x0, 0x0, 0x0, 0x7e, 0x0, 0x0, 0x0, 0x0,
0x3c, 0x0, 0x0
};
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
{.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
{.bitmap_index = 0, .adv_w = 768, .box_w = 40, .box_h = 40, .ofs_x = 4, .ofs_y = 0},
{.bitmap_index = 200, .adv_w = 768, .box_w = 46, .box_h = 46, .ofs_x = 1, .ofs_y = -3},
{.bitmap_index = 465, .adv_w = 768, .box_w = 46, .box_h = 46, .ofs_x = 1, .ofs_y = -3},
{.bitmap_index = 730, .adv_w = 768, .box_w = 46, .box_h = 46, .ofs_x = 1, .ofs_y = -3},
{.bitmap_index = 995, .adv_w = 768, .box_w = 34, .box_h = 40, .ofs_x = 7, .ofs_y = 0},
{.bitmap_index = 1165, .adv_w = 768, .box_w = 34, .box_h = 39, .ofs_x = 8, .ofs_y = 0},
{.bitmap_index = 1331, .adv_w = 768, .box_w = 40, .box_h = 39, .ofs_x = 4, .ofs_y = 0}
};
/*---------------------
* CHARACTER MAPPING
*--------------------*/
static const uint8_t glyph_id_ofs_list_0[] = {
0, 0, 1, 2, 3, 4, 0, 0,
0, 5, 6
};
/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
{
.range_start = 59650, .range_length = 11, .glyph_id_start = 1,
.unicode_list = NULL, .glyph_id_ofs_list = glyph_id_ofs_list_0, .list_length = 11, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_FULL
}
};
/*--------------------
* ALL CUSTOM DATA
*--------------------*/
#if LV_VERSION_CHECK(8, 0, 0)
/*Store all the custom data of the font*/
static lv_font_fmt_txt_glyph_cache_t cache;
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = NULL,
.kern_scale = 0,
.cmap_num = 1,
.bpp = 1,
.kern_classes = 0,
.bitmap_format = 0,
#if LV_VERSION_CHECK(8, 0, 0)
.cache = &cache
#endif
};
/*-----------------
* PUBLIC FONT
*----------------*/
/*Initialize a public general font descriptor*/
#if LV_VERSION_CHECK(8, 0, 0)
const lv_font_t lv_font_sys_48 = {
#else
lv_font_t lv_font_sys_48 = {
#endif
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
.line_height = 46, /*The maximum line height required by the font*/
.base_line = 3, /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
.subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0)
.underline_position = 0,
.underline_thickness = 0,
#endif
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
#endif /*#if LV_FONT_SYS_48*/

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 B

View File

@ -0,0 +1,52 @@
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BATTERYICON
#define LV_ATTRIBUTE_IMG_BATTERYICON
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATTERYICON uint8_t batteryicon_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x6a, 0xfc, 0x6c, 0xff, /*Color of index 1*/
0xe0, 0x70,
0xe0, 0x70,
0x00, 0x00,
0x00, 0x00,
0x3f, 0xc0,
0x3f, 0xc0,
0x3f, 0xc0,
0x3f, 0xc0,
0x3f, 0xc0,
0x3f, 0xc0,
0x3f, 0xc0,
0x3f, 0xc0,
0x3f, 0xc0,
0x3f, 0xc0,
0x3f, 0xc0,
0x3f, 0xc0,
0x3f, 0xc0,
0x3f, 0xc0,
0x00, 0x00,
0x00, 0x00,
};
const lv_img_dsc_t batteryicon = {
{
LV_IMG_CF_INDEXED_1BIT,
0,
0,
12,
20,
},
48,
batteryicon_map,
};

View File

@ -1,56 +0,0 @@
#include "lvgl/lvgl.h"
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_CK_OS_BATTERY_005
#define LV_ATTRIBUTE_IMG_CK_OS_BATTERY_005
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_CK_OS_BATTERY_005 uint8_t ck_os_battery_005_map[] = {
0x04, 0x02, 0xcc, 0xff, /*Color of index 0*/
0x6c, 0xfe, 0x6c, 0xff, /*Color of index 1*/
0xfc, 0x00, 0x3f,
0xf8, 0x00, 0x1f,
0xf0, 0x00, 0x0f,
0xf0, 0x00, 0x0f,
0x00, 0xff, 0x00,
0x00, 0xff, 0x00,
0x00, 0xff, 0x00,
0x00, 0xff, 0x00,
0x0f, 0xff, 0xf0,
0x0f, 0xff, 0xf0,
0x0f, 0xff, 0xf0,
0x0f, 0xff, 0xf0,
0x0f, 0xff, 0xf0,
0x0f, 0xff, 0xf0,
0x0f, 0xff, 0xf0,
0x0f, 0xff, 0xf0,
0x0f, 0xff, 0xf0,
0x0f, 0xff, 0xf0,
0x0f, 0xff, 0xf0,
0x0f, 0xff, 0xf0,
0x0f, 0xff, 0xf0,
0x0f, 0xff, 0xf0,
0x0f, 0xff, 0xf0,
0x0f, 0xff, 0xf0,
0x0f, 0xff, 0xf0,
0x0f, 0xff, 0xf0,
0x0f, 0xff, 0xf0,
0x0f, 0xff, 0xf0,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
};
const lv_img_dsc_t ck_os_battery_005 = {
.header.always_zero = 0,
.header.w = 24,
.header.h = 32,
.data_size = 104,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = ck_os_battery_005_map,
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,58 +0,0 @@
#include "lvgl/lvgl.h"
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_CK_OS_BATTERY_010
#define LV_ATTRIBUTE_IMG_CK_OS_BATTERY_010
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_CK_OS_BATTERY_010 uint8_t ck_os_battery_010_map[] = {
0x04, 0x02, 0xcc, 0xff, /*Color of index 0*/
0x6c, 0xfe, 0x6c, 0xff, /*Color of index 1*/
0x04, 0x7a, 0xf4, 0xff, /*Color of index 2*/
0xe4, 0xe6, 0xe4, 0xff, /*Color of index 3*/
0x55, 0x5f, 0xff, 0xff, 0xf5, 0x55, 0x55,
0x55, 0x7f, 0xff, 0xff, 0xfd, 0x55, 0x55,
0x55, 0xff, 0xff, 0xff, 0xff, 0x55, 0x55,
0x55, 0xff, 0xff, 0xff, 0xff, 0x55, 0x55,
0xff, 0xff, 0x55, 0x55, 0xff, 0xff, 0x55,
0xff, 0xff, 0x55, 0x55, 0xff, 0xff, 0x55,
0xff, 0xff, 0x55, 0x55, 0xff, 0xff, 0x55,
0xff, 0xff, 0x55, 0x55, 0xff, 0xff, 0x55,
0xff, 0x55, 0x55, 0x55, 0x55, 0xff, 0x55,
0xff, 0x55, 0x55, 0x55, 0x55, 0xff, 0x55,
0xff, 0x55, 0x55, 0x55, 0x55, 0xff, 0x55,
0xff, 0x55, 0x55, 0x55, 0x55, 0xff, 0x55,
0xff, 0x55, 0x55, 0x55, 0x55, 0xff, 0x55,
0xff, 0x55, 0x55, 0x55, 0x55, 0xff, 0x55,
0xff, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
0xff, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
0xff, 0x55, 0x55, 0x6a, 0xaa, 0xaa, 0xa9,
0xff, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa,
0xff, 0x55, 0x55, 0xaa, 0xa5, 0x5a, 0xaa,
0xff, 0x55, 0x55, 0xaa, 0xa5, 0x5a, 0xaa,
0xff, 0x55, 0x55, 0xaa, 0xa5, 0x5a, 0xaa,
0xff, 0x55, 0x55, 0xaa, 0xa5, 0x5a, 0xaa,
0xff, 0x55, 0x55, 0xaa, 0xa5, 0x5a, 0xaa,
0xff, 0x55, 0x55, 0xaa, 0xa5, 0x5a, 0xaa,
0xff, 0x50, 0x05, 0xaa, 0xaa, 0xaa, 0xaa,
0xff, 0x50, 0x05, 0xaa, 0xaa, 0xaa, 0xaa,
0xff, 0x55, 0x55, 0xaa, 0xa5, 0x5a, 0xaa,
0xff, 0x55, 0x55, 0xaa, 0xa5, 0x5a, 0xaa,
0xff, 0xff, 0xf5, 0xaa, 0xa5, 0x5a, 0xaa,
0xff, 0xff, 0xf5, 0xaa, 0xa5, 0x5a, 0xaa,
0xff, 0xff, 0xf5, 0xaa, 0xaa, 0xaa, 0xaa,
0xff, 0xff, 0xf5, 0x6a, 0xaa, 0xaa, 0xa9,
};
const lv_img_dsc_t ck_os_battery_010 = {
.header.always_zero = 0,
.header.w = 28,
.header.h = 32,
.data_size = 240,
.header.cf = LV_IMG_CF_INDEXED_2BIT,
.data = ck_os_battery_010_map,
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Some files were not shown because too many files have changed in this diff Show More