You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/SimpleWeatherService.md
+14-5Lines changed: 14 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,23 +17,25 @@ The host uses this characteristic to update the current weather information and
17
17
18
18
This characteristics accepts a byte array with the following 2-Bytes header:
19
19
20
-
-[0] Message Type :
20
+
-[0] Message Type :
21
21
-`0` : Current weather
22
22
-`1` : Forecast
23
-
-[1] Message Version : Version `0` is currently supported. Other versions might be added in future releases
23
+
-[1] Message Version :
24
+
-`0` : Currently supported
25
+
-`1` : Adds support for sunrise and sunset
24
26
25
-
### Current Weather
27
+
### Current Weather
26
28
27
29
The byte array must contain the following data:
28
30
29
31
-[0] : Message type = `0`
30
-
-[1] : Message version = `0`
32
+
-[1] : Message version = `1`
31
33
-[2][3][4][5][6][7][8][9] : Timestamp (64 bits UNIX timestamp, number of seconds elapsed since 1 JAN 1970) in local time (the same timezone as the one used to set the time)
32
34
-[10, 11] : Current temperature (°C * 100)
33
35
-[12, 13] : Minimum temperature (°C * 100)
34
36
-[14, 15] : Maximum temperature (°C * 100)
35
37
-[16]..[47] : location (string, unused characters should be set to `0`)
36
-
-[48] : icon ID
38
+
-[48] : icon ID
37
39
- 0 = Sun, clear sky
38
40
- 1 = Few clouds
39
41
- 2 = Clouds
@@ -43,6 +45,13 @@ The byte array must contain the following data:
43
45
- 6 = Thunderstorm
44
46
- 7 = Snow
45
47
- 8 = Mist, smog
48
+
-[49, 50] : Sunrise (number of minutes elapsed since midnight)
49
+
-`0` sun already up when day starts
50
+
-`-1` unknown
51
+
-`-2` no sunrise (e.g. polar night)
52
+
-[51, 52] : Sunset (number of minutes elapsed since midnight)
Copy file name to clipboardExpand all lines: doc/buildAndProgram.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
To build this project, you'll need:
6
6
7
7
- A cross-compiler : [ARM-GCC (10.3-2021.10)](https://developer.arm.com/downloads/-/gnu-rm)
8
-
- 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)
8
+
- The NRF52 SDK 15.3.0 : [nRF-SDK v15.3.0](https://nsscprodmedia.blob.core.windows.net/prod/software-and-other-downloads/sdks/nrf5/binaries/nrf5sdk153059ac345.zip)
9
9
- The Python 3 modules `cbor`, `intelhex`, `click` and `cryptography` modules for the `mcuboot` tool (see [requirements.txt](../tools/mcuboot/requirements.txt))
10
10
- To keep the system clean, you can install python modules into a python virtual environment (`venv`)
The `infinitime-build` image contains all the dependencies you need.
27
-
The default `CMD` will compile sources found in `/sources`, so you need only mount your code.
24
+
## Provision the image
28
25
29
-
Before continuing, make sure you first build the image as indicated in the [Build the image](#build-the-image) section, or check the [Using the image from Docker Hub](#using-the-image-from-docker-hub) section if you prefer to use a pre-made image.
26
+
Before continuing, the build image needs to be either build locally or pulled
27
+
from Docker Hub, as described in the two sections below:
30
28
31
-
This example will build the firmware, generate the MCUBoot image and generate the DFU file.
32
-
For cloning the repo, see [these instructions](../doc/buildAndProgram.md#clone-the-repo). Outputs will be written to **<project_root>/build/output**:
The image is available via Docker Hub for both the amd64 and arm64v8 architectures at [infinitime/infinitime-build](https://hub.docker.com/repository/docker/infinitime/infinitime-build).
43
+
The image is available via Docker Hub for both the amd64 and arm64v8 architectures at
@@ -64,12 +55,35 @@ The default `latest` tag *should* automatically identify the correct image archi
64
55
65
56
- For ARM64v8 (ARM64/aarch64) systems: `docker pull --platform linux/arm64 infinitime/infinitime-build`
66
57
67
-
## Build the image
58
+
## Run a container to build the project
68
59
69
-
You can build the image yourself if you like!
60
+
The `infinitime-build` image contains all the dependencies you need.
61
+
The default `CMD` will compile sources found in `/sources`, so you need only mount your code.
70
62
71
-
The following commands must be run from the root of the project. This operation will take some time but, when done, a new image named *infinitime-build* is available.
63
+
This example will build the firmware, generate the MCUBoot image and generate the DFU file.
64
+
Outputs will be written to **<project_root>/build/output**:
72
65
73
-
```bash
74
-
docker build -t infinitime-build ./docker
66
+
```sh
67
+
cd<project_root># e.g. cd ./work/Pinetime
68
+
docker run --rm -it -v ${PWD}:/sources infinitime-build
69
+
```
70
+
71
+
If the docker service is running as `root`, the build process inside the
72
+
container also runs as `root`, which is not convenient as all the files
73
+
generated by the build will also belong to `root`. The parameter `--user`
74
+
overrides this behaviour. The command below ensures that all files are created
0 commit comments