From a631fa351858f722f8c4ba7992901722acf3f0c9 Mon Sep 17 00:00:00 2001 From: mabuch Date: Mon, 15 Nov 2021 20:41:32 +0100 Subject: fix Motion Service UUID in doc and code comments --- doc/MotionService.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/MotionService.md b/doc/MotionService.md index 0d0a5514..7cec3fba 100644 --- a/doc/MotionService.md +++ b/doc/MotionService.md @@ -3,13 +3,13 @@ The motion service exposes step count and raw X/Y/Z motion value as READ and NOTIFY characteristics. ## Service -The service UUID is **00020000-78fc-48fe-8e23-433b3a1942d0** +The service UUID is **00030000-78fc-48fe-8e23-433b3a1942d0** ## Characteristics -### Step count (UUID 00020001-78fc-48fe-8e23-433b3a1942d0) +### Step count (UUID 00030001-78fc-48fe-8e23-433b3a1942d0) The current number of steps represented as a single `uint32_t` (4 bytes) value. -### Raw motion values (UUID 00020002-78fc-48fe-8e23-433b3a1942d0) +### Raw motion values (UUID 00030002-78fc-48fe-8e23-433b3a1942d0) The current raw motion values. This is a 3 `int16_t` array: - [0] : X -- cgit v1.2.3-70-g09d2 From 3a41bff9eaf9cbae6d3864664ad08859ec2d2c44 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Sat, 6 Nov 2021 00:02:17 +0100 Subject: docs: add non-relative includes to coding standard --- doc/contribute.md | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/contribute.md b/doc/contribute.md index 595a5996..f7b8ea3e 100644 --- a/doc/contribute.md +++ b/doc/contribute.md @@ -94,6 +94,7 @@ If there are no preconfigured rules for your IDE, you can use one of the existin - **Includes** : - files from the project : `#include "relative/path/to/the/file.h"` - external files and std : `#include ` + - use includes relative to included directories like `src`, not relative to the current file. Don't do: `#include "../file.h"` - Only use [primary spellings for operators and tokens](https://en.cppreference.com/w/cpp/language/operator_alternative) - Use auto sparingly. Don't use auto for [fundamental/built-in types](https://en.cppreference.com/w/cpp/language/types) and [fixed width integer types](https://en.cppreference.com/w/cpp/types/integer), except when initializing with a cast to avoid duplicating the type name. - Examples: -- cgit v1.2.3-70-g09d2 From 7322f3286bd4aa15f671e780fa09d36b12ef0f20 Mon Sep 17 00:00:00 2001 From: Arsen6331 Date: Mon, 22 Nov 2021 00:35:50 +0000 Subject: Add documentation for BLE FS --- doc/BLEFS.md | 167 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 doc/BLEFS.md (limited to 'doc') diff --git a/doc/BLEFS.md b/doc/BLEFS.md new file mode 100644 index 00000000..519d84a9 --- /dev/null +++ b/doc/BLEFS.md @@ -0,0 +1,167 @@ +# BLE FS +--- + +The BLE FS protocol in InfiniTime is mostly Adafruit's BLE file transfer protocol, as described in [adafruit/Adafruit_CircuitPython_BLE_File_Transfer](https://github.com/adafruit/Adafruit_CircuitPython_BLE_File_Transfer). There are some deviations, such as the status codes. These will be described later in the document. + +--- + +## UUIDs + +There are two relevant UUIDs in this protocol: the version characteristic, and the raw transfer characteristic. + +### Version + +UUID: `adaf0100-4669-6c65-5472-616e73666572` + +The version characteristic returns the version of the protocol to which the sender adheres. It returns a single unsigned 32-bit integer. The latest version at the time of writing this is 4. + +### Transfer + +UUID: `adaf0200-4669-6c65-5472-616e73666572` + +The transfer characteristic is responsible for all the data transfer between the client and the watch. It supports write and notify. Writing a packet on the characteristic results in a response via notify. + +--- + +## Usage + +The separator for paths is `/`, and absolute paths must start with `/`. + +All of the following commands and responses are transferred via the transfer characteristic + +### Read file + +To begin reading a file, a header must first be sent. The header packet should be formatted like so: + +- Command (single byte): `0x10` +- 1 byte of padding +- Unsigned 16-bit integer encoding the length of the file path. +- Unsigned 32-bit integer encoding the location at which to start reading the first chunk. +- Unsigned 32-bit integer encoding the amount of bytes to be read. +- File path: UTF-8 encoded string that is _not_ null terminated. + +To continue reading the file after this initial packet, the following packet should be sent until all the data has been received. No close command is required after the data has been received. + +- Command (single byte): `0x12` +- Status: `0x01` +- 2 bytes of padding +- Unsigned 32-bit integer encoding the location at which to start reading the next chunk. +- Unsigned 32-bit integer encoding the amount of bytes to be read. This may be different from the size in the header. + +Both of these commands receive the following response: + +- Command (single byte): `0x11` +- Status (signed 8-bit integer) +- 2 bytes of padding +- Unsigned 32-bit integer encoding the offset of this chunk +- Unsigned 32-bit integer encoding the total size of the file +- Unsigned 32-bit integer encoding the amount of data in the current chunk +- Contents of the current chunk + +### Write file + +To begin writing to a file, a header must first be sent. The header packet should be formatted like so: + +- Command (single byte): `0x20` +- 1 byte of padding +- Unsigned 16-bit integer encoding the length of the file path. +- Unsigned 32-bit integer encoding the location at which to start writing to the file. +- Unsigned 64-bit integer encoding the unix timestamp with nanosecond resolution. This will be used as the modification time. At the time of writing, this is not implemented in InfiniTime, but may be in the future. +- Unsigned 32-bit integer encoding the size of the file that will be sent +- File path: UTF-8 encoded string that is _not_ null terminated. + +To continue reading the file after this initial packet, the following packet should be sent until all the data has been sent and a response had been received with 0 free space. No close command is required after the data has been received. + +- Command (single byte): `0x22` +- Status: `0x01` +- 2 bytes of padding. +- Unsigned 32-bit integer encoding the location at which to write the next chunk. +- Unsigned 32-bit integer encoding the amount of bytes to be written. +- Data + +Both of these commands receive the following response: + +- Command (single byte): `0x21` +- Status (signed 8-bit integer) +- 2 bytes of padding +- Unsigned 32-bit integer encoding the current offset in the file +- Unsigned 64-bit integer encoding the unix timestamp with nanosecond resolution. This will be used as the modification time. At the time of writing, this is not implemented in InfiniTime, but may be in the future. +- Unsigned 32-bit integer encoding the amount of data the client can send until the file is full. + +### Delete file + +- Command (single byte): `0x30` +- 1 byte of padding +- Unsigned 16-bit integer encoding the length of the file path. +- File path: UTF-8 encoded string that is _not_ null terminated. + +The response to this packet will be as follows: + +- Command (single byte): `0x31` +- Status (signed 8-bit integer) + +### Make directory + +- Command (single byte): `0x40` +- 1 byte of padding +- Unsigned 16-bit integer encoding the length of the file path. +- 4 bytes of padding +- Unsigned 64-bit integer encoding the unix timestamp with nanosecond resolution. +- File path: UTF-8 encoded string that is _not_ null terminated. + +The response to this packet will be as follows: + +- Command (single byte): `0x41` +- Status (signed 8-bit integer) +- 6 bytes of padding +- Unsigned 64-bit integer encoding the unix timestamp with nanosecond resolution. + +### List directory + +Paths returned by this command are relative to the path given in the request + +- Command (single byte): `0x50` +- 1 byte of padding +- Unsigned 16-bit integer encoding the length of the file path. +- File path: UTF-8 encoded string that is _not_ null terminated. + +The response to this packet will be as follows. Responses will be sent until the final entry, which will have entry number == total entries + +- Command (single byte): `0x51` +- Status (signed 8-bit integer) +- Unsigned 16-bit integer encoding the length of the file path. +- Unsigned 32-bit integer encoding the entry number +- Unsigned 32-bit integer encoding the total amount of entries +- Flags: unsigned 32-bit integer + + Bit 0: Set when entry is a directory + + Bits 1-7: Reserved +- Unsigned 64-bit integer encoding the unix timestamp of the modification time with nanosecond resolution +- Unsigned 32-bit integer encoding the size of the file +- Path: UTF-8 encoded string that is _not_ null terminated. + +### Move file or directory + +- Command (single byte): `0x60` +- 1 byte of padding +- Unsigned 16-bit integer encoding the length of the old path +- Unsigned 16-bit integer encoding the length of the new path +- Old path: UTF-8 encoded string that is _not_ null terminated. +- 1 byte of padding +- Newpath: UTF-8 encoded string that is _not_ null terminated. + +The response to this packet will be as follows: + +- Command (single byte): `0x61` +- Status (signed 8-bit integer) + +--- + +## Deviations + +This section describes the differences between Adafruit's spec and InfiniTime's implementation. + +### Status codes + +The status codes returned by InfiniTime are a signed 8-bit integer, rather than an unsigned one as described in the spec. + +InfiniTime uses LittleFS error codes rather than the ones described in the spec. Those codes can be found in [lfs.h](https://github.com/littlefs-project/littlefs/blob/master/lfs.h#L70). \ No newline at end of file -- cgit v1.2.3-70-g09d2 From 47f73269bbf24aeabeacd5190d64133f46372525 Mon Sep 17 00:00:00 2001 From: Arsen6331 Date: Wed, 24 Nov 2021 22:22:04 +0000 Subject: Add BLE FS docs link to BLE docs --- doc/ble.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ble.md b/doc/ble.md index 8573166f..c36fa62b 100644 --- a/doc/ble.md +++ b/doc/ble.md @@ -9,6 +9,7 @@ This page describes the BLE implementation and API built in this firmware. ### Table of Contents - [BLE Connection](#ble-connection) +- [BLE FS](#ble-fs) - [BLE UUIDs](#ble-uuids) - [BLE Services](#ble-services) - [CTS](#cts) @@ -51,6 +52,13 @@ If **CTS** is detected, it'll request the current time to the companion applicat --- +## BLE FS + +The documentation for BLE FS can be found here: +[BLEFS.md](./BLEFS.md) + +--- + ## BLE UUIDs When possible, InfiniTime tries to implement BLE services defined by the BLE specification. @@ -285,4 +293,4 @@ This characteristic expects a particular format: - Microsecond divided by `1e6*256` (`uint8`) - Binary 0001 (`uint8`) -Write all of these together, encoded as little-endian, to the current time characteristic. \ No newline at end of file +Write all of these together, encoded as little-endian, to the current time characteristic. -- cgit v1.2.3-70-g09d2 From 4aaf3d06bceadb05de0d3a9b0de94e4aba215131 Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Sat, 6 Nov 2021 14:38:11 +0200 Subject: Documentation cleanup and reorganization --- README.md | 100 +++----------------- doc/SWD.md | 14 +++ doc/companionapps/Gadgetbridge.md | 10 +- doc/companionapps/NrfconnectOTA.md | 12 --- doc/gettingStarted/gettingStarted-1.0.md | 101 +++----------------- doc/gettingStarted/ota-gadgetbridge-nrfconnect.md | 109 ---------------------- doc/gettingStarted/ota-gadgetbridge.md | 39 ++++++++ doc/gettingStarted/ota-nrfconnect.md | 32 +++++++ doc/gettingStarted/time-nrfconnect.md | 11 +++ doc/gettingStarted/updating-software.md | 50 ++++++++++ images/infinitime-logo-github.jpg | Bin 37430 -> 0 bytes images/infinitime-logo-small.jpg | Bin 0 -> 31710 bytes 12 files changed, 173 insertions(+), 305 deletions(-) create mode 100644 doc/SWD.md delete mode 100644 doc/companionapps/NrfconnectOTA.md delete mode 100644 doc/gettingStarted/ota-gadgetbridge-nrfconnect.md create mode 100644 doc/gettingStarted/ota-gadgetbridge.md create mode 100644 doc/gettingStarted/ota-nrfconnect.md create mode 100644 doc/gettingStarted/time-nrfconnect.md create mode 100644 doc/gettingStarted/updating-software.md delete mode 100644 images/infinitime-logo-github.jpg create mode 100644 images/infinitime-logo-small.jpg (limited to 'doc') diff --git a/README.md b/README.md index 765aa863..22c91b5c 100644 --- a/README.md +++ b/README.md @@ -1,73 +1,18 @@ -# 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. +InfiniTime is an open-source firmware for the [Pinetime smartwatch](https://www.pine64.org/pinetime/) ## 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) + - [Getting started with InfiniTime](doc/gettingStarted/gettingStarted-1.0.md) + - [About the software and updating](doc/gettingStarted/updating-software.md) + - Companion apps: + - [Gadgetbridge](doc/companionapps/Gadgetbridge.md) + - [AmazFish](doc/companionapps/Amazfish.md) ## Documentation @@ -84,16 +29,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 @@ -103,29 +43,13 @@ 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 +## Contributing 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 fork the code, hack it and create pull-requests! -Do not hesitate to clone/fork the code, hack it and create pull-requests. I'll do my best to review and merge them :) +Read this page for more information on how you can help: [How to contribute?](doc/contribute.md) ## Licenses diff --git a/doc/SWD.md b/doc/SWD.md new file mode 100644 index 00000000..4146e6ae --- /dev/null +++ b/doc/SWD.md @@ -0,0 +1,14 @@ +# 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) + +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 second, until the logo is completely drawn on the display. + +Then, using your SWD tool, flash those file at specific offset: + + - bootloader.bin : **0x0000** + - image-x.y.z.bin : **0x8000** + +Reset and voilĂ , you're running InfiniTime on your PineTime! diff --git a/doc/companionapps/Gadgetbridge.md b/doc/companionapps/Gadgetbridge.md index 974e2828..678fe7a1 100644 --- a/doc/companionapps/Gadgetbridge.md +++ b/doc/companionapps/Gadgetbridge.md @@ -1,13 +1,7 @@ # Integration with Gadgetbridge [Gadgetbridge](https://gadgetbridge.org/) is an Android application that supports many smartwatches and fitness trackers. -The integration of InfiniTime (previously Pinetime-JF) is now merged into the master branch (https://codeberg.org/Freeyourgadget/Gadgetbridge/) and initial support is available [starting with version 0.47](https://codeberg.org/Freeyourgadget/Gadgetbridge/src/branch/master/CHANGELOG.md). Note that the official version is only available on F-Droid (as of May 2021), and the unofficial fork available on the Play Store is outdated and does not support Infinitime. +Gadgetbridge supports InfiniTime [starting with version 0.47](https://codeberg.org/Freeyourgadget/Gadgetbridge/src/branch/master/CHANGELOG.md). Note that the official version is only available on F-Droid (as of May 2021), and the unofficial fork available on the Play Store is outdated and does not support InfiniTime. -## Features -The following features are implemented: - - Scanning & detection of Pinetime-JF / InfiniTime - - Connection / disconnection - - Notifications - ## Demo -[This video](https://seafile.codingfield.com/f/0a2920b9d765462385e4/) shows how to scan, connect, send notification (using the debug screen) and disconnect from the Pinetime. +[This video](https://seafile.codingfield.com/f/0a2920b9d765462385e4/) shows how to scan, connect, send notification (using the debug screen) and disconnect from the PineTime. diff --git a/doc/companionapps/NrfconnectOTA.md b/doc/companionapps/NrfconnectOTA.md deleted file mode 100644 index 0fa3cd03..00000000 --- a/doc/companionapps/NrfconnectOTA.md +++ /dev/null @@ -1,12 +0,0 @@ -# OTA using NRFConnect -[NRFConnect](https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Connect-for-mobile) is a powerful application (running on Android and iOS) which allows to scan and connect to BLE devices. - -## Features - - Scanning, connect, disconnect - - Time synchronization - - OTA - -InfiniTime implements the Nordic DFU protocol for the OTA functionality. NRFConnect also supports this protocol. - -# Demo -[This video](https://seafile.codingfield.com/f/a52b69683a05472a90c7/) shows how to use NRFConnect to update the firmware running on the Pinetime. \ No newline at end of file diff --git a/doc/gettingStarted/gettingStarted-1.0.md b/doc/gettingStarted/gettingStarted-1.0.md index 409b7c7b..a6881939 100644 --- a/doc/gettingStarted/gettingStarted-1.0.md +++ b/doc/gettingStarted/gettingStarted-1.0.md @@ -1,91 +1,23 @@ -# Getting started with InfiniTime 1.0 +# Getting started with InfiniTime 1.0.0 -On April 22 2021, InfiniTime and Pine64 [announced the release of InfiniTime 1.0](https://www.pine64.org/2021/04/22/its-time-infinitime-1-0/) and the availability of PineTime smartwatches as *enthusiast grade end-user product*. This page aims to guide you with your first step with your new PineTime. +On April 22 2021, InfiniTime and Pine64 [announced the release of InfiniTime 1.0.0](https://www.pine64.org/2021/04/22/its-time-infinitime-1-0/) and the availability of PineTime smartwatches as *enthusiast grade end-user product*. This page aims to guide you with your first step with your new PineTime. -## Firmware, InfiniTime, Bootloader, Recovery firmware, OTA, DFU... What is it? +It is highly recommended to update the firmware to the latest version when you receive your watch and when a new InfiniTime version is released. More information on updating the firmware [here](/doc/gettingStarted/updating-software.md). -You might have already seen these words by reading the announcement, release notes, or [the wiki guide](https://wiki.pine64.org/wiki/Upgrade_PineTime_to_InfiniTime_1.0.0) and, you may find them misleading if you're not familiar with the project. +## InfiniTime 1.0.0 quick user guide -Basically, a **firmware** is just a software running on the embedded hardware of a device, the PineTime in this case. -**InfiniTime** is based on 3 distinct **firmwares**: - - **[InfiniTime](https://github.com/InfiniTimeOrg/InfiniTime)** itself, this is the *application firmware* running on the PineTime. This is the main firmware which provides most of the functionalities you'll use on a daily basis : bluetooth low-energy (BLE) connectivity, applications, watchfaces,... - - **[The bootloader](https://github.com/JF002/pinetime-mcuboot-bootloader)** is responsible for safely applying **updates** of the *application firmware*, reverting them in case of issues and load the recovery firmware when requested. - - **The recovery firmware** is a specific *application firmware* than can be loaded by the bootloader on user request. This firmware can be useful in case of serious issue, when the main application firmware cannot perform an OTA update correctly. Currently, this recovery firmware is based on [InfiniTime 0.14.1](https://github.com/InfiniTimeOrg/InfiniTime/releases/tag/0.14.1). - -**OTA** and **DFU** refer to the update of the firmware over BLE (**B**luetooth **L**ow **E**nergy). **OTA** means **O**ver **T**he **A**ir, this is a functionality that allows the user to update the firmware how their device using a wireless communication like BLE. When we talk about **DFU** (**D**evice **F**irmware **U**pdate), we refer to the file format and protocol used to send the update of the firmware to the watch over-the-air. InfiniTime implement the (legacy) DFU protocol from Nordic Semiconductor (NRF). - -## How to check the version of InfiniTime and the bootloader? - -Since September 2020, all PineTimes (devkits or sealed) are flashed using the **[first iteration of the bootloader](https://github.com/lupyuen/pinetime-rust-mynewt/releases/tag/v4.1.7)** and **[InfiniTime 0.7.1](https://github.com/InfiniTimeOrg/InfiniTime/releases/tag/0.7.1)**. There was no recovery firmware at that time. - -The bootloader only runs when the watch starts (from an empty battery, for example) or after a reset (after a successful OTA or a manual reset - long push on the button). - -You can recognize this first iteration of the bootloader with it greenish **PINETIME** logo. - -![Old bootloader logo](oldbootloaderlogo.jpg) - -You can check the version of InfiniTime by opening the app *SystemInfo*. For version < 1.0: - -![InfiniTime 0.7.1 Application menu](appmenu-071.jpg) -![InfiniTime 0.7.1 version](version-071.jpg) - -And for version >= 1.0 : - -![InfiniTime 1.0 version](version-1.0.jpg) - -PineTime shipped from June 2021 (to be confirmed) will be flashed with the [new version of the bootloader](https://github.com/JF002/pinetime-mcuboot-bootloader/releases/tag/1.0.0), the [recovery firmware](https://github.com/InfiniTimeOrg/InfiniTime/releases/tag/0.14.1) and [InfiniTime 1.0](https://github.com/InfiniTimeOrg/InfiniTime/releases/tag/1.0.0). - -The bootloader is easily recognizable with it white pine cone that is progressively drawn in green. It also displays its own version on the bottom (1.0.0 as of now). - -![Bootloader 1.0](bootloader-1.0.jpg) - -## How to update your PineTime? - -To update your PineTime, you can use one of the compatible companion applications. Here are the main ones: - - - **[Amazfish](https://github.com/piggz/harbour-amazfish)** (Desktop Linux, mobile Linux, SailfishOS, runs on the PinebookPro and the Pinephone) - - **[Gadgetbridge](https://www.gadgetbridge.org/)** (Android) - - **[Siglo](https://github.com/alexr4535/siglo)** (Linux, GTK based) - - **NRFConnect** (closed source, Android & iOS). - -See [this page](ota-gadgetbridge-nrfconnect.md) for more info about the OTA procedure using Gadgetbridge and NRFConnect. - -### From InfiniTime 0.7.1 / old bootloader - -If your PineTime is currently running InfiniTime 0.7.1 and the old bootloader, we strongly recommend you update them to more recent version (Bootloader 1.0.0 and InfiniTime 1.0.0 as of now). We also recommend you install the recovery firmware once the bootloader is up-do-date. - -Using the companion app of your choice, you'll need to apply the OTA procedure for these 3 firmwares in this sequence (failing to follow this specific order might temporarily or permanently brick your device): - - 1. Flash the latest version of InfiniTime. The file to upload is named **pinetime-mcuboot-app-dfu-x.y.z.zip**. Here is the link to [InfiniTime 1.0](https://github.com/InfiniTimeOrg/InfiniTime/releases/download/1.0.0/pinetime-mcuboot-app-dfu-1.0.0.zip). - 2. Update the bootloader by applying the OTA procedure with the file named [**reloader-mcuboot.zip** from the repo of the bootloader](https://github.com/JF002/pinetime-mcuboot-bootloader/releases/download/1.0.0/reloader-mcuboot.zip). - 3. Install the recovery firmware by applying the OTA procedure with the file named [**pinetime-mcuboot-recovery-loader-dfu-0.14.1.zip** from the version 0.14.1 of InfiniTime](https://github.com/InfiniTimeOrg/InfiniTime/releases/download/0.14.1/pinetime-mcuboot-recovery-loader-dfu-0.14.1.zip). - -You'll find more info about this process in [this wiki page](https://wiki.pine64.org/wiki/Upgrade_PineTime_to_InfiniTime_1.0.0). You can also see the procedure in video [here](https://video.codingfield.com/videos/watch/831077c5-16f3-47b4-9b2b-c4bbfecc6529) and [here (from Amazfish)](https://video.codingfield.com/videos/watch/f7bffb3d-a6a1-43c4-8f01-f4aeff4adf9e) - -### From version > 1.0 - -If you are already running the new "1.0.0" bootloader, all you have to do is update your version of InfiniTime when it'll be available. We'll write specific instructions when (if) we release a new version of the bootloader. - -### Firmware validation - -The bootloader requires a (manual) validation of the firmware. If the watch reset with an updated firmware that was not validated, the bootloader will consider it as non-functioning and will revert to the previous version of the firmware. This is a safety feature to prevent bricking your device with a faulty firmware. - -You can validate your updated firmware on InfiniTime >= 1.0 by following this simple procedure: - - - From the watchface, swipe **right** to display the *Quick Actions menu* - - Open the **Settings** app by tapping the *gear* icon on the bottom right - - Swipe down and tap on the entry named **Firmware** - - This app shows the version that is currently running. If it's not validated yet, it displays 2 buttons: - - **Validate** to validate your firmware - - **Reset** to reset the watch and revert to the previously running version of the firmware +### Setting the time -## InfiniTime 1.0 quick user guide +By default, InfiniTime starts on the digital watchface. It'll probably display the epoch time (1 Jan 1970, 00:00). -### Setting the time +You can sync the time using companion apps. -By default, InfiniTime starts on the digital watchface. It'll probably display the epoch time (1 Jan 1970, 00:00). The time will be automatically synchronized once you connect on of the companion app to your PineTime using BLE connectivity. InfiniTime does not provide any way to manually set the time for now. + - Gadgetbridge automatically synchronizes the time when you connect it to your watch. More information on Gadgetbridge [here](/doc/gettingStarted/ota-gadgetbridge.md) + - You can use NRFConnect to [sync the time](/doc/gettingStarted/time-nrfconnect.md) + - Sync the time with your browser https://hubmartin.github.io/WebBLEWatch/ + - Since InfiniTime 1.7.0, you can set the time in the settings without needing to use a companion app -### Navigation in the menu +## Navigation in the menu ![Quick actions](quickactions.jpg) ![Settings](settings.jpg) @@ -98,14 +30,7 @@ By default, InfiniTime starts on the digital watchface. It'll probably display t - Start the **flashlight** app - Enable/disable vibrations on notifications (Do Not Disturb mode) - Enter the **settings** menu - - Settings - - Display timeout - - Wake up event (Tap, wrist rotation) - - Time format (12/24H) - - Default watchface (digital / analog) - - Battery info - - Firmware validation - - About (system info, firmware version,...) + - Swipe up and down to see all options ### Bootloader diff --git a/doc/gettingStarted/ota-gadgetbridge-nrfconnect.md b/doc/gettingStarted/ota-gadgetbridge-nrfconnect.md deleted file mode 100644 index 57d16218..00000000 --- a/doc/gettingStarted/ota-gadgetbridge-nrfconnect.md +++ /dev/null @@ -1,109 +0,0 @@ -# Flash and upgrade InfiniTime -If you just want to flash or upgrade InfiniTime on your PineTime, this page is for you! - -- [InfiniTime releases and versions](#infinitime-releases-and-versions) -- [How to upgrade Over-The-Air (OTA)](#how-to-upgrade-over-the-air-ota) - - [Using Gadgetbridge](#using-gadgetbridge) - - [Using NRFConnect](#Using-nrfconnect) -- [How to flash InfiniTime using the SWD interface](#how-to-flash-infinitime-using-the-swd-interface) - -## InfiniTime releases and versions -All releases of InfiniTime are available on the [release page of the GitHub repo](https://github.com/InfiniTimeOrg/InfiniTime/releases). - -Versions that are tagged as **RELEASE CANDIDATE** are pre-release versions, that are available for testing before actually releasing a new stable version. If you want to help us debug the project and provide stable versions to other user, you can use them. If you want stable and tested version, you should not flash these release candidate version. - -Release files are available under the *Assets* button. - -## How to upgrade Over-The-Air (OTA) -OTA is the easiest method to upgrade InfiniTime. Note that it's only possible is your PineTime is already running InfiniTime (>= 0.7.1). - -2 companion apps provide support for OTA : - - [Gadgetbridge](https://gadgetbridge.org/) (open source, runs on Android, [available on F-Droid](https://f-droid.org/packages/nodomain.freeyourgadget.gadgetbridge/)). - - [NRFConnect](https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Connect-for-mobile) (close source, runs on Android and iOS). - -Both applications need you to download the **DFU file** of InfiniTime. This file contains the new version of InfiniTime that will be flashed into your device. It's called **dfu-x.y.z.zip** (ex: dfu-0.9.0.zip) in the release note. -![Dfu file](dfuFile.png ) - -### Using Gadgetbridge -Launch Gadgetbridge and tap on the **"+"** button on the bottom right to add a new device: - -![Gadgetbridge 0](gadgetbridge0.jpg) - -Wait for the scan to complete, your PineTime should be detected: - -![Gadgetbridge 1](gadgetbridge1.jpg) - -Tap on it. Gadgdetbridge will pair and connect to your device: - -![Gadgetbridge 2](gadgetbridge2.jpg) - -Now that Gadgetbridge is connected to your PineTime, use a file browser application (I'm using Seafile to browse my NAS) and browse to the DFU file (image-xxx.zip) you downloaded previously. Tap on it and open it using the Gadgetbridge application/firmware installer: - -![Gadgetbridge 3](gadgetbridge3.jpg) - -Read carefully the warning and tap **Install**: - -![Gadgetbridge 4](gadgetbridge4.jpg) - -Wait for the transfer to finish. Your PineTime should reset and reboot with the new version of InfiniTime! - -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. - -![Gadgetbridge 5](gadgetbridge5.jpg) - -### Using NRFConnect -Open NRFConnect. Swipe down in the *Scanner* tab and wait for your device to appear: - -![NRFConnect 0](nrfconnect0.jpg) - -Tap on the *Connect* button on the right of your device. NRFConnect will connect to your PineTime and discover its characteristics. Tap on the **DFU** button on the top right: - -![NRFConnect 1](nrfconnect1.jpg) - -Select **Distribution packet (ZIP)**: - -![NRFConnect 2](nrfconnect2.jpg) - -Browse to the DFU file you downloaded previously, the DFU transfer will start automatically. When the transfer is finished, your PineTime will reset and restart on the new version of InfiniTime! - -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. - -![NRFConnect 3](nrfconnect3.jpg) - -## 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 ) - -The bootloader reads a boot logo from the external SPI flash memory. The first step consists in flashing a tool in the MCU that will flash the boot logo into this SPI flash memory. This first step is optional but recommanded (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 second, until the logo is completely drawn on the display. - -Then, using your SWD tool, flash those file at specific offset: - - - bootloader.bin : **0x0000** - - image-x.y.z.bin : **0x8000** - -Reset and voilĂ , you're running InfiniTime on your PineTime! - -If you are using OpenOCD with a STLinkV2, you can find more info [on this page](../openOCD.md). - -## How to synchronize the time - -### Using Gadgetbridge -Good news! Gadgetbridge **automatically** synchronizes the time when connecting to your PineTime! - -### Using any Chromium-based web browser -You can use it from your PC, Mac, Android. Browsers now have BLE support. -https://hubmartin.github.io/WebBLEWatch/ - -### Using NRFConnect -You must enable the **CTS** *GATT server* into NRFConnect so that InfiniTime can synchronize the time with your smartphone. - -Launch NRFConnect, tap the sandwich button on the top left and select *Configure GATT server*: - -![NRFConnect CTS 0](nrfconnectcts0.jpg) - - -Tap *Add service* and select the server configuration *Current Time service*. Tap OK and connect to your PineTime, it should automcatically sync the time once the connection is established! - -![NRFConnect CTS 1](nrfconnectcts1.jpg) diff --git a/doc/gettingStarted/ota-gadgetbridge.md b/doc/gettingStarted/ota-gadgetbridge.md new file mode 100644 index 00000000..971eaad0 --- /dev/null +++ b/doc/gettingStarted/ota-gadgetbridge.md @@ -0,0 +1,39 @@ +# Connecting to Gadgetbridge + +Launch Gadgetbridge and tap on the **"+"** button on the bottom right to add a new device: + +![Gadgetbridge 0](gadgetbridge0.jpg) + +Wait for the scan to complete, your PineTime should be detected: + +![Gadgetbridge 1](gadgetbridge1.jpg) + +Tap on it. Gadgdetbridge will pair and connect to your device: + +![Gadgetbridge 2](gadgetbridge2.jpg) + +# Updating with Gadgetbridge + +## Preparation + +All releases of InfiniTime are available on the [release page of the GitHub repo](https://github.com/InfiniTimeOrg/InfiniTime/releases). + +Release files are available under the *Assets* button. + +You need to download the DFU of the firmware version that you'd like to install, for example `pinetime-mcuboot-app-dfu-1.6.0.zip` + +## Gadgetbridge + +Now that Gadgetbridge is connected to your PineTime, use a file browser application (I'm using Seafile to browse my NAS) and browse to the DFU file (image-xxx.zip) you downloaded previously. Tap on it and open it using the Gadgetbridge application/firmware installer: + +![Gadgetbridge 3](gadgetbridge3.jpg) + +Read carefully the warning and tap **Install**: + +![Gadgetbridge 4](gadgetbridge4.jpg) + +Wait for the transfer to finish. Your PineTime should reset and reboot with the new version of InfiniTime! + +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. + +![Gadgetbridge 5](gadgetbridge5.jpg) diff --git a/doc/gettingStarted/ota-nrfconnect.md b/doc/gettingStarted/ota-nrfconnect.md new file mode 100644 index 00000000..dbc78296 --- /dev/null +++ b/doc/gettingStarted/ota-nrfconnect.md @@ -0,0 +1,32 @@ +# Updating with NRFConnect + +## Preparation + +All releases of InfiniTime are available on the [release page of the GitHub repo](https://github.com/InfiniTimeOrg/InfiniTime/releases). + +Release files are available under the *Assets* button. + +You need to download the DFU of the firmware version that you'd like to install, for example `pinetime-mcuboot-app-dfu-1.6.0.zip` + +## NRFConnect + +Open NRFConnect. Swipe down in the *Scanner* tab and wait for your device to appear: + +![NRFConnect 0](nrfconnect0.jpg) + +Tap on the *Connect* button on the right of your device. NRFConnect will connect to your PineTime and discover its characteristics. Tap on the **DFU** button on the top right: + +![NRFConnect 1](nrfconnect1.jpg) + +Select **Distribution packet (ZIP)**: + +![NRFConnect 2](nrfconnect2.jpg) + +Browse to the DFU file you downloaded previously, the DFU transfer will start automatically. When the transfer is finished, your PineTime will reset and restart on the new version of InfiniTime! + +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. + +![NRFConnect 3](nrfconnect3.jpg) + +# Demo +[This video](https://seafile.codingfield.com/f/a52b69683a05472a90c7/) shows how to use NRFConnect to update the firmware running on the Pinetime. diff --git a/doc/gettingStarted/time-nrfconnect.md b/doc/gettingStarted/time-nrfconnect.md new file mode 100644 index 00000000..a30d98f8 --- /dev/null +++ b/doc/gettingStarted/time-nrfconnect.md @@ -0,0 +1,11 @@ +### Syncing time + +You must enable the **CTS** *GATT server* in NRFConnect so that InfiniTime can synchronize the time with your smartphone. + +Launch NRFConnect, tap the sandwich button on the top left and select *Configure GATT server*: + +![NRFConnect CTS 0](nrfconnectcts0.jpg) + +Tap *Add service* and select the server configuration *Current Time service*. Tap OK and connect to your PineTime, it should automcatically sync the time once the connection is established! + +![NRFConnect CTS 1](nrfconnectcts1.jpg) diff --git a/doc/gettingStarted/updating-software.md b/doc/gettingStarted/updating-software.md new file mode 100644 index 00000000..1ad0040c --- /dev/null +++ b/doc/gettingStarted/updating-software.md @@ -0,0 +1,50 @@ +## Firmware, InfiniTime, Bootloader, Recovery firmware, OTA, DFU... What is it? + +You might have already seen these words by reading the announcement, release notes, or [the wiki guide](https://wiki.pine64.org/wiki/Upgrade_PineTime_to_InfiniTime_1.0.0) and, you may find them confusing if you're not familiar with the project. + +Basically, a **firmware** is just a software running on the embedded hardware of a device, the PineTime in this case. +**InfiniTime OS** is based on 3 distinct **firmwares**: + - **[InfiniTime](https://github.com/InfiniTimeOrg/InfiniTime)** itself, this is the *application firmware* running on the PineTime. This is the main firmware which provides most of the functionalities you'll use on a daily basis : bluetooth low-energy (BLE) connectivity, applications, watchfaces,... + - **[The bootloader](https://github.com/JF002/pinetime-mcuboot-bootloader)** is responsible for safely applying **updates** of the *application firmware*, reverting them in case of issues and load the recovery firmware when requested. + - **The recovery firmware** is a specific *application firmware* than can be loaded by the bootloader on user request. This firmware can be useful in case of serious issue, when the main application firmware cannot perform an OTA update correctly. Currently, this recovery firmware is based on [InfiniTime 0.14.1](https://github.com/InfiniTimeOrg/InfiniTime/releases/tag/0.14.1). + +**OTA** and **DFU** refer to the update of the firmware over BLE (**B**luetooth **L**ow **E**nergy). **OTA** means **O**ver **T**he **A**ir, this is a functionality that allows the user to update the firmware how their device using a wireless communication like BLE. When we talk about **DFU** (**D**evice **F**irmware **U**pdate), we refer to the file format and protocol used to send the update of the firmware to the watch over-the-air. InfiniTime implement the (legacy) DFU protocol from Nordic Semiconductor (NRF). + +## How to check the version of InfiniTime and the bootloader? + +You can check the InfiniTime version by first swiping right on the watchface to open quick settings, tapping the cogwheel to open settings, swipe up until you find an entry named "About" and tap on it. + +![InfiniTime 1.0 version](version-1.0.jpg) + +PineTimes shipped after June 2021 will be flashed with the [new version of the bootloader](https://github.com/JF002/pinetime-mcuboot-bootloader/releases/tag/1.0.0), the [recovery firmware](https://github.com/InfiniTimeOrg/InfiniTime/releases/tag/0.14.1) and [InfiniTime 1.0](https://github.com/InfiniTimeOrg/InfiniTime/releases/tag/1.0.0). + +The bootloader only runs when the watch starts (from an empty battery, for example) or after a reset (after a successful OTA or a manual reset - long push on the button). + +The bootloader is easily recognizable with its white pine cone that is progressively drawn in green. It also displays its own version on the bottom (1.0.0 as of now). + +![Bootloader 1.0](bootloader-1.0.jpg) + +## How to update your PineTime? + +To update your PineTime, you can use one of the compatible companion applications. Here are the main ones: + + - **[Amazfish](https://github.com/piggz/harbour-amazfish)** (Desktop Linux, mobile Linux, SailfishOS, runs on the PinebookPro and the Pinephone) + - **[Gadgetbridge](https://www.gadgetbridge.org/)** (Android) + - **[Siglo](https://github.com/alexr4535/siglo)** (Linux, GTK based) + - **NRFConnect** (closed source, Android & iOS) + +We have instructions for updating the software with Gadgetbridge and NRFConnect. + + - [Updating with Gadgetbridge](/doc/gettingStarted/ota-gadgetbridge.md) + - [Updating with NRFConnect](/doc/gettingStarted/ota-nrfconnect.md) + +### Firmware validation + +The bootloader requires a manual validation of the firmware. If the watch reset with an updated firmware that was not validated, the bootloader will consider it as non-functioning and will revert to the previous version of the firmware. This is a safety feature to prevent bricking your device with a faulty firmware. + +You can validate your updated firmware on InfiniTime >= 1.0 by following this simple procedure: + + - From the watchface, swipe **right** to display the *quick settings menu* + - Open settings by tapping the cogwheel on the bottom right + - Swipe up until you find an entry named **Firmware** and tap on it + - This app shows the version that is currently running. If the firmware is not validated yet, you can either validate the running firmware, or reset and revert to the previous firmware version diff --git a/images/infinitime-logo-github.jpg b/images/infinitime-logo-github.jpg deleted file mode 100644 index cf19e35c..00000000 Binary files a/images/infinitime-logo-github.jpg and /dev/null differ diff --git a/images/infinitime-logo-small.jpg b/images/infinitime-logo-small.jpg new file mode 100644 index 00000000..9949f5b0 Binary files /dev/null and b/images/infinitime-logo-small.jpg differ -- cgit v1.2.3-70-g09d2 From cf9332f0e502007fa04e0a4cdf9f0b1a2d97508f Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Sat, 6 Nov 2021 14:48:51 +0200 Subject: Crop and shrink photos --- doc/gettingStarted/appmenu.jpg | Bin 120674 -> 49909 bytes doc/gettingStarted/bootloader-1.0.jpg | Bin 160275 -> 73864 bytes doc/gettingStarted/quickactions.jpg | Bin 114900 -> 50875 bytes doc/gettingStarted/settings.jpg | Bin 130022 -> 57679 bytes doc/gettingStarted/version-1.0.jpg | Bin 116881 -> 56172 bytes 5 files changed, 0 insertions(+), 0 deletions(-) (limited to 'doc') diff --git a/doc/gettingStarted/appmenu.jpg b/doc/gettingStarted/appmenu.jpg index 1e52fe78..5e3d6a8f 100644 Binary files a/doc/gettingStarted/appmenu.jpg and b/doc/gettingStarted/appmenu.jpg differ diff --git a/doc/gettingStarted/bootloader-1.0.jpg b/doc/gettingStarted/bootloader-1.0.jpg index 7b639184..a21f88f4 100644 Binary files a/doc/gettingStarted/bootloader-1.0.jpg and b/doc/gettingStarted/bootloader-1.0.jpg differ diff --git a/doc/gettingStarted/quickactions.jpg b/doc/gettingStarted/quickactions.jpg index 0d92b134..3bbe1622 100644 Binary files a/doc/gettingStarted/quickactions.jpg and b/doc/gettingStarted/quickactions.jpg differ diff --git a/doc/gettingStarted/settings.jpg b/doc/gettingStarted/settings.jpg index 510b29eb..075708ad 100644 Binary files a/doc/gettingStarted/settings.jpg and b/doc/gettingStarted/settings.jpg differ diff --git a/doc/gettingStarted/version-1.0.jpg b/doc/gettingStarted/version-1.0.jpg index bcfc8c63..59655b1a 100644 Binary files a/doc/gettingStarted/version-1.0.jpg and b/doc/gettingStarted/version-1.0.jpg differ -- cgit v1.2.3-70-g09d2 From c3c5ab347308d820843d2076db5543ffa93934d1 Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Sat, 6 Nov 2021 14:58:10 +0200 Subject: Reorganization --- doc/gettingStarted/gettingStarted-1.0.md | 18 ++++-------------- doc/gettingStarted/updating-software.md | 11 +++++++++++ 2 files changed, 15 insertions(+), 14 deletions(-) (limited to 'doc') diff --git a/doc/gettingStarted/gettingStarted-1.0.md b/doc/gettingStarted/gettingStarted-1.0.md index a6881939..074c34a5 100644 --- a/doc/gettingStarted/gettingStarted-1.0.md +++ b/doc/gettingStarted/gettingStarted-1.0.md @@ -13,11 +13,12 @@ By default, InfiniTime starts on the digital watchface. It'll probably display t You can sync the time using companion apps. - Gadgetbridge automatically synchronizes the time when you connect it to your watch. More information on Gadgetbridge [here](/doc/gettingStarted/ota-gadgetbridge.md) - - You can use NRFConnect to [sync the time](/doc/gettingStarted/time-nrfconnect.md) + - [Sync the time with NRFConnect](/doc/gettingStarted/time-nrfconnect.md) - Sync the time with your browser https://hubmartin.github.io/WebBLEWatch/ - - Since InfiniTime 1.7.0, you can set the time in the settings without needing to use a companion app -## Navigation in the menu +Since InfiniTime 1.7.0, you can set the time in the settings without needing to use a companion app + +### Navigation in the menu ![Quick actions](quickactions.jpg) ![Settings](settings.jpg) @@ -31,14 +32,3 @@ You can sync the time using companion apps. - Enable/disable vibrations on notifications (Do Not Disturb mode) - Enter the **settings** menu - Swipe up and down to see all options - -### Bootloader - -Most of the time, the bootloader just runs without your intervention (update and load the firmware). - -However, you can enable 2 functionalities using the push button: - - - Push the button until the pine cone is drawn in **blue** to force the rollback of the previous version of the firmware, even if you've already validated the updated one - - Push the button until the pine cone is drawn in **red** to load the recovery firmware. This recovery firmware only provides BLE connectivity and OTA functionality. - -More info about the bootloader in [its project page](https://github.com/JF002/pinetime-mcuboot-bootloader/blob/master/README.md). diff --git a/doc/gettingStarted/updating-software.md b/doc/gettingStarted/updating-software.md index 1ad0040c..52d35164 100644 --- a/doc/gettingStarted/updating-software.md +++ b/doc/gettingStarted/updating-software.md @@ -48,3 +48,14 @@ You can validate your updated firmware on InfiniTime >= 1.0 by following this si - Open settings by tapping the cogwheel on the bottom right - Swipe up until you find an entry named **Firmware** and tap on it - This app shows the version that is currently running. If the firmware is not validated yet, you can either validate the running firmware, or reset and revert to the previous firmware version + +## Bootloader + +Most of the time, the bootloader just runs without your intervention (update and load the firmware). + +However, you can enable 2 functionalities using the push button: + + - Push the button until the pine cone is drawn in **blue** to force the rollback of the previous version of the firmware, even if you've already validated the updated one + - Push the button until the pine cone is drawn in **red** to load the recovery firmware. This recovery firmware only provides BLE connectivity and OTA functionality. + +More info about the bootloader in [its project page](https://github.com/JF002/pinetime-mcuboot-bootloader/blob/master/README.md). -- cgit v1.2.3-70-g09d2 From 1d3098baa772176476febb05531a074c0d133b56 Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Sat, 6 Nov 2021 15:04:37 +0200 Subject: Update ui_guidelines --- README.md | 1 + doc/ui_guidelines.md | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/README.md b/README.md index 22c91b5c..ecda014a 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ InfiniTime is an open-source firmware for the [Pinetime smartwatch](https://www. - [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) ### Build, flash and debug diff --git a/doc/ui_guidelines.md b/doc/ui_guidelines.md index c267b79b..0cbd39f5 100644 --- a/doc/ui_guidelines.md +++ b/doc/ui_guidelines.md @@ -4,13 +4,10 @@ - Buttons should generally be at least 50px high - Buttons should generally be on the bottom edge - Make interactable objects **big** -- Recommendations for inner padding, aka distance between buttons: - - When aligning 4 objects: 4px, e.g. Settings - - When aligning 3 objects: 6px, e.g. App list - - When aligning 2 objects: 10px, e.g. Quick settings - When using a page indicator, leave 8px for it on the right side - It is acceptable to leave 8px on the left side as well to center the content - 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. ![example layouts](./ui/example.png) -- cgit v1.2.3-70-g09d2 From 52d19065893f6af66fa0e1c426852b820358f3b5 Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Sun, 7 Nov 2021 18:30:29 +0200 Subject: Separate and update coding conventions and contributing pages --- README.md | 5 +++-- doc/coding-convention.md | 40 +++++++++++++++++++++++++++++++++ doc/contribute.md | 58 +++++++----------------------------------------- 3 files changed, 51 insertions(+), 52 deletions(-) create mode 100644 doc/coding-convention.md (limited to 'doc') diff --git a/README.md b/README.md index ecda014a..4b80ef34 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ InfiniTime is an open-source firmware for the [Pinetime smartwatch](https://www. ## Documentation ### Develop + - [Coding conventions](/doc/coding-convention.md) - [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) @@ -48,9 +49,9 @@ InfiniTime is an open-source firmware for the [Pinetime smartwatch](https://www. 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. -Do not hesitate to fork the code, hack it and create pull-requests! +Do not hesitate to fork the code, hack it and create pull-requests! Make sure to read the [coding conventions](/doc/coding-convention.md) -Read this page for more information on how you can help: [How to contribute?](doc/contribute.md) +You don't need to be a programmer to contribute. Read this page for more information on how you can help: [How to contribute?](doc/contribute.md) ## Licenses diff --git a/doc/coding-convention.md b/doc/coding-convention.md new file mode 100644 index 00000000..6672d54d --- /dev/null +++ b/doc/coding-convention.md @@ -0,0 +1,40 @@ +# Coding convention + +## Language + +The language of this project is **C++**, and all new code must be written in C++. (Modern) C++ provides a lot of useful tools and functionalities that are beneficial for embedded software development like `constexpr`, `template` and anything that provides zero-cost abstraction. + +C code is accepted if it comes from another library like FreeRTOS, NimBLE, LVGL or the NRF-SDK. + +## Coding style + +The most important rule to follow is to try to keep the code as easy to read and maintain as possible. + +Using an autoformatter is highly recommended, but make sure it's configured properly. + +There are preconfigured autoformatter rules for: + + * CLion (IntelliJ) in [.idea/codeStyles/Project.xml](/.idea/codeStyles/Project.xml) + * `clang-format` + +Also use `clang-tidy` to check the code for other issues. + +If there are no preconfigured rules for your IDE, you can use one of the existing ones to configure your IDE. + + - **Indentation** : 2 spaces, no tabulation + - **Opening brace** at the end of the line + - **Naming** : Choose self-describing variable name + - **class** : PascalCase + - **namespace** : PascalCase + - **variable** : camelCase, **no** prefix/suffix ('_', 'm_',...) for class members + - **Include guard** : `#pragma once` (no `#ifdef __MODULE__ / #define __MODULE__ / #endif`) + - **Includes** : + - files from the project : `#include "relative/path/to/the/file.h"` + - external files and std : `#include ` + - Only use [primary spellings for operators and tokens](https://en.cppreference.com/w/cpp/language/operator_alternative) + - Use auto sparingly. Don't use auto for [fundamental/built-in types](https://en.cppreference.com/w/cpp/language/types) and [fixed width integer types](https://en.cppreference.com/w/cpp/types/integer), except when initializing with a cast to avoid duplicating the type name. + - Examples: + - `auto* app = static_cast(instance);` + - `auto number = static_cast(variable);` + - `uint8_t returnValue = MyFunction();` + - Use nullptr instead of NULL diff --git a/doc/contribute.md b/doc/contribute.md index 595a5996..70fc567c 100644 --- a/doc/contribute.md +++ b/doc/contribute.md @@ -14,10 +14,6 @@ As the documentation is part of the source code, you can submit your improvement You want to fix a bug, add a cool new functionality or improve the code? See *How to submit a pull request below*. -## Spread the word - -The Pinetime is a cool open source project that deserves to be known. Talk about it around you, on social networks, on your blog,... and let people know that we are working on an open source firmware for a smartwatch! - # How to submit a pull request? ## TL;DR @@ -25,7 +21,7 @@ The Pinetime is a cool open source project that deserves to be known. Talk about - Create a branch from develop - Work on a single subject in this branch. Create multiple branches/pulls-requests if you want to work on multiple subjects (bugs, features,...) - Test your modifications on the actual hardware - - Check the code formatting against our coding conventions and [clang-format](../.clang-format) and [clang-tidy](../.clang-tidy) + - Check your code against the [coding conventions](/doc/coding-convention.md) and [clang-format](../.clang-format) and [clang-tidy](../.clang-tidy) - Clean your code and remove files that are not needed - Write documentation related to your new feature if applicable - Create a pull request and write a great description about it: what does your PR do, why, how,... Add pictures and video if possible @@ -38,9 +34,9 @@ If you want to fix a bug, add functionality or improve the code, you'll first ne When your feature branch is ready, **make sure it actually works** and **do not forget to write documentation** about it if it's relevant. -**Creating a pull request containing modifications that haven't been tested is strongly discouraged.** If, for any reason, you cannot test your modifications but want to publish them anyway, **please mention it in the description**. This way, other contributors might be willing to test it and provide feedback about your code. +**Creating a pull request containing modifications that haven't been tested is strongly discouraged.** If for any reason you cannot test your modifications, but want to publish them anyway, **please mention it in the description**. This way, other contributors might be willing to test it and provide feedback about your code. -Also, before submitting your PR, check the coding style of your code against the **coding conventions** detailed below. This project also provides [clang-format](../.clang-format) and [clang-tidy](../.clang-tidy) configuration files. You can use them to ensure correct formatting of your code. +Before submitting a PR, check your code against our [coding conventions](/doc/coding-convention.md). This project also provides [clang-format](../.clang-format) and [clang-tidy](../.clang-tidy) configuration files. You should use them to ensure correct formatting of your code. Don't forget to check the files you are going to commit and remove those which aren't necessary (config files from your IDE, for example). Remove old comments, commented code,... @@ -52,52 +48,14 @@ Once the pull request is reviewed and accepted, it'll be merged into **develop** ## Why all these rules? -Reviewing pull requests is a **very time consuming task** for the creator of this project ([JF002](https://github.com/JF002)) and for other contributors who take the time to review them. Everything you do to make reviewing easier will **get your PR merged faster**. +Reviewing pull requests is a **very time consuming task**. Everything you do to make reviewing easier will **get your PR merged faster**. -When reviewing PRs, the author and contributors will first look at the **description**. If it's easy to understand what the PR does, why the modification is needed or interesting and how it's done, a good part of the work is already done : we understand the PR and its context. +Reviewers will first look at the **description**. If it's easy to understand what the PR does, why the modification is needed or interesting and how it's done, a good part of the work is already done : we understand the PR and its context. -Then, reviewing **a few files that were modified for a single purpose** is a lot more easier than to review 30 files modified for many reasons (bug fix, UI improvements, typos in doc,...), even if all these changes make sense. Also, it's possible that we agree on some modification but not on some other, so we won't be able to merge the PR because of the changes that are not accepted. +Reviewing **a few files that were modified for a single purpose** is a lot easier than reviewing 30 files modified for many reasons (bug fix, UI improvements, typos in doc,...), even if all the changes make sense. Also, it's possible that we agree on some modification but not on another, so we won't be able to merge the PR because of the changes that are not accepted. -We do our best to keep the code as consistent as possible. If the formatting of the code in your PR is not consistent with our code base, we'll ask you to review it, which will take more time. +We do our best to keep the code as consistent as possible. If the formatting of your code is not consistent with our code base, we'll ask you to review it. -The last step of the review consists of **testing** the modification. If it doesn't work out of the box, we'll ask your to review your code and to ensure that it works as expected. +Lastly the changes are tested. If it doesn't work out of the box, we'll ask your to review your code and to ensure that it works as expected. It's totally normal for a PR to need some more work even after it was created, that's why we review them. But every round trip takes time, so it's good practice to try to reduce them as much as possible by following those simple rules. - -# Coding convention - -## Language - -The language of this project is **C++**, and all new code must be written in C++. (Modern) C++ provides a lot of useful tools and functionalities that are beneficial for embedded software development like `constexpr`, `template` and anything that provides zero-cost abstraction. - -C code is accepted if it comes from another library like FreeRTOS, NimBLE, LVGL or the NRF-SDK. - -## Coding style - -The most important rule to follow is to try to keep the code as easy to read and maintain as possible. - -Using an autoformatter is highly recommended, but make sure it's configured properly. - -There are preconfigured autoformatter rules for: - - * CLion (IntelliJ) in .idea/codeStyles/Project.xml - -If there are no preconfigured rules for your IDE, you can use one of the existing ones to configure your IDE. - - - **Indentation** : 2 spaces, no tabulation - - **Opening brace** at the end of the line - - **Naming** : Choose self-describing variable name - - **class** : PascalCase - - **namespace** : PascalCase - - **variable** : camelCase, **no** prefix/suffix ('_', 'm_',...) for class members - - **Include guard** : `#pragma once` (no `#ifdef __MODULE__ / #define __MODULE__ / #endif`) - - **Includes** : - - files from the project : `#include "relative/path/to/the/file.h"` - - external files and std : `#include ` - - Only use [primary spellings for operators and tokens](https://en.cppreference.com/w/cpp/language/operator_alternative) - - Use auto sparingly. Don't use auto for [fundamental/built-in types](https://en.cppreference.com/w/cpp/language/types) and [fixed width integer types](https://en.cppreference.com/w/cpp/types/integer), except when initializing with a cast to avoid duplicating the type name. - - Examples: - - `auto* app = static_cast(instance);` - - `auto number = static_cast(variable);` - - `uint8_t returnValue = MyFunction();` - - Use nullptr instead of NULL -- cgit v1.2.3-70-g09d2 From 2314c41ad66836fe4142d73895ad0ae2ad18651c Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Sun, 7 Nov 2021 18:45:24 +0200 Subject: Reorganize bootloader readme --- bootloader/README.md | 8 +++----- doc/bootloader/firmwareNoValidated.jpg | Bin 0 -> 191501 bytes doc/bootloader/firmwareValidated.jpg | Bin 0 -> 212743 bytes doc/bootloader/firmwareValidationApp.jpg | Bin 0 -> 179828 bytes doc/companionapps/firmwareNoValidated.jpg | Bin 191501 -> 0 bytes doc/companionapps/firmwareValidated.jpg | Bin 212743 -> 0 bytes doc/companionapps/firmwareValidationApp.jpg | Bin 179828 -> 0 bytes 7 files changed, 3 insertions(+), 5 deletions(-) create mode 100644 doc/bootloader/firmwareNoValidated.jpg create mode 100644 doc/bootloader/firmwareValidated.jpg create mode 100644 doc/bootloader/firmwareValidationApp.jpg delete mode 100644 doc/companionapps/firmwareNoValidated.jpg delete mode 100644 doc/companionapps/firmwareValidated.jpg delete mode 100644 doc/companionapps/firmwareValidationApp.jpg (limited to 'doc') diff --git a/bootloader/README.md b/bootloader/README.md index 9f99602b..1a02ebdc 100644 --- a/bootloader/README.md +++ b/bootloader/README.md @@ -115,8 +115,6 @@ sudo dfu.py -z /home/jf/nrf52/bootloader/dfu.zip -a --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. @@ -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") diff --git a/doc/bootloader/firmwareNoValidated.jpg b/doc/bootloader/firmwareNoValidated.jpg new file mode 100644 index 00000000..28df7eaa Binary files /dev/null and b/doc/bootloader/firmwareNoValidated.jpg differ diff --git a/doc/bootloader/firmwareValidated.jpg b/doc/bootloader/firmwareValidated.jpg new file mode 100644 index 00000000..0d6f99b5 Binary files /dev/null and b/doc/bootloader/firmwareValidated.jpg differ diff --git a/doc/bootloader/firmwareValidationApp.jpg b/doc/bootloader/firmwareValidationApp.jpg new file mode 100644 index 00000000..d78ad0c1 Binary files /dev/null and b/doc/bootloader/firmwareValidationApp.jpg differ diff --git a/doc/companionapps/firmwareNoValidated.jpg b/doc/companionapps/firmwareNoValidated.jpg deleted file mode 100644 index 28df7eaa..00000000 Binary files a/doc/companionapps/firmwareNoValidated.jpg and /dev/null differ diff --git a/doc/companionapps/firmwareValidated.jpg b/doc/companionapps/firmwareValidated.jpg deleted file mode 100644 index 0d6f99b5..00000000 Binary files a/doc/companionapps/firmwareValidated.jpg and /dev/null differ diff --git a/doc/companionapps/firmwareValidationApp.jpg b/doc/companionapps/firmwareValidationApp.jpg deleted file mode 100644 index d78ad0c1..00000000 Binary files a/doc/companionapps/firmwareValidationApp.jpg and /dev/null differ -- cgit v1.2.3-70-g09d2 From a0c7b48b8eb6f2b59dcaec846c5ed46aeabf1e6a Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Sun, 7 Nov 2021 18:55:51 +0200 Subject: Replace companionapp pages with links. Add companion apps --- README.md | 6 ++++-- doc/companionapps/Amazfish.md | 16 ---------------- doc/companionapps/Gadgetbridge.md | 7 ------- 3 files changed, 4 insertions(+), 25 deletions(-) delete mode 100644 doc/companionapps/Amazfish.md delete mode 100644 doc/companionapps/Gadgetbridge.md (limited to 'doc') diff --git a/README.md b/README.md index 4b80ef34..2214a359 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,10 @@ InfiniTime is an open-source firmware for the [Pinetime smartwatch](https://www. - [Getting started with InfiniTime](doc/gettingStarted/gettingStarted-1.0.md) - [About the software and updating](doc/gettingStarted/updating-software.md) - Companion apps: - - [Gadgetbridge](doc/companionapps/Gadgetbridge.md) - - [AmazFish](doc/companionapps/Amazfish.md) + - [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) ## Documentation diff --git a/doc/companionapps/Amazfish.md b/doc/companionapps/Amazfish.md deleted file mode 100644 index 90ad20c2..00000000 --- a/doc/companionapps/Amazfish.md +++ /dev/null @@ -1,16 +0,0 @@ -# Amazfish -[Amazfish](https://openrepos.net/content/piggz/amazfish) is a companion app that supports many smartwatches and activity trackers running on [SailfishOS](https://sailfishos.org/). - -## Features -The following features are implemented: - - Scanning & detection of Pinetime-JF / InfiniTime - - Connection / disconnection - - Time synchronization - - Notifications - - Music control - - Navigation with Puremaps - -## Demo -[This video](https://seafile.codingfield.com/f/21c5d023452740279e36/) shows how to connect to the Pinetime and control the playback of the music on the phone. -Amazfish and Sailfish OS are running on the [Pinephone](https://www.pine64.org/pinephone/), another awesome device from Pine64. - diff --git a/doc/companionapps/Gadgetbridge.md b/doc/companionapps/Gadgetbridge.md deleted file mode 100644 index 678fe7a1..00000000 --- a/doc/companionapps/Gadgetbridge.md +++ /dev/null @@ -1,7 +0,0 @@ -# Integration with Gadgetbridge -[Gadgetbridge](https://gadgetbridge.org/) is an Android application that supports many smartwatches and fitness trackers. - -Gadgetbridge supports InfiniTime [starting with version 0.47](https://codeberg.org/Freeyourgadget/Gadgetbridge/src/branch/master/CHANGELOG.md). Note that the official version is only available on F-Droid (as of May 2021), and the unofficial fork available on the Play Store is outdated and does not support InfiniTime. - -## Demo -[This video](https://seafile.codingfield.com/f/0a2920b9d765462385e4/) shows how to scan, connect, send notification (using the debug screen) and disconnect from the PineTime. -- cgit v1.2.3-70-g09d2 From 88e55b2504f52c7d89f733bf5141bc67e525d908 Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Sun, 7 Nov 2021 19:38:54 +0200 Subject: Update updating instructions --- doc/gettingStarted/ota-gadgetbridge.md | 12 +----------- doc/gettingStarted/ota-nrfconnect.md | 12 +----------- doc/gettingStarted/updating-software.md | 15 +++++++++------ 3 files changed, 11 insertions(+), 28 deletions(-) (limited to 'doc') diff --git a/doc/gettingStarted/ota-gadgetbridge.md b/doc/gettingStarted/ota-gadgetbridge.md index 971eaad0..022b5e4d 100644 --- a/doc/gettingStarted/ota-gadgetbridge.md +++ b/doc/gettingStarted/ota-gadgetbridge.md @@ -14,17 +14,7 @@ Tap on it. Gadgdetbridge will pair and connect to your device: # Updating with Gadgetbridge -## Preparation - -All releases of InfiniTime are available on the [release page of the GitHub repo](https://github.com/InfiniTimeOrg/InfiniTime/releases). - -Release files are available under the *Assets* button. - -You need to download the DFU of the firmware version that you'd like to install, for example `pinetime-mcuboot-app-dfu-1.6.0.zip` - -## Gadgetbridge - -Now that Gadgetbridge is connected to your PineTime, use a file browser application (I'm using Seafile to browse my NAS) and browse to the DFU file (image-xxx.zip) you downloaded previously. Tap on it and open it using the Gadgetbridge application/firmware installer: +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: ![Gadgetbridge 3](gadgetbridge3.jpg) diff --git a/doc/gettingStarted/ota-nrfconnect.md b/doc/gettingStarted/ota-nrfconnect.md index dbc78296..800bd6bc 100644 --- a/doc/gettingStarted/ota-nrfconnect.md +++ b/doc/gettingStarted/ota-nrfconnect.md @@ -1,15 +1,5 @@ # Updating with NRFConnect -## Preparation - -All releases of InfiniTime are available on the [release page of the GitHub repo](https://github.com/InfiniTimeOrg/InfiniTime/releases). - -Release files are available under the *Assets* button. - -You need to download the DFU of the firmware version that you'd like to install, for example `pinetime-mcuboot-app-dfu-1.6.0.zip` - -## NRFConnect - Open NRFConnect. Swipe down in the *Scanner* tab and wait for your device to appear: ![NRFConnect 0](nrfconnect0.jpg) @@ -22,7 +12,7 @@ Select **Distribution packet (ZIP)**: ![NRFConnect 2](nrfconnect2.jpg) -Browse to the DFU file you downloaded previously, the DFU transfer will start automatically. When the transfer is finished, your PineTime will reset and restart on the new version of InfiniTime! +Find the DFU file (`pinetime-mcuboot-app-dfu-x.x.x.zip`) you downloaded previously, the DFU transfer will start automatically. When the transfer is finished, your PineTime will reset and restart on the new version of InfiniTime! 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. diff --git a/doc/gettingStarted/updating-software.md b/doc/gettingStarted/updating-software.md index 52d35164..214200a8 100644 --- a/doc/gettingStarted/updating-software.md +++ b/doc/gettingStarted/updating-software.md @@ -26,14 +26,17 @@ The bootloader is easily recognizable with its white pine cone that is progressi ## How to update your PineTime? -To update your PineTime, you can use one of the compatible companion applications. Here are the main ones: +To update your PineTime, you can use one of the compatible companion applications. - - **[Amazfish](https://github.com/piggz/harbour-amazfish)** (Desktop Linux, mobile Linux, SailfishOS, runs on the PinebookPro and the Pinephone) - - **[Gadgetbridge](https://www.gadgetbridge.org/)** (Android) - - **[Siglo](https://github.com/alexr4535/siglo)** (Linux, GTK based) - - **NRFConnect** (closed source, Android & iOS) +The updating process differs slightly on every companion app, so you'll need to familiarize yourself with the companion app of your choice. -We have instructions for updating the software with Gadgetbridge and NRFConnect. +All releases of InfiniTime are available on the [release page of the GitHub repo](https://github.com/InfiniTimeOrg/InfiniTime/releases). + +Release files are available under the *Assets* button. + +To update the firmware, you need to download the DFU of the firmware version that you'd like to install, for example `pinetime-mcuboot-app-dfu-1.6.0.zip`, and flash it with your companion app. + +We have prepared instructions for flashing InfiniTime with Gadgetbridge and NRFConnect. - [Updating with Gadgetbridge](/doc/gettingStarted/ota-gadgetbridge.md) - [Updating with NRFConnect](/doc/gettingStarted/ota-nrfconnect.md) -- cgit v1.2.3-70-g09d2 From e53f1bfd668a5c130352616aceb6c660821dc14c Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Mon, 8 Nov 2021 17:37:25 +0200 Subject: Summarize updating-softare --- doc/gettingStarted/updating-software.md | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'doc') diff --git a/doc/gettingStarted/updating-software.md b/doc/gettingStarted/updating-software.md index 214200a8..40586724 100644 --- a/doc/gettingStarted/updating-software.md +++ b/doc/gettingStarted/updating-software.md @@ -1,14 +1,18 @@ ## Firmware, InfiniTime, Bootloader, Recovery firmware, OTA, DFU... What is it? -You might have already seen these words by reading the announcement, release notes, or [the wiki guide](https://wiki.pine64.org/wiki/Upgrade_PineTime_to_InfiniTime_1.0.0) and, you may find them confusing if you're not familiar with the project. +You may have already encountered these words by reading the announcement, release notes, or [the wiki guide](https://wiki.pine64.org/wiki/Upgrade_PineTime_to_InfiniTime_1.0.0) and you may find them confusing if you're not familiar with the project. -Basically, a **firmware** is just a software running on the embedded hardware of a device, the PineTime in this case. -**InfiniTime OS** is based on 3 distinct **firmwares**: - - **[InfiniTime](https://github.com/InfiniTimeOrg/InfiniTime)** itself, this is the *application firmware* running on the PineTime. This is the main firmware which provides most of the functionalities you'll use on a daily basis : bluetooth low-energy (BLE) connectivity, applications, watchfaces,... - - **[The bootloader](https://github.com/JF002/pinetime-mcuboot-bootloader)** is responsible for safely applying **updates** of the *application firmware*, reverting them in case of issues and load the recovery firmware when requested. - - **The recovery firmware** is a specific *application firmware* than can be loaded by the bootloader on user request. This firmware can be useful in case of serious issue, when the main application firmware cannot perform an OTA update correctly. Currently, this recovery firmware is based on [InfiniTime 0.14.1](https://github.com/InfiniTimeOrg/InfiniTime/releases/tag/0.14.1). +A **firmware** is software running on the embedded hardware of a device. -**OTA** and **DFU** refer to the update of the firmware over BLE (**B**luetooth **L**ow **E**nergy). **OTA** means **O**ver **T**he **A**ir, this is a functionality that allows the user to update the firmware how their device using a wireless communication like BLE. When we talk about **DFU** (**D**evice **F**irmware **U**pdate), we refer to the file format and protocol used to send the update of the firmware to the watch over-the-air. InfiniTime implement the (legacy) DFU protocol from Nordic Semiconductor (NRF). +InfiniTime has three distinct firmwares: + + - **[InfiniTime](https://github.com/InfiniTimeOrg/InfiniTime)** is the operating system. + - **[The bootloader](https://github.com/JF002/pinetime-mcuboot-bootloader)** is responsible for safely applying firmware updates and runs before booting into InfiniTime. + - **The recovery firmware** is a special *application firmware* than can be loaded by the bootloader on user request. This firmware can be useful in case of serious issue, when the main application firmware cannot perform an OTA update correctly. + +**OTA** (**O**ver **T**he **A**ir) refers to updating of the firmware over BLE (**B**luetooth **L**ow **E**nergy). This is a functionality that allows the user to update the firmware on their device wirelessly. + +**DFU** (**D**evice **F**irmware **U**pdate) is the file format and protocol used to send the update of the firmware to the watch over-the-air. InfiniTime implement the (legacy) DFU protocol from Nordic Semiconductor (NRF). ## How to check the version of InfiniTime and the bootloader? @@ -18,7 +22,7 @@ You can check the InfiniTime version by first swiping right on the watchface to PineTimes shipped after June 2021 will be flashed with the [new version of the bootloader](https://github.com/JF002/pinetime-mcuboot-bootloader/releases/tag/1.0.0), the [recovery firmware](https://github.com/InfiniTimeOrg/InfiniTime/releases/tag/0.14.1) and [InfiniTime 1.0](https://github.com/InfiniTimeOrg/InfiniTime/releases/tag/1.0.0). -The bootloader only runs when the watch starts (from an empty battery, for example) or after a reset (after a successful OTA or a manual reset - long push on the button). +The bootloader is run right before booting to InfiniTime. The bootloader is easily recognizable with its white pine cone that is progressively drawn in green. It also displays its own version on the bottom (1.0.0 as of now). @@ -30,9 +34,7 @@ To update your PineTime, you can use one of the compatible companion application The updating process differs slightly on every companion app, so you'll need to familiarize yourself with the companion app of your choice. -All releases of InfiniTime are available on the [release page of the GitHub repo](https://github.com/InfiniTimeOrg/InfiniTime/releases). - -Release files are available under the *Assets* button. +All releases of InfiniTime are available on the [release page of the GitHub repo](https://github.com/InfiniTimeOrg/InfiniTime/releases) under assets. To update the firmware, you need to download the DFU of the firmware version that you'd like to install, for example `pinetime-mcuboot-app-dfu-1.6.0.zip`, and flash it with your companion app. @@ -43,14 +45,14 @@ We have prepared instructions for flashing InfiniTime with Gadgetbridge and NRFC ### Firmware validation -The bootloader requires a manual validation of the firmware. If the watch reset with an updated firmware that was not validated, the bootloader will consider it as non-functioning and will revert to the previous version of the firmware. This is a safety feature to prevent bricking your device with a faulty firmware. +Firmware updates must be manually validated. If the firmware isn't validated and the watch resets, the watch will revert to the previous firmware. This is a safety feature to prevent bricking your device with faulty firmware. You can validate your updated firmware on InfiniTime >= 1.0 by following this simple procedure: - From the watchface, swipe **right** to display the *quick settings menu* - Open settings by tapping the cogwheel on the bottom right - Swipe up until you find an entry named **Firmware** and tap on it - - This app shows the version that is currently running. If the firmware is not validated yet, you can either validate the running firmware, or reset and revert to the previous firmware version + - If the firmware is not validated yet, you can either validate the running firmware, or reset and revert to the previous firmware version ## Bootloader -- cgit v1.2.3-70-g09d2 From 5eaae4175c19f0e2752d3e27372f5aa578dec980 Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Mon, 8 Nov 2021 17:38:21 +0200 Subject: Fix versioning --- doc/versioning.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/versioning.md b/doc/versioning.md index 48e05043..8b87d473 100644 --- a/doc/versioning.md +++ b/doc/versioning.md @@ -1,6 +1,6 @@ # Versioning -The versioning of this project is based on [Semantic versionning](https://semver.org/) : +The versioning of this project is based on [Semantic versioning](https://semver.org/): - The **patch** is incremented when we fix a bug on a **released** version (most of the time using a **hotfix** branch). - The **minor** is incremented when we release a new version with new features. It corresponds to a merge of **develop** into **master**. - - The **major** should be incremented when a breaking change is made to the application. We still have to define what is a breaking change in the context of this project. For now, I suggest that it stays **0** until we have a fully functioning firmware suited for the final user. \ No newline at end of file + - The **major** should be incremented when a breaking change is made to the application. We still have to define what is a breaking change in the context of this project. -- cgit v1.2.3-70-g09d2 From d1583035d9564ca49d00711cf53ad07a35038b7c Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Mon, 8 Nov 2021 17:42:42 +0200 Subject: Link to companion apps --- README.md | 10 +++++----- doc/gettingStarted/updating-software.md | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/README.md b/README.md index 2214a359..b85dba33 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,11 @@ InfiniTime is an open-source firmware for the [Pinetime smartwatch](https://www. - [Getting started with InfiniTime](doc/gettingStarted/gettingStarted-1.0.md) - [About the software and updating](doc/gettingStarted/updating-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) +### 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) ## Documentation diff --git a/doc/gettingStarted/updating-software.md b/doc/gettingStarted/updating-software.md index 40586724..316d77ff 100644 --- a/doc/gettingStarted/updating-software.md +++ b/doc/gettingStarted/updating-software.md @@ -30,7 +30,7 @@ The bootloader is easily recognizable with its white pine cone that is progressi ## How to update your PineTime? -To update your PineTime, you can use one of the compatible companion applications. +To update your PineTime, you can use one of the [compatible companion applications](/README.md#companion-apps). The updating process differs slightly on every companion app, so you'll need to familiarize yourself with the companion app of your choice. -- cgit v1.2.3-70-g09d2 From c12fc5e3132f88e2b134f9feed70a8bc1cae5e7f Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Mon, 8 Nov 2021 18:11:29 +0200 Subject: Improvements to Apps.md and Intro.md --- doc/code/Apps.md | 43 ++++++++++++++++++------------------------- doc/code/Intro.md | 2 +- 2 files changed, 19 insertions(+), 26 deletions(-) (limited to 'doc') diff --git a/doc/code/Apps.md b/doc/code/Apps.md index 7c2d7a05..b8e4a3f4 100644 --- a/doc/code/Apps.md +++ b/doc/code/Apps.md @@ -1,11 +1,12 @@ # Apps This page will teach you: -- what apps in InfiniTime are +- what screens and apps are in InfiniTime - how to implement your own app ## Theory -Apps are the things you can launch from the app selection you get by swiping up. -At the moment, settings and even the app launcher itself or the clock are implemented very similarly, this might change in the future though. + +The user interface of InfiniTime is made up of **screens** +Screens that are opened from the app launcher are considered **apps** Every app in InfiniTime is it's own class. An instance of the class is created when the app is launched and destroyed when the user exits the app. They run inside the "displayapp" task (briefly discussed [here](./Intro.md)). @@ -23,27 +24,21 @@ it does not need to override any of these functions, as LVGL can also handle tou If you have any doubts, you can always look at how the other apps are doing things. ### Continuous updating -If your app needs to be updated continuously, yo can do so by overriding the `Refresh()` function in your class +If your app needs to be updated continuously, you can do so by overriding the `Refresh()` function in your class and calling `lv_task_create` inside the constructor. -An example call could look like this:
-`taskRefresh = lv_task_create(RefreshTaskCallback, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, this);`
-With `taskRefresh` being a member variable of your class and of type `lv_task_t*`. -Remember to delete the task again using `lv_task_del`. -The function `RefreshTaskCallback` is inherited from screen and just calls your `Refresh` function. -### Apps with multiple screens -InfiniTime provides a mini-library in [displayapp/screens/ScreenList.h](/src/displayapp/screens/ScreenList.h) -which makes it relatively easy to add multiple screens to your app. -To use it, #include it in the header file of your app and add a ScreenList member to your class. -The template argument should be the number of screens you need. -You will also need to add `CreateScreen` functions that return `std::unique_ptr` -to your class, one for every screen you have. -There are still some things left to to that I won't cover here. -To figure them out, have a look at the "apps" ApplicationList, Settings and SystemInfo. +An example call could look like this: +```cpp +taskRefresh = lv_task_create(RefreshTaskCallback, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, this); +``` +With `taskRefresh` being a member variable of your class and of type `lv_task_t*`. +Remember to delete the task again using `lv_task_del`. +The function `RefreshTaskCallback` is inherited from `Screen` and just calls your `Refresh` function. ## Creating your own app -A minimal app could look like this:
+A minimal app could look like this: + MyApp.h: ```cpp #pragma once @@ -66,13 +61,13 @@ namespace Pinetime { MyApp.cpp: ```cpp -#include "MyApp.h" +#include "displayapp/screens/MyApp.h" #include "displayapp/DisplayApp.h" using namespace Pinetime::Applications::Screens; MyApp::MyApp(DisplayApp* app) : Screen(app) { - lv_obj_t* title = lv_label_create(lv_scr_act(), NULL); + lv_obj_t* title = lv_label_create(lv_scr_act(), nullptr); lv_label_set_text_static(title, "My test application"); lv_label_set_align(title, LV_LABEL_ALIGN_CENTER); lv_obj_align(title, lv_scr_act(), LV_ALIGN_CENTER, 0, 0); @@ -95,12 +90,10 @@ Now, go to the function `DisplayApp::LoadApp` and add another case to the switch The case will be the id you gave your app earlier. If your app needs any additional arguments, this is the place to pass them. -If you want your app to be launched from the regular app launcher, go to [displayapp/screens/ApplicationList.cpp](/src/displayapp/screens/ApplicationList.cpp). -Add your app to one of the `CreateScreen` functions, or add another `CreateScreen` function if there are no empty spaces for your app.
-If your app is a setting, do the same procedure in [displayapp/screens/settings/Settings.cpp](/src/displayapp/screens/settings/Settings.cpp). +If you want to add your app in the app launcher, add your app in [displayapp/screens/ApplicationList.cpp](/src/displayapp/screens/ApplicationList.cpp) to one of the `CreateScreen` functions, or add another `CreateScreen` function if there are no empty spaces for your app. If your app is a setting, do the same procedure in [displayapp/screens/settings/Settings.cpp](/src/displayapp/screens/settings/Settings.cpp). You should now be able to [build](../buildAndProgram.md) the firmware and flash it to your PineTime. Yay! Please remember to pay attention to the [UI guidelines](../ui_guidelines.md) -when designing an app that you want to include in mainstream InfiniTime. +when designing an app that you want to be included in InfiniTime. diff --git a/doc/code/Intro.md b/doc/code/Intro.md index 762102fe..6764e588 100644 --- a/doc/code/Intro.md +++ b/doc/code/Intro.md @@ -21,7 +21,7 @@ Both functions are located inside [systemtask/SystemTask.cpp](/src/systemtask/Sy It also starts the **task "displayapp"**, which is responsible for launching and running apps, controlling the screen and handling touch events (or forwarding them to the active app). You can find the "displayapp" task inside [displayapp/DisplayApp.cpp](/src/displayapp/DisplayApp.cpp). There are also other tasks that are responsible for Bluetooth ("ll" and "ble" inside [libs/mynewt-nimble/porting/npl/freertos/src/nimble_port_freertos.c](/src/libs/mynewt-nimble/porting/npl/freertos/src/nimble_port_freertos.c)) -and periodic tasks like heartrate measurements ([heartratetask/HeartRateTask.cpp](/src/heartratetask/HeartRateTask.cpp)).
+and periodic tasks like heartrate measurements ([heartratetask/HeartRateTask.cpp](/src/heartratetask/HeartRateTask.cpp)). While it is possible for you to create your own task when you need it, it is recommended to just add functionality to `SystemTask::Work()` if possible. If you absolutely need to create another task, try to guess how much [stack space](https://www.freertos.org/FAQMem.html#StackSize) (in words/4-byte packets) it will need instead of just typing in a large-ish number. -- cgit v1.2.3-70-g09d2 From 3375c4e18764cd0ed1be8898a21695ff60540b22 Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Mon, 8 Nov 2021 18:13:27 +0200 Subject: Add missing periods --- doc/code/Apps.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/code/Apps.md b/doc/code/Apps.md index b8e4a3f4..b1c7d20e 100644 --- a/doc/code/Apps.md +++ b/doc/code/Apps.md @@ -5,8 +5,8 @@ This page will teach you: ## Theory -The user interface of InfiniTime is made up of **screens** -Screens that are opened from the app launcher are considered **apps** +The user interface of InfiniTime is made up of **screens**. +Screens that are opened from the app launcher are considered **apps**. Every app in InfiniTime is it's own class. An instance of the class is created when the app is launched and destroyed when the user exits the app. They run inside the "displayapp" task (briefly discussed [here](./Intro.md)). -- cgit v1.2.3-70-g09d2 From a326e22986f69e40572e8ef0c0efde854ea7d386 Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Mon, 8 Nov 2021 18:16:28 +0200 Subject: Add line break --- doc/code/Intro.md | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/code/Intro.md b/doc/code/Intro.md index 6764e588..bf68c7a5 100644 --- a/doc/code/Intro.md +++ b/doc/code/Intro.md @@ -22,6 +22,7 @@ It also starts the **task "displayapp"**, which is responsible for launching and You can find the "displayapp" task inside [displayapp/DisplayApp.cpp](/src/displayapp/DisplayApp.cpp). There are also other tasks that are responsible for Bluetooth ("ll" and "ble" inside [libs/mynewt-nimble/porting/npl/freertos/src/nimble_port_freertos.c](/src/libs/mynewt-nimble/porting/npl/freertos/src/nimble_port_freertos.c)) and periodic tasks like heartrate measurements ([heartratetask/HeartRateTask.cpp](/src/heartratetask/HeartRateTask.cpp)). + While it is possible for you to create your own task when you need it, it is recommended to just add functionality to `SystemTask::Work()` if possible. If you absolutely need to create another task, try to guess how much [stack space](https://www.freertos.org/FAQMem.html#StackSize) (in words/4-byte packets) it will need instead of just typing in a large-ish number. -- cgit v1.2.3-70-g09d2 From caec4a560b46f30f08f03ea5cff4c902034956e4 Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Mon, 8 Nov 2021 19:14:23 +0200 Subject: Replace some "we" --- doc/contribute.md | 6 +++--- doc/versioning.md | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/contribute.md b/doc/contribute.md index 70fc567c..b1be84a4 100644 --- a/doc/contribute.md +++ b/doc/contribute.md @@ -36,7 +36,7 @@ When your feature branch is ready, **make sure it actually works** and **do not **Creating a pull request containing modifications that haven't been tested is strongly discouraged.** If for any reason you cannot test your modifications, but want to publish them anyway, **please mention it in the description**. This way, other contributors might be willing to test it and provide feedback about your code. -Before submitting a PR, check your code against our [coding conventions](/doc/coding-convention.md). This project also provides [clang-format](../.clang-format) and [clang-tidy](../.clang-tidy) configuration files. You should use them to ensure correct formatting of your code. +Before submitting a PR, check your code against the [coding conventions](/doc/coding-convention.md). This project also provides [clang-format](../.clang-format) and [clang-tidy](../.clang-tidy) configuration files. You should use them to ensure correct formatting of your code. Don't forget to check the files you are going to commit and remove those which aren't necessary (config files from your IDE, for example). Remove old comments, commented code,... @@ -54,8 +54,8 @@ Reviewers will first look at the **description**. If it's easy to understand wha Reviewing **a few files that were modified for a single purpose** is a lot easier than reviewing 30 files modified for many reasons (bug fix, UI improvements, typos in doc,...), even if all the changes make sense. Also, it's possible that we agree on some modification but not on another, so we won't be able to merge the PR because of the changes that are not accepted. -We do our best to keep the code as consistent as possible. If the formatting of your code is not consistent with our code base, we'll ask you to review it. +The code base should be kept as consistent as possible. If the formatting of your code is not consistent with the rest of the code base, we'll ask you to review it. -Lastly the changes are tested. If it doesn't work out of the box, we'll ask your to review your code and to ensure that it works as expected. +Lastly the changes are tested. If it doesn't work out of the box, we'll ask you to review your code and to ensure that it works as expected. It's totally normal for a PR to need some more work even after it was created, that's why we review them. But every round trip takes time, so it's good practice to try to reduce them as much as possible by following those simple rules. diff --git a/doc/versioning.md b/doc/versioning.md index 8b87d473..2fa36ab9 100644 --- a/doc/versioning.md +++ b/doc/versioning.md @@ -1,6 +1,6 @@ # Versioning The versioning of this project is based on [Semantic versioning](https://semver.org/): - - The **patch** is incremented when we fix a bug on a **released** version (most of the time using a **hotfix** branch). - - The **minor** is incremented when we release a new version with new features. It corresponds to a merge of **develop** into **master**. + - The **patch** is incremented when a bug is fixed on a **released** version (most of the time using a **hotfix** branch). + - The **minor** is incremented when a new version with new features is released. It corresponds to a merge of **develop** into **master**. - The **major** should be incremented when a breaking change is made to the application. We still have to define what is a breaking change in the context of this project. -- cgit v1.2.3-70-g09d2 From 45a90e4967e10b31d148ae9c68123751d0e6bf6b Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Thu, 11 Nov 2021 14:26:08 +0200 Subject: Update getting started. New pics. More information. --- doc/gettingStarted/appmenu-071.jpg | Bin 109376 -> 0 bytes doc/gettingStarted/appmenu.jpg | Bin 49909 -> 0 bytes doc/gettingStarted/gettingStarted-1.0.md | 35 +++++++++++++++++++++++++------ doc/gettingStarted/oldbootloaderlogo.jpg | Bin 116236 -> 0 bytes doc/gettingStarted/quickactions.jpg | Bin 50875 -> 0 bytes doc/gettingStarted/settings.jpg | Bin 57679 -> 0 bytes doc/gettingStarted/ui/applist.jpg | Bin 0 -> 133036 bytes doc/gettingStarted/ui/notifications.jpg | Bin 0 -> 186887 bytes doc/gettingStarted/ui/quicksettings.jpg | Bin 0 -> 135510 bytes doc/gettingStarted/ui/settings.jpg | Bin 0 -> 138145 bytes doc/gettingStarted/ui/watchface.jpg | Bin 0 -> 103055 bytes doc/gettingStarted/version-071.jpg | Bin 111556 -> 0 bytes 12 files changed, 29 insertions(+), 6 deletions(-) delete mode 100644 doc/gettingStarted/appmenu-071.jpg delete mode 100644 doc/gettingStarted/appmenu.jpg delete mode 100644 doc/gettingStarted/oldbootloaderlogo.jpg delete mode 100644 doc/gettingStarted/quickactions.jpg delete mode 100644 doc/gettingStarted/settings.jpg create mode 100644 doc/gettingStarted/ui/applist.jpg create mode 100644 doc/gettingStarted/ui/notifications.jpg create mode 100644 doc/gettingStarted/ui/quicksettings.jpg create mode 100644 doc/gettingStarted/ui/settings.jpg create mode 100644 doc/gettingStarted/ui/watchface.jpg delete mode 100644 doc/gettingStarted/version-071.jpg (limited to 'doc') diff --git a/doc/gettingStarted/appmenu-071.jpg b/doc/gettingStarted/appmenu-071.jpg deleted file mode 100644 index dee7c8f6..00000000 Binary files a/doc/gettingStarted/appmenu-071.jpg and /dev/null differ diff --git a/doc/gettingStarted/appmenu.jpg b/doc/gettingStarted/appmenu.jpg deleted file mode 100644 index 5e3d6a8f..00000000 Binary files a/doc/gettingStarted/appmenu.jpg and /dev/null differ diff --git a/doc/gettingStarted/gettingStarted-1.0.md b/doc/gettingStarted/gettingStarted-1.0.md index 074c34a5..939dfe59 100644 --- a/doc/gettingStarted/gettingStarted-1.0.md +++ b/doc/gettingStarted/gettingStarted-1.0.md @@ -16,19 +16,42 @@ You can sync the time using companion apps. - [Sync the time with NRFConnect](/doc/gettingStarted/time-nrfconnect.md) - Sync the time with your browser https://hubmartin.github.io/WebBLEWatch/ -Since InfiniTime 1.7.0, you can set the time in the settings without needing to use a companion app +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 + +### Digital watch face + +![Digital watch face](ui/watchface.jpg) + +This is what the default digital watch face looks like. You can change watch faces in the settings. + +The indicator on the top left is visible if you have unread notifications + +On the top right there are status icons + + - The battery icon shows roughly how much charge is remaining + - The Bluetooth icon is visible when the watch is connected to a companion app + - A plug icon is shown when the watch is plugged into a charger. + +On the bottom left you can see your heart rate if you have the measurement enabled in the heart rate app. + +On the bottom right you can see how many steps you have taken today. ### Navigation in the menu -![Quick actions](quickactions.jpg) -![Settings](settings.jpg) -![Application menu](appmenu.jpg) +![Application menu](ui/applist.jpg) +![Notifications](ui/notifications.jpg) +![Quick actions](ui/quicksettings.jpg) +![Settings](ui/settings.jpg) - - Swipe **down** to display the notification panel. Notification sent by your companion app will be displayed in this panel. - Swipe **up** to display the application menus. Apps (stopwatch, music, step, games,...) can be started from this menu. + - Swipe **down** to display the notification panel. Notification sent by your companion app will be displayed here. - Swipe **right** to display the Quick Actions menu. This menu allows you to - Set the brightness of the display - Start the **flashlight** app - - Enable/disable vibrations on notifications (Do Not Disturb mode) + - Enable/disable notifications (Do Not Disturb mode) - Enter the **settings** menu - Swipe up and down to see all options + - Click the button to go back a screen. + - You can hold the button for a short time to return to the watch face. (version >1.7.0) diff --git a/doc/gettingStarted/oldbootloaderlogo.jpg b/doc/gettingStarted/oldbootloaderlogo.jpg deleted file mode 100644 index b4d0cdfb..00000000 Binary files a/doc/gettingStarted/oldbootloaderlogo.jpg and /dev/null differ diff --git a/doc/gettingStarted/quickactions.jpg b/doc/gettingStarted/quickactions.jpg deleted file mode 100644 index 3bbe1622..00000000 Binary files a/doc/gettingStarted/quickactions.jpg and /dev/null differ diff --git a/doc/gettingStarted/settings.jpg b/doc/gettingStarted/settings.jpg deleted file mode 100644 index 075708ad..00000000 Binary files a/doc/gettingStarted/settings.jpg and /dev/null differ diff --git a/doc/gettingStarted/ui/applist.jpg b/doc/gettingStarted/ui/applist.jpg new file mode 100644 index 00000000..927780e2 Binary files /dev/null and b/doc/gettingStarted/ui/applist.jpg differ diff --git a/doc/gettingStarted/ui/notifications.jpg b/doc/gettingStarted/ui/notifications.jpg new file mode 100644 index 00000000..00b27267 Binary files /dev/null and b/doc/gettingStarted/ui/notifications.jpg differ diff --git a/doc/gettingStarted/ui/quicksettings.jpg b/doc/gettingStarted/ui/quicksettings.jpg new file mode 100644 index 00000000..250c9154 Binary files /dev/null and b/doc/gettingStarted/ui/quicksettings.jpg differ diff --git a/doc/gettingStarted/ui/settings.jpg b/doc/gettingStarted/ui/settings.jpg new file mode 100644 index 00000000..a61279bf Binary files /dev/null and b/doc/gettingStarted/ui/settings.jpg differ diff --git a/doc/gettingStarted/ui/watchface.jpg b/doc/gettingStarted/ui/watchface.jpg new file mode 100644 index 00000000..e7a9439b Binary files /dev/null and b/doc/gettingStarted/ui/watchface.jpg differ diff --git a/doc/gettingStarted/version-071.jpg b/doc/gettingStarted/version-071.jpg deleted file mode 100644 index bc9bc5b5..00000000 Binary files a/doc/gettingStarted/version-071.jpg and /dev/null differ -- cgit v1.2.3-70-g09d2 From d5e8e3ca44e998511907d1ec74c98c06c2e542b8 Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Sun, 14 Nov 2021 15:23:12 +0200 Subject: Split updating and about software. Remove big Contributing section from README --- README.md | 21 +++++++---------- doc/gettingStarted/about-software.md | 26 +++++++++++++++++++++ doc/gettingStarted/gettingStarted-1.0.md | 6 ++--- doc/gettingStarted/updating-software.md | 39 ++++++-------------------------- 4 files changed, 44 insertions(+), 48 deletions(-) create mode 100644 doc/gettingStarted/about-software.md (limited to 'doc') diff --git a/README.md b/README.md index b85dba33..ae315f24 100644 --- a/README.md +++ b/README.md @@ -4,28 +4,31 @@ ![InfiniTime logo](images/infinitime-logo-small.jpg "InfiniTime Logo") -InfiniTime is an open-source firmware for the [Pinetime smartwatch](https://www.pine64.org/pinetime/) +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](doc/gettingStarted/gettingStarted-1.0.md) - - [About the software and updating](doc/gettingStarted/updating-software.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) -## Documentation +## Development -### Develop - - [Coding conventions](/doc/coding-convention.md) - [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 - [Project branches](doc/branches.md) @@ -47,14 +50,6 @@ InfiniTime is an open-source firmware for the [Pinetime smartwatch](https://www. - [Memory analysis](./doc/MemoryAnalysis.md) -## Contributing - -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. - -Do not hesitate to fork the code, hack it and create pull-requests! Make sure to read the [coding conventions](/doc/coding-convention.md) - -You don't need to be a programmer to contribute. Read this page for more information on how you can help: [How to contribute?](doc/contribute.md) - ## Licenses This project is released under the GNU General Public License version 3 or, at your option, any later version. diff --git a/doc/gettingStarted/about-software.md b/doc/gettingStarted/about-software.md new file mode 100644 index 00000000..b19a610f --- /dev/null +++ b/doc/gettingStarted/about-software.md @@ -0,0 +1,26 @@ +# Firmware, InfiniTime, Bootloader, Recovery firmware, OTA, DFU... What is it? + +You may have already encountered these words by reading the announcement, release notes, or [the wiki guide](https://wiki.pine64.org/wiki/Upgrade_PineTime_to_InfiniTime_1.0.0) and you may find them confusing if you're not familiar with the project. + +A **firmware** is software running on the embedded hardware of a device. + +InfiniTime has three distinct firmwares: + + - **[InfiniTime](https://github.com/InfiniTimeOrg/InfiniTime)** is the operating system. + - **[The bootloader](https://github.com/JF002/pinetime-mcuboot-bootloader)** is responsible for safely applying firmware updates and runs before booting into InfiniTime. + - **The recovery firmware** is a special *application firmware* than can be loaded by the bootloader on user request. This firmware can be useful in case of serious issue, when the main application firmware cannot perform an OTA update correctly. + +**OTA** (**O**ver **T**he **A**ir) refers to updating of the firmware over BLE (**B**luetooth **L**ow **E**nergy). This is a functionality that allows the user to update the firmware on their device wirelessly. + +**DFU** (**D**evice **F**irmware **U**pdate) is the file format and protocol used to send the update of the firmware to the watch over-the-air. InfiniTime implement the (legacy) DFU protocol from Nordic Semiconductor (NRF). + +## Bootloader + +Most of the time, the bootloader just runs without your intervention (update and load the firmware). + +However, you can enable 2 functionalities using the push button: + + - Push the button until the pine cone is drawn in **blue** to force the rollback of the previous version of the firmware, even if you've already validated the updated one + - Push the button until the pine cone is drawn in **red** to load the recovery firmware. This recovery firmware only provides BLE connectivity and OTA functionality. + +More info about the bootloader in [its project page](https://github.com/JF002/pinetime-mcuboot-bootloader/blob/master/README.md). diff --git a/doc/gettingStarted/gettingStarted-1.0.md b/doc/gettingStarted/gettingStarted-1.0.md index 939dfe59..30b8bdb0 100644 --- a/doc/gettingStarted/gettingStarted-1.0.md +++ b/doc/gettingStarted/gettingStarted-1.0.md @@ -1,10 +1,10 @@ -# Getting started with InfiniTime 1.0.0 +# Getting started with InfiniTime -On April 22 2021, InfiniTime and Pine64 [announced the release of InfiniTime 1.0.0](https://www.pine64.org/2021/04/22/its-time-infinitime-1-0/) and the availability of PineTime smartwatches as *enthusiast grade end-user product*. This page aims to guide you with your first step with your new PineTime. +On April 22 2021, InfiniTime and Pine64 [announced the release of InfiniTime 1.0.0](https://www.pine64.org/2021/04/22/its-time-infinitime-1-0/) and the availability of PineTime smartwatches as an *enthusiast grade end-user product*. This page aims to guide you with your first step with your new PineTime. It is highly recommended to update the firmware to the latest version when you receive your watch and when a new InfiniTime version is released. More information on updating the firmware [here](/doc/gettingStarted/updating-software.md). -## InfiniTime 1.0.0 quick user guide +## InfiniTime quick user guide ### Setting the time diff --git a/doc/gettingStarted/updating-software.md b/doc/gettingStarted/updating-software.md index 316d77ff..7a05073a 100644 --- a/doc/gettingStarted/updating-software.md +++ b/doc/gettingStarted/updating-software.md @@ -1,34 +1,20 @@ -## Firmware, InfiniTime, Bootloader, Recovery firmware, OTA, DFU... What is it? +# Updating InfiniTime -You may have already encountered these words by reading the announcement, release notes, or [the wiki guide](https://wiki.pine64.org/wiki/Upgrade_PineTime_to_InfiniTime_1.0.0) and you may find them confusing if you're not familiar with the project. +If you just want to flash or upgrade InfiniTime on your PineTime, this page is for you! If you want more information about the software and the update procedure, check out [this](/doc/gettingStarted/about-software.md) page. -A **firmware** is software running on the embedded hardware of a device. - -InfiniTime has three distinct firmwares: - - - **[InfiniTime](https://github.com/InfiniTimeOrg/InfiniTime)** is the operating system. - - **[The bootloader](https://github.com/JF002/pinetime-mcuboot-bootloader)** is responsible for safely applying firmware updates and runs before booting into InfiniTime. - - **The recovery firmware** is a special *application firmware* than can be loaded by the bootloader on user request. This firmware can be useful in case of serious issue, when the main application firmware cannot perform an OTA update correctly. - -**OTA** (**O**ver **T**he **A**ir) refers to updating of the firmware over BLE (**B**luetooth **L**ow **E**nergy). This is a functionality that allows the user to update the firmware on their device wirelessly. - -**DFU** (**D**evice **F**irmware **U**pdate) is the file format and protocol used to send the update of the firmware to the watch over-the-air. InfiniTime implement the (legacy) DFU protocol from Nordic Semiconductor (NRF). - -## How to check the version of InfiniTime and the bootloader? +## Checking the version of InfiniTime You can check the InfiniTime version by first swiping right on the watchface to open quick settings, tapping the cogwheel to open settings, swipe up until you find an entry named "About" and tap on it. ![InfiniTime 1.0 version](version-1.0.jpg) -PineTimes shipped after June 2021 will be flashed with the [new version of the bootloader](https://github.com/JF002/pinetime-mcuboot-bootloader/releases/tag/1.0.0), the [recovery firmware](https://github.com/InfiniTimeOrg/InfiniTime/releases/tag/0.14.1) and [InfiniTime 1.0](https://github.com/InfiniTimeOrg/InfiniTime/releases/tag/1.0.0). - -The bootloader is run right before booting to InfiniTime. +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) -The bootloader is easily recognizable with its white pine cone that is progressively drawn in green. It also displays its own version on the bottom (1.0.0 as of now). +The bootloader is run right before booting into InfiniTime. It is easily recognizable with its white pine cone that is progressively drawn in green. It also displays its own version on the bottom (1.0.0 as of now). ![Bootloader 1.0](bootloader-1.0.jpg) -## How to update your PineTime? +## Updating with companion apps To update your PineTime, you can use one of the [compatible companion applications](/README.md#companion-apps). @@ -43,7 +29,7 @@ We have prepared instructions for flashing InfiniTime with Gadgetbridge and NRFC - [Updating with Gadgetbridge](/doc/gettingStarted/ota-gadgetbridge.md) - [Updating with NRFConnect](/doc/gettingStarted/ota-nrfconnect.md) -### Firmware validation +## Firmware validation Firmware updates must be manually validated. If the firmware isn't validated and the watch resets, the watch will revert to the previous firmware. This is a safety feature to prevent bricking your device with faulty firmware. @@ -53,14 +39,3 @@ You can validate your updated firmware on InfiniTime >= 1.0 by following this si - Open settings by tapping the cogwheel on the bottom right - Swipe up until you find an entry named **Firmware** and tap on it - If the firmware is not validated yet, you can either validate the running firmware, or reset and revert to the previous firmware version - -## Bootloader - -Most of the time, the bootloader just runs without your intervention (update and load the firmware). - -However, you can enable 2 functionalities using the push button: - - - Push the button until the pine cone is drawn in **blue** to force the rollback of the previous version of the firmware, even if you've already validated the updated one - - Push the button until the pine cone is drawn in **red** to load the recovery firmware. This recovery firmware only provides BLE connectivity and OTA functionality. - -More info about the bootloader in [its project page](https://github.com/JF002/pinetime-mcuboot-bootloader/blob/master/README.md). -- cgit v1.2.3-70-g09d2 From 3eebe66d659c9c8e72a7c355973c74c2b8899174 Mon Sep 17 00:00:00 2001 From: Avamander Date: Sat, 4 Dec 2021 17:12:34 +0200 Subject: Updated docs and renamed functions for consistency --- doc/ble.md | 18 +++++++++++------- src/components/ble/weather/WeatherService.cpp | 4 ++-- src/components/ble/weather/WeatherService.h | 11 +++++++---- 3 files changed, 20 insertions(+), 13 deletions(-) (limited to 'doc') diff --git a/doc/ble.md b/doc/ble.md index 8573166f..2b86243e 100644 --- a/doc/ble.md +++ b/doc/ble.md @@ -2,7 +2,7 @@ ## Introduction This page describes the BLE implementation and API built in this firmware. -**Note** : I'm a beginner in BLE related technologies and the information in this document reflects my current knowledge and understanding of the BLE stack. This information might be erroneous or incomplete. Feel free to submit a PR if you think you can improve it. +**Note**: I'm a beginner in BLE related technologies and the information in this document reflects my current knowledge and understanding of the BLE stack. This information might be erroneous or incomplete. Feel free to submit a PR if you think you can improve it. --- @@ -72,12 +72,16 @@ The following custom services are implemented in InfiniTime: * [Navigation Service](NavigationService.md) : 00010000-78fc-48fe-8e23-433b3a1942d0 - - Since InfiniTime 0.13 - * Call characteristic (extension to the Alert Notification Service): 00020001-78fc-48fe-8e23-433b3a1942d0 - - - - Since InfiniTime 1.7: - * [Motion Service](MotionService.md) : 00030000-78fc-48fe-8e23-433b3a1942d0 +- Since InfiniTime 0.13 + * Call characteristic (extension to the Alert Notification Service): 00020001-78fc-48fe-8e23-433b3a1942d0 + + +- Since InfiniTime 1.7: + * [Motion Service](MotionService.md): 00030000-78fc-48fe-8e23-433b3a1942d0 + + +- Since InfiniTime 1.8: + * [Weather Service](/src/components/ble/weather/WeatherService.h): 00040000-78fc-48fe-8e23-433b3a1942d0 --- diff --git a/src/components/ble/weather/WeatherService.cpp b/src/components/ble/weather/WeatherService.cpp index f3be35f2..23f53b74 100644 --- a/src/components/ble/weather/WeatherService.cpp +++ b/src/components/ble/weather/WeatherService.cpp @@ -550,7 +550,7 @@ namespace Pinetime { return std::chrono::duration_cast(dateTimeController.CurrentDateTime().time_since_epoch()).count(); } - int16_t WeatherService::getTodayMinTemp() const { + int16_t WeatherService::GetTodayMinTemp() const { uint64_t currentTimestamp = GetCurrentUnixTimestamp(); uint64_t currentDayEnd = currentTimestamp - ((24 - dateTimeController.Hours()) * 60 * 60) - ((60 - dateTimeController.Minutes()) * 60) - (60 - dateTimeController.Seconds()); @@ -573,7 +573,7 @@ namespace Pinetime { return result; } - int16_t WeatherService::getTodayMaxTemp() const { + int16_t WeatherService::GetTodayMaxTemp() const { uint64_t currentTimestamp = GetCurrentUnixTimestamp(); uint64_t currentDayEnd = currentTimestamp - ((24 - dateTimeController.Hours()) * 60 * 60) - ((60 - dateTimeController.Minutes()) * 60) - (60 - dateTimeController.Seconds()); diff --git a/src/components/ble/weather/WeatherService.h b/src/components/ble/weather/WeatherService.h index a9f02b16..eca70cbd 100644 --- a/src/components/ble/weather/WeatherService.h +++ b/src/components/ble/weather/WeatherService.h @@ -64,14 +64,14 @@ namespace Pinetime { /** * Searches for the current day's maximum temperature - * @return -32768 if there's no data, degrees celcius times 100 otherwise + * @return -32768 if there's no data, degrees Celsius times 100 otherwise */ - int16_t getTodayMaxTemp() const; + int16_t GetTodayMaxTemp() const; /** * Searches for the current day's minimum temperature - * @return -32768 if there's no data, degrees celcius times 100 otherwise + * @return -32768 if there's no data, degrees Celsius times 100 otherwise */ - int16_t getTodayMinTemp() const; + int16_t GetTodayMinTemp() const; /* * Management functions @@ -163,6 +163,9 @@ namespace Pinetime { */ static bool IsEventStillValid(const std::unique_ptr& uniquePtr, const uint64_t timestamp); + /** + * This is a helper function that closes a QCBOR map and decoding context cleanly + */ void CleanUpQcbor(QCBORDecodeContext* decodeContext); }; } -- cgit v1.2.3-70-g09d2 From 1832a6c23114a2a1d824de3aa519c70e6f78cfa8 Mon Sep 17 00:00:00 2001 From: Eli Weiss Date: Mon, 29 Nov 2021 21:03:23 -0600 Subject: Update buildAndProgram.md Improved documentation readability. --- doc/buildAndProgram.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/buildAndProgram.md b/doc/buildAndProgram.md index 3686871a..feef9f6d 100644 --- a/doc/buildAndProgram.md +++ b/doc/buildAndProgram.md @@ -4,7 +4,7 @@ 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) - 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 to keep the system clean a python virtual environment (`venv`) can be used to install the python modules into + - To keep the system clean, you can install python modules into a python virtual environment (`venv`) ```sh python -m venv .venv source .venv/bin/activate @@ -260,4 +260,4 @@ Finally, merge them together with **mergehex**: This file must be flashed at offset **0x00** of the internal memory of the NRF52832. #### spinor.bin -This file is the MCUBoot image of the last stable version of the recovery firmware. It must be flashed at offset **0x00** of the external SPINOR flash memory. \ No newline at end of file +This file is the MCUBoot image of the last stable version of the recovery firmware. It must be flashed at offset **0x00** of the external SPINOR flash memory. -- cgit v1.2.3-70-g09d2 From f66fcdd3ca64fcbecfa264a506b7973b47ba1213 Mon Sep 17 00:00:00 2001 From: Eli Weiss Date: Mon, 29 Nov 2021 21:51:35 -0600 Subject: Improved documentation readability Removed extra space in contribute.md and cleaned up MemoryAnalysis.md phrasing and confusing punctuation. --- doc/MemoryAnalysis.md | 18 +++++++++--------- doc/contribute.md | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'doc') diff --git a/doc/MemoryAnalysis.md b/doc/MemoryAnalysis.md index 7304e3f3..20bb9283 100644 --- a/doc/MemoryAnalysis.md +++ b/doc/MemoryAnalysis.md @@ -32,13 +32,13 @@ In this analysis, I used [Linkermapviz](https://github.com/PromyLOPh/linkermapvi ### Linkermapviz -[Linkermapviz](https://github.com/PromyLOPh/linkermapviz) parses the MAP file and displays its content in a graphical way into an HTML page: +[Linkermapviz](https://github.com/PromyLOPh/linkermapviz) parses the MAP file and displays its content on an HTML page as a graphic: ![linkermapviz](./memoryAnalysis/linkermapviz.png) -Using this tool, you can easily see the size of each symbol relative to the other one, and check what is using most of the space,... +Using this tool, you can compare the relative size of symbols. This can be helpful for checking memory usage at a glance. -Also, as Linkermapviz is written in Python, you can easily modify it to adapt it to your firmware, export data in another format,... For example, [I modified it to parse the contents of the MAP file and export it in a CSV file](https://github.com/InfiniTimeOrg/InfiniTime/issues/313#issuecomment-842338620). I could later on open this file in LibreOffice Calc and use sort/filter functionality to search for specific symbols in specific files... +Also, as Linkermapviz is written in Python, you can easily modify and adapt it to your firmware or export data in another format. For example, [here it is modified to parse the contents of the MAP file and export it in a CSV file](https://github.com/InfiniTimeOrg/InfiniTime/issues/313#issuecomment-842338620). This file could later be opened in LibreOffice Calc where sort/filter functionality could be used to search for specific symbols in specific files... ### Puncover [Puncover](https://github.com/HBehrens/puncover) is another useful tools that analyses the binary file generated by the compiler (the .out file that contains all debug information). It provides valuable information about the symbols (data and code): name, position, size, max stack of each functions, callers, callees... @@ -46,8 +46,8 @@ Also, as Linkermapviz is written in Python, you can easily modify it to adapt it Puncover is really easy to install: - - clone the repo and cd into the cloned directory - - setup a venv + - Clone the repo and cd into the cloned directory + - Setup a venv - `python -m virtualenv venv` - `source venv/bin/activate` - Install : `pip install .` @@ -60,13 +60,13 @@ Puncover is really easy to install: - 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 space. In this case, with no surprise, fonts and graphics are the biggest flash space consumer. +Using the MAP file and tools, we can easily see what symbols are using most of the flash memory. In this case, with no surprise, fonts and graphics are the largest use of flash memory. ![Puncover](./memoryAnalysis/puncover-all-symbols.png) -This way, you can easily check what needs to be optimized : we should find a way to store big static data (like fonts and graphics) in the external flash memory, for example. +This way, you can easily check what needs to be optimized. We should find a way to store big static data (like fonts and graphics) in the external flash memory, for example. -It's always a good idea to check the flash memory space when working on the project : this way, you can easily check that your developments are using a reasonable amount of space. +It's always a good idea to check the flash memory space when working on the project. This way, you can easily check that your developments are using a reasonable amount of space. ### Links - Analysis with linkermapviz : https://github.com/InfiniTimeOrg/InfiniTime/issues/313#issuecomment-842338620 @@ -210,7 +210,7 @@ NRF_LOG_INFO("heap : %d", m.uordblks); ``` #### Analysis -According to my experimentation, InfiniTime uses ~6000bytes of heap most of the time. Except when the Navigation app is launched, where the heap usage increases to... more than 9500 bytes (meaning that the heap overflows and could potentially corrupt the stack!!!). This is a bug that should be fixed in #362. +According to my experimentation, InfiniTime uses ~6000bytes of heap most of the time. Except when the Navigation app is launched, where the heap usage exceeds 9500 bytes (meaning that the heap overflows and could potentially corrupt the stack). This is a bug that should be fixed in #362. To know exactly what's consuming heap memory, you can `wrap` functions like `malloc()` into your own functions. In this wrapper, you can add logging code or put breakpoints: diff --git a/doc/contribute.md b/doc/contribute.md index b1be84a4..f2a4aeaa 100644 --- a/doc/contribute.md +++ b/doc/contribute.md @@ -46,7 +46,7 @@ Other contributors can post comments about the pull request, maybe ask for more Once the pull request is reviewed and accepted, it'll be merged into **develop** and will be released in the next version of the firmware. -## Why all these rules? +## Why all these rules? Reviewing pull requests is a **very time consuming task**. Everything you do to make reviewing easier will **get your PR merged faster**. -- cgit v1.2.3-70-g09d2 From c8214bc666a5daf1b0c1c323ae4af7cb5ae2510b Mon Sep 17 00:00:00 2001 From: Eli Weiss Date: Tue, 30 Nov 2021 13:22:47 -0600 Subject: Update MemoryAnalysis.md Cleaned up MemoryAnalysis.md for greater readability --- doc/MemoryAnalysis.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/MemoryAnalysis.md b/doc/MemoryAnalysis.md index 20bb9283..376f98f6 100644 --- a/doc/MemoryAnalysis.md +++ b/doc/MemoryAnalysis.md @@ -60,7 +60,7 @@ Puncover is really easy to install: - 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, with no surprise, 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, unsuprisingly, fonts and graphics are the largest use of flash memory. ![Puncover](./memoryAnalysis/puncover-all-symbols.png) @@ -245,7 +245,7 @@ Using this technique, I was able to trace all malloc calls at boot (boot -> digi - https://www.embedded.com/mastering-stack-and-heap-for-system-reliability-part-3-avoiding-heap-errors/ ## LVGL -I did a deep analysis of the usage of the buffer dedicated for lvgl (managed by lv_mem). +I did a deep analysis of the usage of the buffer dedicated to lvgl (managed by lv_mem). This buffer is used by lvgl to allocated memory for drivers (display/touch), screens, themes, and all widgets created by the apps. The usage of this buffer can be monitored using this code : @@ -256,7 +256,7 @@ lv_mem_monitor(&mon); NRF_LOG_INFO("\t Free %d / %d -- max %d", mon.free_size, mon.total_size, mon.max_used); ``` -The most interesting metric is `mon.max_used` which specifies the maximum number of bytes that were used from this buffer since the initialization of lvgl. +The most interesting metric is `mon.max_used` which specifies the maximum number of bytes used from this buffer since the initialization of lvgl. According to my measurements, initializing the theme, display/touch driver and screens cost **4752** bytes! Then, initializing the digital clock face costs **1541 bytes**. For example a simple lv_label needs **~140 bytes** of memory. -- cgit v1.2.3-70-g09d2 From 90352af626cc0087143e824f62f5dcee9f58f29c Mon Sep 17 00:00:00 2001 From: Eli Weiss Date: Thu, 2 Dec 2021 14:50:59 -0600 Subject: Improved documentation readability Improved documentation readability by rephrasing confusing sentences. Added Sitronix ST7789V datasheet link to SPI-LCD-driver.md for easier reference. --- doc/NavigationService.md | 4 ++-- doc/PinetimeStubWithNrf52DK.md | 12 ++++++------ doc/SPI-LCD-driver.md | 2 +- doc/SWD.md | 4 ++-- doc/ble.md | 4 ++-- doc/branches.md | 2 +- doc/openOCD.md | 10 +++++----- 7 files changed, 19 insertions(+), 19 deletions(-) (limited to 'doc') diff --git a/doc/NavigationService.md b/doc/NavigationService.md index fd81d0bf..b24a03b7 100644 --- a/doc/NavigationService.md +++ b/doc/NavigationService.md @@ -1,6 +1,6 @@ # Navigation Service ## Introduction -The navigation ble service provides 4 characteristics to allow the the watch to display navigation instructions from a companion application. The intended purpose is when performing some outdoor activities, for example running or cycling. +The navigation ble service provides 4 characteristics to allow the the watch to display navigation instructions from a companion application. This service is intended to be used when performing some outdoor activities, for example running or cycling. The 4 characteristics are: flag (string) - Upcoming icon name @@ -22,7 +22,7 @@ This is a client supplied string describing the upcoming instruction such as "At This is a short string describing the distance to the upcoming instruction such as "50 m". ## Progress (UUID 00010004-78fc-48fe-8e23-433b3a1942d0) -The percent complete in a uint8. The watch displays this as an overall progress in a progress bar. +The percent complete in a uint8. The watch displays this as an overall progress in a progress bar. ## Full icon list * arrive diff --git a/doc/PinetimeStubWithNrf52DK.md b/doc/PinetimeStubWithNrf52DK.md index c4857921..e85bd554 100644 --- a/doc/PinetimeStubWithNrf52DK.md +++ b/doc/PinetimeStubWithNrf52DK.md @@ -1,11 +1,11 @@ # 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 NRF52832 SoC from Nordic Semiconductor. +[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. -It can be very useful for PineTime development: - * You can use it embedded JLink SWD programmer/debugger to program and debug you code on the PineTime - * As it's based on the same SoC than the PineTime, you can program it to actually run the same code than 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 + * As it's based on the same SoC than the PineTime, you can program it to actually run the same code as the PineTime. -This page is about the 2nd point : we will build a stub that will allow us to run the same code than the one you could run on the PineTime. This will allow you to work more easily if you don't have a PineTime dev kit around, if you don't want to modify your dev kit for SWD programming, or if you want to use some feature from the DK (like power measurement). +This page is about the 2nd point : we will build a stub that will allow us to run the same code you can run on the PineTime. This will allow you to work more easily if you don't have a PineTime dev kit around, if you don't want to modify your dev kit for SWD programming, or if you want to use some feature from the NRF52-DK (like power measurement). This stub only implements the display, the button and the BLE radio. The other features from the pintime are missing: * heart rate sensor @@ -41,7 +41,7 @@ You just need to make the following connections: | P0.13 | Button IN (D3 in my case) | | GND | GND | -You also need to enable the I/O expander to disconnect pins from buttons and led on the NRF52-DK and leave them available on the pin headers: +You also need to enable the I/O expander to disconnect pins from the buttons and LED on the NRF52-DK and leave them available on the pin headers: | NRF52 -DK | NRF52- DK | | --------- | --------- | diff --git a/doc/SPI-LCD-driver.md b/doc/SPI-LCD-driver.md index f787aab7..29f3bbfa 100644 --- a/doc/SPI-LCD-driver.md +++ b/doc/SPI-LCD-driver.md @@ -1,6 +1,6 @@ # The SPI LCD driver ## Introduction -The LCD controller that drive the display of the Pinetime is the Sitronix ST7789V. This controller is easy to integrate with an MCU thanks to its SPI interface, and has some interesting features like: +The LCD controller that drives the display of the Pinetime is the [Sitronix ST7789V](https://wiki.pine64.org/images/5/54/ST7789V_v1.6.pdf). This controller is easy to integrate with an MCU thanks to its SPI interface, and has some interesting features like: - an on-chip display data RAM that can store the whole framebuffer - partial screen update - hardware assisted vertical scrolling diff --git a/doc/SWD.md b/doc/SWD.md index 4146e6ae..668eaa5c 100644 --- a/doc/SWD.md +++ b/doc/SWD.md @@ -4,9 +4,9 @@ Download the files **bootloader.bin**, **image-x.y.z.bin** and **pinetime-graphi ![Image file](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 second, until the logo is completely drawn on the display. +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. -Then, using your SWD tool, flash those file at specific offset: +Then, using your SWD tool. Flash those file at specific offset: - bootloader.bin : **0x0000** - image-x.y.z.bin : **0x8000** diff --git a/doc/ble.md b/doc/ble.md index 314097d7..d2502636 100644 --- a/doc/ble.md +++ b/doc/ble.md @@ -120,11 +120,11 @@ Reading a value from the firmware version characteristic will yield a UTF-8 enco #### Battery Level -Reading from the battery level characteristic yields a single byte of data. This byte can be converted to an unsigned 8-bit integer which will be the battery percentage. This characteristic allows notify for updates as the value changes. +Reading from the battery level characteristic yields a single byte of data. This byte can be converted to an unsigned 8-bit integer which will be the battery percentage. This characteristic allows notifications for updates as the value changes. #### Heart Rate -Reading from the heart rate characteristic yields two bytes of data. I am not sure of the function of the first byte. It appears to always be zero. The second byte can be converted to an unsigned 8-bit integer which is the current heart rate. This characteristic also allows notify for updates as the value changes. +Reading from the heart rate characteristic yields two bytes of data. I am not sure of the function of the first byte. It appears to always be zero. The second byte can be converted to an unsigned 8-bit integer which is the current heart rate. This characteristic also allows notifications for updates as the value changes. --- diff --git a/doc/branches.md b/doc/branches.md index ef280f40..b06c10cc 100644 --- a/doc/branches.md +++ b/doc/branches.md @@ -9,4 +9,4 @@ New features should be implemented in **feature branches** created from **develo 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**. -Git flow also supports the creation of **hotfix** branches when a bug is discovered in a released version. The **hotfix** branch is created from **master** and will be used only to implement a fix to this bug. Multiple hotfix branches can be created for the same release if more than one bugs are discovered. \ No newline at end of file +Git flow also supports the creation of **hotfix** branches when a bug is discovered in a released version. The **hotfix** branch is created from **master** and will be used only to implement a fix to this bug. Multiple hotfix branches can be created for the same release if multiple bugs are discovered. \ No newline at end of file diff --git a/doc/openOCD.md b/doc/openOCD.md index b3661cee..a7386e34 100644 --- a/doc/openOCD.md +++ b/doc/openOCD.md @@ -1,12 +1,12 @@ # OpenOCD and STLink OpenOCD (**Open O**n **C**hip **D**ebugger) is an open source tool that interfaces with many SWD/JTAG debugger to provide debugging and *in-system* programming for embedded target devices. -It supports the **NRF52** (the CPU of the PineTime) and the **STLinkV2**, a cheap SWD debugger. +OpenOCD supports the **NRF52** (the CPU of the PineTime) and the **STLinkV2**, a cheap SWD debugger. -It works on X86 computers, as well as ARM/ARM64 computers and SBC (like the RaspberryPi and Pine64 Pinebook Pro) ! +OpenOCD works on X86 computers, ARM/ARM64 computers, and SBCs (like the RaspberryPi and Pine64 Pinebook Pro)! ## Installation -We will build OpenOCD from sources, as packages from Linux distributions are most of the time outdated and do not support the NRF52 correctly. +We will build OpenOCD from sources, as packages from Linux distributions are often outdated and do not support the NRF52 correctly. - Fetch the sources from GIT, and build and install it: @@ -27,7 +27,7 @@ sudo cp contrib/60-openocd.rules /etc/udev/rules.d/ sudo udevadm control --reload-rules ``` - - You can now plug your STLinkV2 in a USB port and run OpenOCD to see if it's working correctly: + - You can now plug your STLinkV2 into a USB port and run OpenOCD to see if it's working correctly: ``` $ openocd -f interface/stlink.cfg -f target/nrf52.cfg @@ -63,7 +63,7 @@ gdb_breakpoint_override hard source [find target/nrf52.cfg] ``` -This file specifies to OpenOCD which debugger and target it will be connected to.. +This file specifies to OpenOCD which debugger and target it will be connected to. Then, we use various *user files* to use OpenOCD to flash InfiniTime binary files. -- cgit v1.2.3-70-g09d2 From 97668c775bb5e501b32fce2fc92f4a5995aec1b1 Mon Sep 17 00:00:00 2001 From: Eli Weiss Date: Sun, 5 Dec 2021 10:41:01 -0600 Subject: Improved "Getting Started" readability Clarified ambiguous references, clarified phrasing --- doc/branches.md | 2 +- doc/code/Apps.md | 6 +++--- doc/code/Intro.md | 4 ++-- doc/gettingStarted/about-software.md | 10 +++++----- doc/gettingStarted/gettingStarted-1.0.md | 2 +- doc/gettingStarted/ota-gadgetbridge.md | 2 +- doc/openOCD.md | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) (limited to 'doc') diff --git a/doc/branches.md b/doc/branches.md index b06c10cc..3c86375f 100644 --- a/doc/branches.md +++ b/doc/branches.md @@ -1,7 +1,7 @@ # Branches The branching model of this project is based on the workflow named [Git flow](https://nvie.com/posts/a-successful-git-branching-model/). -It is based on 2 main branches: +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. diff --git a/doc/code/Apps.md b/doc/code/Apps.md index b1c7d20e..0e6d13cf 100644 --- a/doc/code/Apps.md +++ b/doc/code/Apps.md @@ -8,8 +8,8 @@ This page will teach you: The user interface of InfiniTime is made up of **screens**. Screens that are opened from the app launcher are considered **apps**. Every app in InfiniTime is it's own class. -An instance of the class is created when the app is launched and destroyed when the user exits the app. -They run inside the "displayapp" task (briefly discussed [here](./Intro.md)). +An instance of the class is created when the app is launched, and destroyed when the user exits the app. +Apps run inside the "displayapp" task (briefly discussed [here](./Intro.md)). Apps are responsible for everything drawn on the screen when they are running. By default, apps only do something (as in a function is executed) when they are created or when a touch event is detected. @@ -21,7 +21,7 @@ A destructor is needed to clean up LVGL and restore any changes (for example re- App classes can override `bool OnButtonPushed()`, `bool OnTouchEvent(TouchEvents event)` and `bool OnTouchEvent(uint16_t x, uint16_t y)` to implement their own functionality for those events. If an app only needs to display some text and do something upon a touch screen button press, it does not need to override any of these functions, as LVGL can also handle touch events for you. -If you have any doubts, you can always look at how the other apps are doing things. +If you have any doubts, you can always look at how the other apps function for examples. ### Continuous updating If your app needs to be updated continuously, you can do so by overriding the `Refresh()` function in your class diff --git a/doc/code/Intro.md b/doc/code/Intro.md index bf68c7a5..23b3ade1 100644 --- a/doc/code/Intro.md +++ b/doc/code/Intro.md @@ -24,9 +24,9 @@ There are also other tasks that are responsible for Bluetooth ("ll" and "ble" in and periodic tasks like heartrate measurements ([heartratetask/HeartRateTask.cpp](/src/heartratetask/HeartRateTask.cpp)). While it is possible for you to create your own task when you need it, it is recommended to just add functionality to `SystemTask::Work()` if possible. -If you absolutely need to create another task, try to guess how much [stack space](https://www.freertos.org/FAQMem.html#StackSize) (in words/4-byte packets) +If you absolutely need to create another task, try to estimate how much [stack space](https://www.freertos.org/FAQMem.html#StackSize) (in words/4-byte packets) it will need instead of just typing in a large-ish number. -You can use the define `configMINIMAL_STACK_SIZE` which is currently set to 120 words. +You can use `configMINIMAL_STACK_SIZE` which is currently set to 120 words. ## Controllers Controllers in InfiniTime are singleton objects that can provide access to certain resources to apps. diff --git a/doc/gettingStarted/about-software.md b/doc/gettingStarted/about-software.md index b19a610f..e935d938 100644 --- a/doc/gettingStarted/about-software.md +++ b/doc/gettingStarted/about-software.md @@ -12,15 +12,15 @@ InfiniTime has three distinct firmwares: **OTA** (**O**ver **T**he **A**ir) refers to updating of the firmware over BLE (**B**luetooth **L**ow **E**nergy). This is a functionality that allows the user to update the firmware on their device wirelessly. -**DFU** (**D**evice **F**irmware **U**pdate) is the file format and protocol used to send the update of the firmware to the watch over-the-air. InfiniTime implement the (legacy) DFU protocol from Nordic Semiconductor (NRF). +**DFU** (**D**evice **F**irmware **U**pdate) is the file format and protocol used to send the update of the firmware to the watch over-the-air. InfiniTime implements the (legacy) DFU protocol from Nordic Semiconductor (NRF). ## Bootloader -Most of the time, the bootloader just runs without your intervention (update and load the firmware). +Most of the time, the bootloader just runs without your intervention (updating and loading the firmware). -However, you can enable 2 functionalities using the push button: +However, you can use the bootloader to rollback to the previous firmware, or load the recovery firmware using the push button: - - Push the button until the pine cone is drawn in **blue** to force the rollback of the previous version of the firmware, even if you've already validated the updated one - - Push the button until the pine cone is drawn in **red** to load the recovery firmware. This recovery firmware only provides BLE connectivity and OTA functionality. + - Press and hold the button until the pine cone is drawn in **blue** to force the rollback of the previous version of the firmware, even if you've already validated the current one. + - Press and hold the button until the pine cone is drawn in **red** to load the recovery firmware. This recovery firmware only provides BLE connectivity and OTA functionality. More info about the bootloader in [its project page](https://github.com/JF002/pinetime-mcuboot-bootloader/blob/master/README.md). diff --git a/doc/gettingStarted/gettingStarted-1.0.md b/doc/gettingStarted/gettingStarted-1.0.md index 30b8bdb0..890164fe 100644 --- a/doc/gettingStarted/gettingStarted-1.0.md +++ b/doc/gettingStarted/gettingStarted-1.0.md @@ -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 the time or sync it with a companion app. ### Digital watch face diff --git a/doc/gettingStarted/ota-gadgetbridge.md b/doc/gettingStarted/ota-gadgetbridge.md index 022b5e4d..fe26c03b 100644 --- a/doc/gettingStarted/ota-gadgetbridge.md +++ b/doc/gettingStarted/ota-gadgetbridge.md @@ -18,7 +18,7 @@ Now that Gadgetbridge is connected to your PineTime, use a file browser applicat ![Gadgetbridge 3](gadgetbridge3.jpg) -Read carefully the warning and tap **Install**: +Read the warning carefully and tap **Install**: ![Gadgetbridge 4](gadgetbridge4.jpg) diff --git a/doc/openOCD.md b/doc/openOCD.md index a7386e34..df24b30b 100644 --- a/doc/openOCD.md +++ b/doc/openOCD.md @@ -6,7 +6,7 @@ OpenOCD supports the **NRF52** (the CPU of the PineTime) and the **STLinkV2**, a OpenOCD works on X86 computers, ARM/ARM64 computers, and SBCs (like the RaspberryPi and Pine64 Pinebook Pro)! ## Installation -We will build OpenOCD from sources, as packages from Linux distributions are often outdated and do not support the NRF52 correctly. +We will build OpenOCD from sources, as packages from Linux distributions are most of the time outdated and do not support the NRF52 properly. - Fetch the sources from GIT, and build and install it: -- cgit v1.2.3-70-g09d2 From ab059b90044981b0feb3f37201fcf6635d2c4e1f Mon Sep 17 00:00:00 2001 From: Eli Weiss Date: Sun, 5 Dec 2021 14:04:35 -0600 Subject: Revised documentation --- doc/NavigationService.md | 2 +- doc/PinetimeStubWithNrf52DK.md | 2 +- doc/SWD.md | 2 +- doc/code/Apps.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/NavigationService.md b/doc/NavigationService.md index b24a03b7..5a4f69e0 100644 --- a/doc/NavigationService.md +++ b/doc/NavigationService.md @@ -1,6 +1,6 @@ # Navigation Service ## Introduction -The navigation ble service provides 4 characteristics to allow the the watch to display navigation instructions from a companion application. This service is intended to be used when performing some outdoor activities, for example running or cycling. +The navigation ble service provides 4 characteristics to allow the watch to display navigation instructions from a companion application. This service is intended to be used when performing some outdoor activities, for example running or cycling. The 4 characteristics are: flag (string) - Upcoming icon name diff --git a/doc/PinetimeStubWithNrf52DK.md b/doc/PinetimeStubWithNrf52DK.md index e85bd554..dcaad69b 100644 --- a/doc/PinetimeStubWithNrf52DK.md +++ b/doc/PinetimeStubWithNrf52DK.md @@ -5,7 +5,7 @@ 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 * As it's based on the same SoC than the PineTime, you can program it to actually run the same code as the PineTime. -This page is about the 2nd point : we will build a stub that will allow us to run the same code you can run on the PineTime. This will allow you to work more easily if you don't have a PineTime dev kit around, if you don't want to modify your dev kit for SWD programming, or if you want to use some feature from the NRF52-DK (like power measurement). +This page is about the 2nd point. We will build a stub that will allow us to run the same code you can run on the PineTime. This will allow you to work more easily if you don't have a PineTime dev kit around, if you don't want to modify your dev kit for SWD programming, or if you want to use some feature from the NRF52-DK (like power measurement). This stub only implements the display, the button and the BLE radio. The other features from the pintime are missing: * heart rate sensor diff --git a/doc/SWD.md b/doc/SWD.md index 668eaa5c..155983b3 100644 --- a/doc/SWD.md +++ b/doc/SWD.md @@ -6,7 +6,7 @@ Download the files **bootloader.bin**, **image-x.y.z.bin** and **pinetime-graphi 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. -Then, using your SWD tool. Flash those file at specific offset: +Then, using your SWD tool, flash these file at the following offsets: - bootloader.bin : **0x0000** - image-x.y.z.bin : **0x8000** diff --git a/doc/code/Apps.md b/doc/code/Apps.md index 0e6d13cf..f067b58b 100644 --- a/doc/code/Apps.md +++ b/doc/code/Apps.md @@ -21,7 +21,7 @@ A destructor is needed to clean up LVGL and restore any changes (for example re- App classes can override `bool OnButtonPushed()`, `bool OnTouchEvent(TouchEvents event)` and `bool OnTouchEvent(uint16_t x, uint16_t y)` to implement their own functionality for those events. If an app only needs to display some text and do something upon a touch screen button press, it does not need to override any of these functions, as LVGL can also handle touch events for you. -If you have any doubts, you can always look at how the other apps function for examples. +If you have any doubts, you can always look at how the other apps function for reference. ### Continuous updating If your app needs to be updated continuously, you can do so by overriding the `Refresh()` function in your class -- cgit v1.2.3-70-g09d2