Skip to content

Commit adc7909

Browse files
JF002Gitea
authored andcommitted
Merge branch 'develop' of JF/PineTime into master
2 parents cfef013 + 26ae828 commit adc7909

File tree

239 files changed

+4269
-1504
lines changed

Some content is hidden

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

239 files changed

+4269
-1504
lines changed

.clang-tidy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
Checks: '*,
22
-altera-unroll-loops,
33
-llvmlibc-callee-namespace,
4+
-llvmlibc-implementation-in-namespace,
45
-llvmlibc-restrict-system-libc-headers,
56
-llvm-header-guard,
67
-llvm-namespace-comment,
78
-google-build-using-namespace,
89
-google-runtime-int,
910
-google-readability-namespace-comments,
1011
-fuchsia-statically-constructed-objects,
12+
-cppcoreguidelines-prefer-member-initializer,
1113
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
1214
-cppcoreguidelines-pro-bounds-constant-array-index,
1315
-cppcoreguidelines-pro-type-static-cast-downcast,

.devcontainer/devcontainer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212

1313
// Set *default* container specific settings.json values on container create.
1414
"settings": {
15-
"terminal.integrated.shell.linux": "/bin/bash"
15+
"terminal.integrated.shell.linux": "/bin/bash",
16+
"editor.formatOnSave": true,
17+
"clang-format.executable": "clang-format-12"
1618
},
1719

1820
// Add the IDs of extensions you want installed when the container is created.
@@ -33,4 +35,4 @@
3335
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
3436
// "remoteUser": "vscode"
3537
"remoteUser": "infinitime"
36-
}
38+
}

.github/ISSUE_TEMPLATE/bug-report.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ body:
99
*Please, before opening a bug report, check if similar issues already exist. In that case, use those issues to provide your feedback instead.*
1010
- type: checkboxes
1111
attributes:
12+
label: Verification
1213
options:
1314
- label: I searched for similar bug reports and found none was relevant.
1415
required: true

.github/ISSUE_TEMPLATE/feature-request.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ body:
99
*Please, before opening a feature request, check if similar issues already exist. In that case, use those issues to provide your feedback instead.*
1010
- type: checkboxes
1111
attributes:
12+
label: Verification
1213
options:
1314
- label: I searched for similar feature request and found none was relevant.
1415
required: true

.github/workflows/main.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ jobs:
113113
run: |
114114
mkdir -p build
115115
cd build
116-
cmake -DARM_NONE_EABI_TOOLCHAIN_PATH=${{ runner.temp }}/arm-none-eabi -DNRF5_SDK_PATH=${{ runner.temp }}/nrf5_sdk -DUSE_OPENOCD=1 -DBUILD_DFU=1 ../
116+
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 ../
117117
118118
#########################################################################################
119119
# Make and Upload DFU Package
@@ -125,8 +125,7 @@ jobs:
125125

126126
- name: Make pinetime-mcuboot-app
127127
run: |
128-
cd build
129-
make pinetime-mcuboot-app
128+
cmake --build build --target pinetime-mcuboot-app
130129
131130
- name: Unzip DFU package
132131
run: |
@@ -144,8 +143,7 @@ jobs:
144143

145144
- name: Make pinetime-app
146145
run: |
147-
cd build
148-
make pinetime-app
146+
cmake --build build --target pinetime-app
149147
150148
- name: Upload standalone firmware
151149
uses: actions/upload-artifact@v2
@@ -158,8 +156,7 @@ jobs:
158156

159157
- name: Make pinetime-recovery
160158
run: |
161-
cd build
162-
make pinetime-recovery
159+
cmake --build build --target pinetime-recovery
163160
164161
#########################################################################################
165162
# Finish

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,7 @@ Testing/Temporary/
4343
#VSCODE
4444
.vscode/.cortex-debug.registers.state.json
4545
.vscode/.cortex-debug.peripherals.state.json
46+
47+
#build files
48+
src/nRF5_SDK_15.3.0_59ac345
49+
src/arm-none-eabi

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +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

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.10)
2-
project(pinetime VERSION 1.7.1 LANGUAGES C CXX ASM)
2+
project(pinetime VERSION 1.8.0 LANGUAGES C CXX ASM)
33

44
set(CMAKE_C_STANDARD 99)
55
set(CMAKE_CXX_STANDARD 14)

README.md

Lines changed: 20 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,33 @@
1-
# InfiniTime
1+
# [InfiniTime](https://github.com/InfiniTimeOrg/InfiniTime)
22

