Skip to content

Commit

Permalink
Merge branch 'develop' of JF/PineTime into master
Browse files Browse the repository at this point in the history
  • Loading branch information
JF002 authored and Gitea committed Jan 7, 2022
2 parents cfef013 + 26ae828 commit adc7909
Show file tree
Hide file tree
Showing 239 changed files with 4,269 additions and 1,504 deletions.
2 changes: 2 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
Checks: '*,
-altera-unroll-loops,
-llvmlibc-callee-namespace,
-llvmlibc-implementation-in-namespace,
-llvmlibc-restrict-system-libc-headers,
-llvm-header-guard,
-llvm-namespace-comment,
-google-build-using-namespace,
-google-runtime-int,
-google-readability-namespace-comments,
-fuchsia-statically-constructed-objects,
-cppcoreguidelines-prefer-member-initializer,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-bounds-constant-array-index,
-cppcoreguidelines-pro-type-static-cast-downcast,
Expand Down
6 changes: 4 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
"terminal.integrated.shell.linux": "/bin/bash",
"editor.formatOnSave": true,
"clang-format.executable": "clang-format-12"
},

// Add the IDs of extensions you want installed when the container is created.
Expand All @@ -33,4 +35,4 @@
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode"
"remoteUser": "infinitime"
}
}
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ body:
*Please, before opening a bug report, check if similar issues already exist. In that case, use those issues to provide your feedback instead.*
- type: checkboxes
attributes:
label: Verification
options:
- label: I searched for similar bug reports and found none was relevant.
required: true
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ body:
*Please, before opening a feature request, check if similar issues already exist. In that case, use those issues to provide your feedback instead.*
- type: checkboxes
attributes:
label: Verification
options:
- label: I searched for similar feature request and found none was relevant.
required: true
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
run: |
mkdir -p build
cd build
cmake -DARM_NONE_EABI_TOOLCHAIN_PATH=${{ runner.temp }}/arm-none-eabi -DNRF5_SDK_PATH=${{ runner.temp }}/nrf5_sdk -DUSE_OPENOCD=1 -DBUILD_DFU=1 ../
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
Expand All @@ -125,8 +125,7 @@ jobs:

- name: Make pinetime-mcuboot-app
run: |
cd build
make pinetime-mcuboot-app
cmake --build build --target pinetime-mcuboot-app
- name: Unzip DFU package
run: |
Expand All @@ -144,8 +143,7 @@ jobs:

- name: Make pinetime-app
run: |
cd build
make pinetime-app
cmake --build build --target pinetime-app
- name: Upload standalone firmware
uses: actions/upload-artifact@v2
Expand All @@ -158,8 +156,7 @@ jobs:

- name: Make pinetime-recovery
run: |
cd build
make pinetime-recovery
cmake --build build --target pinetime-recovery
#########################################################################################
# Finish
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ Testing/Temporary/
#VSCODE
.vscode/.cortex-debug.registers.state.json
.vscode/.cortex-debug.peripherals.state.json

#build files
src/nRF5_SDK_15.3.0_59ac345
src/arm-none-eabi
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "src/libs/littlefs"]
path = src/libs/littlefs
url = https://github.com/littlefs-project/littlefs.git
[submodule "src/libs/QCBOR"]
path = src/libs/QCBOR
url = https://github.com/laurencelundblade/QCBOR.git
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.10)
project(pinetime VERSION 1.7.1 LANGUAGES C CXX ASM)
project(pinetime VERSION 1.8.0 LANGUAGES C CXX ASM)

set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 14)
Expand Down
117 changes: 20 additions & 97 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,81 +1,33 @@
# InfiniTime
# [InfiniTime](https://github.com/InfiniTimeOrg/InfiniTime)

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

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

