Skip to content

Commit 9a0bfde

Browse files
authored
Merge branch 'InfiniTimeOrg:main' into vibration-settings
2 parents ffff67a + dbe8820 commit 9a0bfde

File tree

122 files changed

+1375
-495
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+1375
-495
lines changed

.github/workflows/main.yml

+14-4
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,30 @@ jobs:
4646
# Unzip the package because Upload Artifact will zip up the files
4747
- name: Unzip DFU package
4848
run: unzip ./build/output/pinetime-mcuboot-app-dfu-*.zip -d ./build/output/pinetime-mcuboot-app-dfu
49+
- name: Set ref_name, but replace slashes with dashes.
50+
shell: bash
51+
env:
52+
ref_name: ${{ github.head_ref || github.ref_name }}
53+
run: echo "REF_NAME=${ref_name//\//-}" >> $GITHUB_ENV
4954
- name: Upload DFU artifacts
5055
uses: actions/upload-artifact@v3
5156
with:
52-
name: InfiniTime DFU ${{ github.head_ref }}
57+
name: InfiniTime DFU ${{ env.REF_NAME }}
5358
path: ./build/output/pinetime-mcuboot-app-dfu/*
5459
- name: Upload MCUBoot image artifacts
5560
uses: actions/upload-artifact@v3
5661
with:
57-
name: InfiniTime MCUBoot image ${{ github.head_ref }}
62+
name: InfiniTime MCUBoot image ${{ env.REF_NAME }}
5863
path: ./build/output/pinetime-mcuboot-app-image-*.bin
64+
- name: Upload standalone ELF artifacts
65+
uses: actions/upload-artifact@v3
66+
with:
67+
name: InfiniTime image ${{ env.REF_NAME }}
68+
path: ./build/output/src/pinetime-app-*.out
5969
- name: Upload resources artifacts
6070
uses: actions/upload-artifact@v3
6171
with:
62-
name: InfiniTime resources ${{ github.head_ref }}
72+
name: InfiniTime resources ${{ env.REF_NAME }}
6373
path: ./build/output/infinitime-resources-*.zip
6474

6575
build-simulator:
@@ -100,7 +110,7 @@ jobs:
100110
- name: Upload simulator executable
101111
uses: actions/upload-artifact@v3
102112
with:
103-
name: infinisim-${{ github.head_ref }}
113+
name: infinisim-${{ env.REF_NAME }}
104114
path: build_lv_sim/infinisim
105115

106116
get-base-ref-size:

.gitmodules

-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
[submodule "src/libs/littlefs"]
55
path = src/libs/littlefs
66
url = https://github.com/littlefs-project/littlefs.git
7-
[submodule "src/libs/QCBOR"]
8-
path = src/libs/QCBOR
9-
url = https://github.com/laurencelundblade/QCBOR.git
107
[submodule "src/libs/arduinoFFT"]
118
path = src/libs/arduinoFFT
129
url = https://github.com/kosme/arduinoFFT.git

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.10)
22

33
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose Debug or Release")
44

5-
project(pinetime VERSION 1.14.0 LANGUAGES C CXX ASM)
5+
project(pinetime VERSION 1.15.0 LANGUAGES C CXX ASM)
66

77
set(CMAKE_C_STANDARD 99)
88
set(CMAKE_CXX_STANDARD 20)

README.md

+29-6
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,50 @@
1-
# [InfiniTime](https://github.com/InfiniTimeOrg/InfiniTime)
1+
<div align="center">
22

3-
![InfiniTime logo](doc/logo/infinitime-logo-small.jpg "InfiniTime Logo")
3+
![Header Image](doc/logo/watchface_collage.png)
44

5-
Fast open-source firmware for the [PineTime smartwatch](https://pine64.org/devices/pinetime/) with many features, written in modern C++.
5+
<br>
6+
7+
[![GitHub tag](https://img.shields.io/github/tag/InfiniTimeOrg/InfiniTime?include_prereleases=&sort=semver&color=blue)](https://github.com/InfiniTimeOrg/InfiniTime/releases)
8+
[![GitHub License](https://img.shields.io/github/license/InfiniTimeOrg/InfiniTime)](https://github.com/InfiniTimeOrg/InfiniLink/blob/main/LICENSE)
9+
[![Issues - InfiniTime](https://img.shields.io/github/issues/InfiniTimeOrg/InfiniTime)](https://github.com/InfiniTimeOrg/InfiniTime/issues)
10+
[![Pull Requests - InfiniTime](https://img.shields.io/github/issues-pr/InfiniTimeOrg/InfiniTime)](https://github.com/InfiniTimeOrg/InfiniTime/pulls)
11+
[![Downloads - InfiniTime](https://img.shields.io/github/downloads/InfiniTimeOrg/InfiniTime/total)](https://github.com/InfiniTimeOrg/InfiniTime)
12+
[![Stars - InfiniTime](https://img.shields.io/github/stars/InfiniTimeOrg/InfiniTime?style=social)](https://github.com/InfiniTimeOrg/InfiniTime/stargazers)
13+
[![Forks - InfiniTime](https://img.shields.io/github/forks/InfiniTimeOrg/InfiniTime?style=social)](https://github.com/InfiniTimeOrg/InfiniTime/network/members)
14+
15+
# InfiniTime
16+
17+
*Fast open-source firmware for the [PineTime smartwatch](https://pine64.org/devices/pinetime/) with many features, written in modern C++.*
18+
19+
<br>
20+
21+
</div>
622

723
## New to InfiniTime?
824

925
- [Getting started with InfiniTime](doc/gettingStarted/gettingStarted-1.0.md)
1026
- [Updating the software](doc/gettingStarted/updating-software.md)
1127
- [About the firmware and bootloader](doc/gettingStarted/about-software.md)
28+
- [Available apps](doc/gettingStarted/Applications.md)
29+
- [Available watch faces](/doc/gettingStarted/Watchfaces.md)
1230
- [PineTimeStyle Watch face](https://pine64.org/documentation/PineTime/Watchfaces/PineTimeStyle)
1331
- [Weather integration](https://pine64.org/documentation/PineTime/Software/InfiniTime_weather/)
1432

1533
### Companion apps
1634

1735
- [Gadgetbridge](https://gadgetbridge.org/) (Android)
18-
- [AmazFish](https://openrepos.net/content/piggz/amazfish/) (SailfishOS)
36+
- [Amazfish](https://github.com/piggz/harbour-amazfish/) ([SailfishOS](https://sailfishos-chum.github.io/apps/harbour-amazfish/), [Ubuntu Touch](https://open-store.io/app/uk.co.piggz.amazfish), [Flatpak](https://flathub.org/apps/uk.co.piggz.amazfish))
1937
- [Siglo](https://github.com/alexr4535/siglo) (Linux)
2038
- [InfiniLink](https://github.com/InfiniTimeOrg/InfiniLink) (iOS)
2139
- [ITD](https://gitea.elara.ws/Elara6331/itd) (Linux)
2240
- [WatchMate](https://github.com/azymohliad/watchmate) (Linux)
41+
- [InfiniTimeExplorer](https://infinitimeexplorer.netlify.app) (Web)
42+
43+
<br>
2344

24-
***Note**: We removed mentions to NRFConnect as this app is closed source and recent versions do not work anymore with InfiniTime (the last version known to work is 4.24.3). If you used NRFConnect in the past, we recommend you switch to [Gadgetbridge](https://gadgetbridge.org/).*
45+
> *InfiniTimeExplorer is only compatible with web browsers that support Web BLE. Current fully supported browsers include Chrome and Microsoft Edge.*
46+
>
47+
> *We removed mentions to NRFConnect as this app is closed source and recent versions do not work anymore with InfiniTime (the last version known to work is 4.24.3). If you used NRFConnect in the past, we recommend you switch to [Gadgetbridge](https://gadgetbridge.org/).*
2548
2649
## Development
2750

@@ -35,7 +58,7 @@ Fast open-source firmware for the [PineTime smartwatch](https://pine64.org/devic
3558

3659
### Contributing
3760

38-
- [How to contribute?](CONTRIBUTING.md)
61+
- [How to contribute](CONTRIBUTING.md)
3962
- [Coding conventions](doc/coding-convention.md)
4063

4164
### Build, flash and debug

doc/gettingStarted/Applications.md

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Applications
2+
3+
InfiniTime has 13 apps on the `main` branch at the time of writing.
4+
5+
## List of apps
6+
- Stopwatch
7+
- Alarm
8+
- Timer
9+
- Steps
10+
- Heartrate
11+
- Music
12+
- InfiniPaint
13+
- Paddle
14+
- 2
15+
- InfiniDice
16+
- Metronome
17+
- Maps
18+
- Weather
19+
20+
### Stopwatch
21+
![Stopwatch UI](/doc/gettingStarted/AppsScreenshots/stopwatch.png)
22+
- Press the Start button (bottom right) to start or stop the timer.
23+
- You can also press the side button while the timer is running to pause the timer.
24+
- Press the Flag button (bottom left) to add a lap.
25+
- The stopwatch will not yet continue counting time while the app is closed.
26+
27+
### Alarm
28+
![Alarm UI](/doc/gettingStarted/AppsScreenshots/alarm.png)
29+
- Ajust the time with the time picker.
30+
- Press the Info button in the top middle to see time remaning.
31+
- Use the toggle in the bottom left to turn the alarm on/off.
32+
- Use the button in the bottom right to change the alarm frequency.
33+
- You can choose between once, daily, or Monday - Friday.
34+
35+
### Timer
36+
![Timer UI](/doc/gettingStarted/AppsScreenshots/timer.png)
37+
- Ajust how long the timer should go for with the time picker.
38+
- Press the Start button at the bottom to start/stop the timer.
39+
40+
### Steps
41+
![Steps UI](/doc/gettingStarted/AppsScreenshots/steps.png)
42+
- The total count of steps for the current display will show in the middle of the screen.
43+
- The Reset button in the bottom middle resets the Trip counter. (Total of all steps taken.)
44+
- The progress circle shows the percentage of your daily goal completed.
45+
46+
### Heartrate
47+
![Heartrate UI](/doc/gettingStarted/AppsScreenshots/Heartrate.png)
48+
- Press Start to start measuring your heartrate.
49+
- It may take a bit to get the first measurement.
50+
51+
### Music
52+
![Music UI](/doc/gettingStarted/AppsScreenshots/Music.png)
53+
- This app shows currently playing music.
54+
- Please note that this app is not very useful without a device connected.
55+
- Press the button in the center to play/pause, and the buttons on the left and right to go to the previous and next tracks, respectively.
56+
- Swipe up to get to volume controls.
57+
58+
### InfiniPaint
59+
![InfiniPaint UI](/doc/gettingStarted/AppsScreenshots/Paint.png)
60+
- This app does not allow you to swipe from the top to exit, use the side button instead.
61+
- Draw on the screen to add lines.
62+
- Hold down in one spot to change paint colors.
63+
64+
### Paddle
65+
![Paddle UI](/doc/gettingStarted/AppsScreenshots/Pong.png)
66+
- This app does not allow you to swipe from the top to exit, use the side button instead.
67+
- Drag your finger to move the paddle.
68+
- Goal: Don't let the ball go off the left side of the screen.
69+
70+
### 2
71+
![2 UI](/doc/gettingStarted/AppsScreenshots/2048.png)
72+
- This app does not allow you to swipe from the top to exit, use the side button instead.
73+
- Play a game of 2048.
74+
- Swipe up, down, left, or right tomove the tiles.
75+
- When two tiles with the same number run into each other, they will add together.
76+
- Goal: Don't let the screen fill up with tiles, and get to the 2048 tile to win.
77+
78+
### InfiniDice
79+
![InfiniDice UI](/doc/gettingStarted/AppsScreenshots/Dice.png)
80+
- Ajust the count to change the number of dice.
81+
- Ajust the sides to change the number of sides.
82+
- Press the button at the bottom to roll.
83+
- The result will be on the right side of the screen.
84+
85+
### Metronome
86+
![Metronome UI](/doc/gettingStarted/AppsScreenshots/Metronome.png)
87+
- Ajust the BPM with the circular slider.
88+
- A bug currently makes it always snap to 98 BPM.
89+
- Use the button in the bottom left to start the metronome.
90+
91+
### Maps
92+
![Maps UI](/doc/gettingStarted/AppsScreenshots/Maps.png)
93+
- This app shows info from a navigation app.
94+
- Please note that this app is not very useful without a device connected.
95+
96+
### Weather
97+
![Weather UI](/doc/gettingStarted/AppsScreenshots/Weather.png)
98+
- This app shows weather info.
99+
- Please note that this app is not very useful without a device connected.
4.43 KB
Loading
4.59 KB
Loading
4.27 KB
Loading
3.19 KB
Loading
8.83 KB
Loading
6.13 KB
Loading
3.06 KB
Loading
2.92 KB
Loading
2.57 KB
Loading
4.95 KB
Loading
6.83 KB
Loading
2.87 KB
Loading
3.45 KB
Loading

doc/gettingStarted/Watchfaces.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Watchfaces
2+
3+
InfiniTime has 6 apps on the `main` branch at the time of writing.
4+
5+
## List of apps
6+
- Digital
7+
- Analog
8+
- PineTimeStyle
9+
- Terminal
10+
- Infinineat
11+
- Casio G7710
12+
13+
### Digital
14+
![Digital face](/doc/gettingStarted/Watchfaces/Digital.png)
15+
16+
### Analog
17+
![Analog face](/doc/gettingStarted/Watchfaces/Analog.png)
18+
19+
### PineTimeStyle
20+
![PineTimeStyle face](/doc/gettingStarted/Watchfaces/PineTimeStyle.png)
21+
- You can long-press on the display to change colors, step style, and weather.
22+
23+
### Terminal
24+
![Terminal face](/doc/gettingStarted/Watchfaces/Terminal.png)
25+
26+
### Infinineat
27+
![Infinineat face](/doc/gettingStarted/Watchfaces/Infinineat.png)
28+
- You can long-press on the display to change colors.
29+
30+
### Casio G7710
31+
![Casio G7710 face](/doc/gettingStarted/Watchfaces/CasioG7710.png)
4.6 KB
Loading
6.38 KB
Loading
4.77 KB
Loading
8.85 KB
Loading
6.39 KB
Loading
6.04 KB
Loading

doc/gettingStarted/gadgetbridge0.jpg

89.7 KB
Loading

doc/gettingStarted/gadgetbridge1.jpg

44.6 KB
Loading

doc/gettingStarted/gadgetbridge2.jpg

75 KB
Loading

doc/gettingStarted/gadgetbridge3.jpg

61.8 KB
Loading

doc/gettingStarted/gadgetbridge4.jpg

94 KB
Loading

doc/gettingStarted/gadgetbridge5.jpg

223 KB
Loading

doc/gettingStarted/gettingStarted-1.0.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ You can sync the time using companion apps.
1414

1515
- Gadgetbridge automatically synchronizes the time when you connect it to your watch. More information on Gadgetbridge [here](/doc/gettingStarted/ota-gadgetbridge.md)
1616
- [Sync the time with NRFConnect](/doc/gettingStarted/time-nrfconnect.md)
17-
- Sync the time with your browser https://hubmartin.github.io/WebBLEWatch/
17+
- [Sync the time with your browser](https://hubmartin.github.io/WebBLEWatch/)
1818

1919
You can also set the time in the settings without a companion app. (version >1.7.0)
2020

@@ -46,7 +46,7 @@ On the bottom right, you can see how many steps you have taken today.
4646
![Settings](ui/settings.jpg)
4747

4848
- Swipe **up** to display the application menus. Apps (stopwatch, music, step, games,...) can be started from this menu.
49-
- Swipe **down** to display the notification panel. Notification sent by your companion app will be displayed here.
49+
- Swipe **down** to display the notification panel. Notifications sent by your companion app will be displayed here.
5050
- Swipe **right** to display the Quick Actions menu. This menu allows you to
5151
- Set the brightness of the display
5252
- Start the **flashlight** app
+13-7
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,35 @@
11
# Connecting to Gadgetbridge
22

3-
Launch Gadgetbridge and tap on the **"+"** button on the bottom right to add a new device:
3+
Launch Gadgetbridge and tap on the menu button in the top left:
44

55
![Gadgetbridge 0](gadgetbridge0.jpg)
66

7-
Wait for the scan to complete, your PineTime should be detected:
7+
Press the "Connect new device" button:
88

99
![Gadgetbridge 1](gadgetbridge1.jpg)
1010

11+
Your PineTime should appear on the list. Tap on it.
12+
1113
Tap on it. Gadgdetbridge will pair and connect to your device:
1214

1315
![Gadgetbridge 2](gadgetbridge2.jpg)
1416

1517
# Updating with Gadgetbridge
1618

17-
Now that Gadgetbridge is connected to your PineTime, use a file browser application and find the DFU file (`pinetime-mcuboot-app-dfu-x.x.x.zip`) you downloaded previously. Tap on it and open it using the Gadgetbridge application/firmware installer:
19+
Now that Gadgetbridge is connected to your PineTime, press the three dots on the device card:
1820

1921
![Gadgetbridge 3](gadgetbridge3.jpg)
2022

21-
Read the warning carefully and tap **Install**:
23+
Now press the "File Installer" button:
2224

2325
![Gadgetbridge 4](gadgetbridge4.jpg)
2426

25-
Wait for the transfer to finish. Your PineTime should reset and reboot with the new version of InfiniTime!
26-
27-
Don't forget to **validate** your firmware. In the InfiniTime go to the settings (swipe right, select gear icon) and Firmware option and click **validate**. Otherwise after reboot the previous firmware will be used.
27+
Select the firmware you downloaded (`pinetime-mcuboot-app-dfu-x.x.x.zip`) from the [Releases tab](https://github.com/InfiniTimeOrg/InfiniTime/releases/latest):
2828

2929
![Gadgetbridge 5](gadgetbridge5.jpg)
30+
31+
Wait for the transfer to finish. There will be a progress bar on both the watch and the phone. Your PineTime should reboot with the new version of InfiniTime!
32+
33+
Don't forget to **validate** your firmware. In the InfiniTime go to the settings (swipe right, select gear icon) and scroll to the Firmware option and click **validate**. Otherwise, after reboot the previous firmware will be used.
34+
35+
![Validate](validate.png)

doc/gettingStarted/updating-software.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ If you just want to flash or upgrade InfiniTime on your PineTime, this page is f
66

77
You can check the InfiniTime version by first swiping right on the watch face to open quick settings, tapping the cogwheel to open settings, swipe up until you find an entry named "About" and tap on it.
88

9-
![InfiniTime 1.0 version](version-1.0.jpg)
9+
![InfiniTime 1.14 version](version.png)
1010

1111
PineTimes shipped after June 2021 will ship with the latest version of [the bootloader](https://github.com/JF002/pinetime-mcuboot-bootloader/releases/tag/1.0.0) and [recovery firmware](https://github.com/InfiniTimeOrg/InfiniTime/releases/tag/0.14.1)
1212

@@ -49,7 +49,7 @@ Since those resources are not part of the firmware, they need to be flashed and
4949
Resources are packaged into a single .zip file named `infinitime-resources-x.y.z.zip` (where `x`, `y` and `z` are the version numbers of InfiniTime).
5050
You can use the companion app of your choice to flash the resources.
5151

52-
**Note : at the time of writing this page, [Amazfish](https://github.com/piggz/harbour-amazfish) and [ITD](https://gitea.arsenm.dev/Arsen6331/itd) have already integrated this functionality. Other companion apps will hopefully implement it soon!*
52+
**Note: at the time of writing this page, [Amazfish](https://github.com/piggz/harbour-amazfish) and [ITD](https://gitea.arsenm.dev/Arsen6331/itd) have already integrated this functionality. Other companion apps will hopefully implement it soon!*
5353

5454
## Amazfish
5555
Use the `Download file` functionality of Amazfish.

doc/gettingStarted/validate.png

5.34 KB
Loading

doc/gettingStarted/version.png

3.74 KB
Loading

doc/logo/watchface_collage.png

846 KB
Loading

docker/Dockerfile

+4-1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ RUN bash -c "source /opt/build.sh; GetMcuBoot;"
6464

6565
# Add the infinitime user for connecting devcontainer
6666
RUN adduser infinitime
67-
67+
68+
# Configure Git to accept the /sources directory as safe
69+
RUN git config --global --add safe.directory /sources
70+
6871
ENV SOURCES_DIR /sources
6972
CMD ["/opt/build.sh"]

src/CMakeLists.txt

+7-1
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,7 @@ list(APPEND SOURCE_FILES
480480

481481
systemtask/SystemTask.cpp
482482
systemtask/SystemMonitor.cpp
483+
systemtask/WakeLock.cpp
483484
drivers/TwiMaster.cpp
484485

485486
heartratetask/HeartRateTask.cpp
@@ -544,6 +545,7 @@ list(APPEND RECOVERY_SOURCE_FILES
544545

545546
systemtask/SystemTask.cpp
546547
systemtask/SystemMonitor.cpp
548+
systemtask/WakeLock.cpp
547549
drivers/TwiMaster.cpp
548550
components/rle/RleDecoder.cpp
549551
components/heartrate/HeartRateController.cpp
@@ -662,6 +664,7 @@ set(INCLUDE_FILES
662664
displayapp/InfiniTimeTheme.h
663665
systemtask/SystemTask.h
664666
systemtask/SystemMonitor.h
667+
systemtask/WakeLock.h
665668
displayapp/screens/Symbols.h
666669
drivers/TwiMaster.h
667670
heartratetask/HeartRateTask.h
@@ -787,6 +790,10 @@ add_definitions(-DFREERTOS)
787790
add_definitions(-D__STACK_SIZE=1024)
788791
add_definitions(-D__HEAP_SIZE=0)
789792
add_definitions(-DMYNEWT_VAL_BLE_LL_RFMGMT_ENABLE_TIME=1500)
793+
add_definitions(-DLFS_CONFIG=libs/lfs_config.h)
794+
795+
# _sbrk is purposefully not implemented so that builds fail when it is used
796+
add_link_options(-Wl,-wrap=malloc -Wl,-wrap=free -Wl,-wrap=calloc -Wl,-wrap=realloc -Wl,-wrap=_malloc_r -Wl,-wrap=_sbrk)
790797

791798
# Note: Only use this for debugging
792799
# Derive the low frequency clock from the main clock (SYNT)
@@ -862,7 +869,6 @@ target_compile_options(nrf-sdk PRIVATE
862869
$<$<CONFIG:RELEASE>: ${RELEASE_FLAGS}>
863870
$<$<COMPILE_LANGUAGE:CXX>: ${CXX_FLAGS}>
864871
$<$<COMPILE_LANGUAGE:ASM>: ${ASM_FLAGS}>
865-
-O3
866872
)
867873

868874
# NimBLE

0 commit comments

Comments
 (0)