33
[![Build PineTime Firmware](https://github.com/InfiniTimeOrg/InfiniTime/workflows/Build%20PineTime%20Firmware/badge.svg?branch=master)](https://github.com/InfiniTimeOrg/InfiniTime/actions)
44

5-
![InfiniTime logo](images/infinitime-logo.jpg "InfiniTime Logo")
5+
![InfiniTime logo](images/infinitime-logo-small.jpg "InfiniTime Logo")
66

7-
The goal of this project is to design an open-source firmware for the [Pinetime smartwatch](https://www.pine64.org/pinetime/) :
8-
9-
- Code written in **modern C++**;
10-
- Build system based on **CMake**;
11-
- Based on **[FreeRTOS 10.0.0](https://freertos.org)** real-time OS.
12-
- Using **[LittleVGL/LVGL 7](https://lvgl.io/)** as UI library...
13-
- ... and **[NimBLE 1.3.0](https://github.com/apache/mynewt-nimble)** as BLE stack.
7+
Fast open-source firmware for the [PineTime smartwatch](https://www.pine64.org/pinetime/) with many features, written in modern C++.
148

159
## New to InfiniTime?
1610

17-
- [Getting started with InfiniTime 1.0 (quick user guide, update bootloader and InfiniTime,...)](doc/gettingStarted/gettingStarted-1.0.md)
18-
- [Flash, upgrade (OTA), time synchronization,...](doc/gettingStarted/ota-gadgetbridge-nrfconnect.md)
19-
20-
## Overview
21-
22-
![Pinetime screens](images/1.0.0/collage.png "PinetimeScreens")
23-
24-
As of now, here is the list of achievements of this project:
25-
26-
- Fast and optimized LCD driver
27-
- BLE communication
28-
- Rich user interface via display, touchscreen and pushbutton
29-
- Time synchronization via BLE
30-
- Notification via BLE
31-
- Heart rate measurements
32-
- Step counting
33-
- Wake-up on wrist rotation
34-
- Quick actions
35-
* Disable vibration on notification
36-
* Brightness settings
37-
* Flashlight
38-
* Settings
39-
- 3 watch faces:
40-
* Digital
41-
* Analog
42-
* [PineTimeStyle](https://wiki.pine64.org/wiki/PineTimeStyle)
43-
- Multiple 'apps' :
44-
* Music (control the playback of music on your phone)
45-
* Heart rate (measure your heart rate)
46-
* Navigation (displays navigation instructions coming from the companion app)
47-
* Notification (displays the last notification received)
48-
* Paddle (single player pong-like game)
49-
* Twos (2048 clone game)
50-
* Stopwatch
51-
* Steps (displays the number of steps taken)
52-
* Timer (set a countdown timer that will notify you when it expires)
53-
* Metronome (vibrates to a given bpm with a customizable beats per bar)
54-
- User settings:
55-
* Display timeout
56-
* Wake-up condition
57-
* Time format (12/24h)
58-
* Default watch face
59-
* Daily step goal
60-
* Battery status
61-
* Firmware validation
62-
* System information
63-
- Supported by 3 companion apps (development is in progress):
64-
* [Gadgetbridge](https://codeberg.org/Freeyourgadget/Gadgetbridge/) (on Android via F-Droid)
65-
* [Amazfish](https://openrepos.net/content/piggz/amazfish) (on SailfishOS and Linux)
66-
* [Siglo](https://github.com/alexr4535/siglo) (on Linux)
67-
* **[Experimental]** [WebBLEWatch](https://hubmartin.github.io/WebBLEWatch/) Synchronize time directly from your web browser. [video](https://youtu.be/IakiuhVDdrY)
68-
* **[Experimental]** [InfiniLink](https://github.com/xan-m/InfiniLink) (on iOS)
69-
- OTA (Over-the-air) update via BLE
70-
- [Bootloader](https://github.com/JF002/pinetime-mcuboot-bootloader) based on [MCUBoot](https://www.mcuboot.com)
71-
72-
## Documentation
73-
74-
### Develop
11+
- [Getting started with InfiniTime](doc/gettingStarted/gettingStarted-1.0.md)
12+
- [Updating the software](doc/gettingStarted/updating-software.md)
13+
- [About the firmware and bootloader](doc/gettingStarted/about-software.md)
14+
### Companion apps
15+
- [Gadgetbridge](https://gadgetbridge.org/) (Android)
16+
- [AmazFish](https://openrepos.net/content/piggz/amazfish/) (SailfishOS)
17+
- [Siglo](https://github.com/alexr4535/siglo) (Linux)
18+
- [InfiniLink](https://github.com/xan-m/InfiniLink) **[Experimental]** (iOS)
19+
20+
## Development
21+
7522
- [Rough structure of the code](doc/code/Intro.md)
7623
- [How to implement an application](doc/code/Apps.md)
7724
- [Generate the fonts and symbols](src/displayapp/fonts/README.md)
7825
- [Creating a stopwatch in Pinetime(article)](https://pankajraghav.com/2021/04/03/PINETIME-STOPCLOCK.html)
26+
- [Tips on designing an app UI](doc/ui_guidelines.md)
27+
28+
### Contributing
29+
- [How to contribute?](/doc/contribute.md)
30+
- [Coding conventions](/doc/coding-convention.md)
7931

8032
### Build, flash and debug
8133

@@ -84,16 +36,11 @@ As of now, here is the list of achievements of this project:
8436
- [Files included in the release notes](doc/filesInReleaseNotes.md)
8537
- [Build the project](doc/buildAndProgram.md)
8638
- [Flash the firmware using OpenOCD and STLinkV2](doc/openOCD.md)
39+
- [Flash the firmware using SWD interface](doc/SWD.md)
8740
- [Build the project with Docker](doc/buildWithDocker.md)
8841
- [Build the project with VSCode](doc/buildWithVScode.md)
8942
- [Bootloader, OTA and DFU](./bootloader/README.md)
9043
- [Stub using NRF52-DK](./doc/PinetimeStubWithNrf52DK.md)
91-
- Logging with JLink RTT.
92-
- Using files from the releases
93-
94-
### Contribute
95-
96-
- [How to contribute ?](doc/contribute.md)
9744

9845
### API
9946

@@ -103,30 +50,6 @@ As of now, here is the list of achievements of this project:
10350

10451
- [Memory analysis](./doc/MemoryAnalysis.md)
10552

106-
### Using the firmware
107-
108-
- [Integration with Gadgetbridge](doc/companionapps/Gadgetbridge.md)
109-
- [Integration with AmazFish](doc/companionapps/Amazfish.md)
110-
- [Firmware update, OTA](doc/companionapps/NrfconnectOTA.md)
111-
112-
## TODO - contribute
113-
114-
This project is far from being finished, and there are still a lot of things to do for this project to become a firmware usable by the general public.
115-
116-
Here a quick list out of my head of things to do for this project:
117-
118-
- Improve BLE communication stability and reliability
119-
- Improve OTA and MCUBoot bootloader
120-
- Add more functionalities : Alarm, chronometer, configuration, activities, heart rate logging, games,...
121-
- Add more BLE functionalities : call notifications, agenda, configuration, data logging,...
122-
- Measure power consumption and improve battery life
123-
- Improve documentation, take better pictures and video than mine
124-
- Improve the UI
125-
- Create companion app for multiple OSes (Linux, Android, iOS) and platforms (desktop, ARM, mobile). Do not forget the other devices from Pine64 like [the Pinephone](https://www.pine64.org/pinephone/) and the [Pinebook Pro](https://www.pine64.org/pinebook-pro/).
126-
- Design a simple CI (preferably self-hosted and easy to reproduce).
127-
128-
Do not hesitate to clone/fork the code, hack it and create pull-requests. I'll do my best to review and merge them :)
129-
13053
## Licenses
13154

13255
This project is released under the GNU General Public License version 3 or, at your option, any later version.

bootloader/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,6 @@ sudo dfu.py -z /home/jf/nrf52/bootloader/dfu.zip -a <pinetime MAC address> --leg
115115

116116
**Note** : dfu.py is a slightly modified version of [this repo](https://github.com/daniel-thompson/ota-dfu-python).
117117

118-
See [this page](../doc/CompanionApps/NrfconnectOTA.md) for more info about OTA with NRFConect
119-
120118
### Firmware validation
121119
Once the OTA is done, InfiniTime will reset the watch to apply the update. When the watch reboots, the new firmware is running.
122120

@@ -126,12 +124,12 @@ If the new firmware is working correctly, open the application menu and tap on t
126124

127125
Firmware validation application in the menu:
128126

129-
![Firmware Validation App](../doc/CompanionApps/firmwareValidationApp.jpg "Firmware Validation App")
127+
![Firmware Validation App](../doc/bootloader/firmwareValidationApp.jpg "Firmware Validation App")
130128

131129
The firmware is not validated yet. Tap 'Validate' to validate it, or 'Reset' to rollback to the previous version.
132130

133-
![Firmware Not Validated](../doc/CompanionApps/firmwareNoValidated.jpg "Firmware Not Validated")
131+
![Firmware Not Validated](../doc/bootloader/firmwareNoValidated.jpg "Firmware Not Validated")
134132

135133
The firmware is validated!
136134

137-
![Firmware Validated](../doc/CompanionApps/firmwareValidated.jpg "Firmware Validated")
135+
![Firmware Validated](../doc/bootloader/firmwareValidated.jpg "Firmware Validated")

0 commit comments

Comments
 (0)