The goal of this project is to design an open-source firmware for the [Pinetime smartwatch](https://www.pine64.org/pinetime/) :

- Code written in **modern C++**;
- Build system based on **CMake**;
- Based on **[FreeRTOS 10.0.0](https://freertos.org)** real-time OS.
- Using **[LittleVGL/LVGL 7](https://lvgl.io/)** as UI library...
- ... and **[NimBLE 1.3.0](https://github.com/apache/mynewt-nimble)** as BLE stack.
Fast open-source firmware for the [PineTime smartwatch](https://www.pine64.org/pinetime/) with many features, written in modern C++.

## New to InfiniTime?

- [Getting started with InfiniTime 1.0 (quick user guide, update bootloader and InfiniTime,...)](doc/gettingStarted/gettingStarted-1.0.md)
- [Flash, upgrade (OTA), time synchronization,...](doc/gettingStarted/ota-gadgetbridge-nrfconnect.md)

## Overview

![Pinetime screens](images/1.0.0/collage.png "PinetimeScreens")

As of now, here is the list of achievements of this project:

- Fast and optimized LCD driver
- BLE communication
- Rich user interface via display, touchscreen and pushbutton
- Time synchronization via BLE
- Notification via BLE
- Heart rate measurements
- Step counting
- Wake-up on wrist rotation
- Quick actions
* Disable vibration on notification
* Brightness settings
* Flashlight
* Settings
- 3 watch faces:
* Digital
* Analog
* [PineTimeStyle](https://wiki.pine64.org/wiki/PineTimeStyle)
- Multiple 'apps' :
* Music (control the playback of music on your phone)
* Heart rate (measure your heart rate)
* Navigation (displays navigation instructions coming from the companion app)
* Notification (displays the last notification received)
* Paddle (single player pong-like game)
* Twos (2048 clone game)
* Stopwatch
* Steps (displays the number of steps taken)
* Timer (set a countdown timer that will notify you when it expires)
* Metronome (vibrates to a given bpm with a customizable beats per bar)
- User settings:
* Display timeout
* Wake-up condition
* Time format (12/24h)
* Default watch face
* Daily step goal
* Battery status
* Firmware validation
* System information
- Supported by 3 companion apps (development is in progress):
* [Gadgetbridge](https://codeberg.org/Freeyourgadget/Gadgetbridge/) (on Android via F-Droid)
* [Amazfish](https://openrepos.net/content/piggz/amazfish) (on SailfishOS and Linux)
* [Siglo](https://github.com/alexr4535/siglo) (on Linux)
* **[Experimental]** [WebBLEWatch](https://hubmartin.github.io/WebBLEWatch/) Synchronize time directly from your web browser. [video](https://youtu.be/IakiuhVDdrY)
* **[Experimental]** [InfiniLink](https://github.com/xan-m/InfiniLink) (on iOS)
- OTA (Over-the-air) update via BLE
- [Bootloader](https://github.com/JF002/pinetime-mcuboot-bootloader) based on [MCUBoot](https://www.mcuboot.com)

## Documentation

### Develop
- [Getting started with InfiniTime](doc/gettingStarted/gettingStarted-1.0.md)
- [Updating the software](doc/gettingStarted/updating-software.md)
- [About the firmware and bootloader](doc/gettingStarted/about-software.md)
### Companion apps
- [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)

## Development

- [Rough structure of the code](doc/code/Intro.md)
- [How to implement an application](doc/code/Apps.md)
- [Generate the fonts and symbols](src/displayapp/fonts/README.md)
- [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)

### Contributing
- [How to contribute?](/doc/contribute.md)
- [Coding conventions](/doc/coding-convention.md)

### Build, flash and debug

Expand All @@ -84,16 +36,11 @@ As of now, here is the list of achievements of this project:
- [Files included in the release notes](doc/filesInReleaseNotes.md)
- [Build the project](doc/buildAndProgram.md)
- [Flash the firmware using OpenOCD and STLinkV2](doc/openOCD.md)
- [Flash the firmware using SWD interface](doc/SWD.md)
- [Build the project with Docker](doc/buildWithDocker.md)
- [Build the project with VSCode](doc/buildWithVScode.md)
- [Bootloader, OTA and DFU](./bootloader/README.md)
- [Stub using NRF52-DK](./doc/PinetimeStubWithNrf52DK.md)
- Logging with JLink RTT.
- Using files from the releases

### Contribute

- [How to contribute ?](doc/contribute.md)

### API

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

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

### Using the firmware

- [Integration with Gadgetbridge](doc/companionapps/Gadgetbridge.md)
- [Integration with AmazFish](doc/companionapps/Amazfish.md)
- [Firmware update, OTA](doc/companionapps/NrfconnectOTA.md)

## TODO - contribute

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.

Here a quick list out of my head of things to do for this project:

- Improve BLE communication stability and reliability
- Improve OTA and MCUBoot bootloader
- Add more functionalities : Alarm, chronometer, configuration, activities, heart rate logging, games,...
- Add more BLE functionalities : call notifications, agenda, configuration, data logging,...
- Measure power consumption and improve battery life
- Improve documentation, take better pictures and video than mine
- Improve the UI
- 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/).
- Design a simple CI (preferably self-hosted and easy to reproduce).

Do not hesitate to clone/fork the code, hack it and create pull-requests. I'll do my best to review and merge them :)

## Licenses

This project is released under the GNU General Public License version 3 or, at your option, any later version.
Expand Down
8 changes: 3 additions & 5 deletions bootloader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ sudo dfu.py -z /home/jf/nrf52/bootloader/dfu.zip -a <pinetime MAC address> --leg

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

See [this page](../doc/CompanionApps/NrfconnectOTA.md) for more info about OTA with NRFConect

### Firmware validation
Once the OTA is done, InfiniTime will reset the watch to apply the update. When the watch reboots, the new firmware is running.

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

Firmware validation application in the menu:

![Firmware Validation App](../doc/CompanionApps/firmwareValidationApp.jpg "Firmware Validation App")
![Firmware Validation App](../doc/bootloader/firmwareValidationApp.jpg "Firmware Validation App")

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

![Firmware Not Validated](../doc/CompanionApps/firmwareNoValidated.jpg "Firmware Not Validated")
![Firmware Not Validated](../doc/bootloader/firmwareNoValidated.jpg "Firmware Not Validated")

The firmware is validated!

![Firmware Validated](../doc/CompanionApps/firmwareValidated.jpg "Firmware Validated")
![Firmware Validated](../doc/bootloader/firmwareValidated.jpg "Firmware Validated")
Loading

0 comments on commit adc7909

Please sign in to comment.