Merge remote-tracking branch 'upstream/develop' into workflow-ignore-md
@ -1,17 +1,23 @@
|
||||
# Motion Service
|
||||
|
||||
## Introduction
|
||||
|
||||
The motion service exposes step count and raw X/Y/Z motion value as READ and NOTIFY characteristics.
|
||||
|
||||
## Service
|
||||
|
||||
The service UUID is **00030000-78fc-48fe-8e23-433b3a1942d0**
|
||||
|
||||
## Characteristics
|
||||
|
||||
### 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 00030002-78fc-48fe-8e23-433b3a1942d0)
|
||||
|
||||
The current raw motion values. This is a 3 `int16_t` array:
|
||||
|
||||
- [0] : X
|
||||
- [1] : Y
|
||||
- [2] : Z
|
||||
- [0] : X
|
||||
- [1] : Y
|
||||
- [2] : Z
|
||||
|
@ -1,12 +1,14 @@
|
||||
# Branches
|
||||
|
||||
The branching model of this project is based on the workflow named [Git flow](https://nvie.com/posts/a-successful-git-branching-model/).
|
||||
|
||||
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.
|
||||
|
||||
- **master** : this branch is always ready to be deployed. It means that at any time, we should be able to build the branch and release a new version of the application.
|
||||
- **develop** : this branch contains the latest development that will be integrated in the next release once it's considered as stable.
|
||||
|
||||
New features should be implemented in **feature branches** created from **develop**. When the feature is ready, a pull-request is created and it'll be merge into **develop** when it is successfully reviewed and accepted.
|
||||
|
||||
To release a new version of the application, when develop is considered stable, a **release** branch is created from **develop**. This can be considered as a *release candidate* branch. When everything is OK, this release branch is merged into **master** and the release is generated (a tag is applied to git, the release note is finalized, binaries are built,...) from **master**.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
@ -1,41 +1,29 @@
|
||||
# Coding convention
|
||||
# Coding style
|
||||
|
||||
## Language
|
||||
## Use these tools to find and fix issues.
|
||||
|
||||
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.
|
||||
- Use `clang-format` to format the code.
|
||||
- Use `clang-tidy` to check the code for other potential issues.
|
||||
|
||||
C code is accepted if it comes from another library like FreeRTOS, NimBLE, LVGL or the NRF-SDK.
|
||||
## Follow these guidelines while writing code.
|
||||
|
||||
## 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 <file.h>`
|
||||
- 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:
|
||||
- `auto* app = static_cast<DisplayApp*>(instance);`
|
||||
- `auto number = static_cast<uint8_t>(variable);`
|
||||
- `uint8_t returnValue = MyFunction();`
|
||||
- Use nullptr instead of NULL
|
||||
- **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 <file.h>`
|
||||
- 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.
|
||||
```c++
|
||||
// Examples:
|
||||
auto* app = static_cast<DisplayApp*>(instance);
|
||||
auto number = static_cast<uint8_t>(variable);
|
||||
uint8_t returnValue = MyFunction();
|
||||
```
|
||||
- Use `nullptr` instead of `NULL`
|
||||
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
@ -1,6 +1,7 @@
|
||||
# Versioning
|
||||
|
||||
The versioning of this project is based on [Semantic versioning](https://semver.org/):
|
||||
|
||||
- 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.
|
||||
- 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.
|
||||
|
@ -1,2 +1,2 @@
|
||||
Docker images and build script for building the project using Docker.
|
||||
See [this page for more info](../doc/buildWithDocker.md).
|
||||
See [this page for more info](../doc/buildWithDocker.md).
|
||||
|
Before Width: | Height: | Size: 607 KiB |
Before Width: | Height: | Size: 625 KiB |
Before Width: | Height: | Size: 576 KiB |
Before Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 2.0 MiB |
Before Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 2.1 MiB |
Before Width: | Height: | Size: 2.2 MiB |
Before Width: | Height: | Size: 2.1 MiB |
Before Width: | Height: | Size: 2.7 MiB |
Before Width: | Height: | Size: 1.8 MiB |
Before Width: | Height: | Size: 2.3 MiB |
Before Width: | Height: | Size: 2.3 MiB |
@ -1,8 +1,9 @@
|
||||
#include "Styles.h"
|
||||
#include "displayapp/InfiniTimeTheme.h"
|
||||
|
||||
void Pinetime::Applications::Screens::SetRadioButtonStyle(lv_obj_t* checkbox) {
|
||||
lv_obj_set_style_local_radius(checkbox, LV_CHECKBOX_PART_BULLET, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE);
|
||||
lv_obj_set_style_local_border_width(checkbox, LV_CHECKBOX_PART_BULLET, LV_STATE_CHECKED, 9);
|
||||
lv_obj_set_style_local_border_color(checkbox, LV_CHECKBOX_PART_BULLET, LV_STATE_CHECKED, LV_COLOR_MAKE(0x0, 0xb0, 0x0));
|
||||
lv_obj_set_style_local_border_color(checkbox, LV_CHECKBOX_PART_BULLET, LV_STATE_CHECKED, Colors::highlight);
|
||||
lv_obj_set_style_local_bg_color(checkbox, LV_CHECKBOX_PART_BULLET, LV_STATE_CHECKED, LV_COLOR_WHITE);
|
||||
}
|
||||
|