diff options
Diffstat (limited to 'doc')
41 files changed, 442 insertions, 51 deletions
diff --git a/doc/MotionService.md b/doc/MotionService.md index 429794ac..58c7e836 100644 --- a/doc/MotionService.md +++ b/doc/MotionService.md @@ -21,3 +21,5 @@ The current raw motion values. This is a 3 `int16_t` array: - [0] : X - [1] : Y - [2] : Z + +The three motion values are in units of "binary milli-g", where 1g is represented by a value of 1024. diff --git a/doc/SimpleWeatherService.md b/doc/SimpleWeatherService.md new file mode 100644 index 00000000..e0fffba7 --- /dev/null +++ b/doc/SimpleWeatherService.md @@ -0,0 +1,69 @@ +# Simple Weather Service + +## Introduction + +The Simple Weather Service provides a simple and straightforward API to specify the current weather and the forecast for the next 5 days. +It effectively replaces the original Weather Service (from InfiniTime 1.8) since InfiniTime 1.14. + +## Service + +The service UUID is `00050000-78fc-48fe-8e23-433b3a1942d0`. + +## Characteristics + +## Weather data (UUID 00050001-78fc-48fe-8e23-433b3a1942d0) + +The host uses this characteristic to update the current weather information and the forecast for the next 5 days. + +This characteristics accepts a byte array with the following 2-Bytes header: + + - [0] Message Type : + - `0` : Current weather + - `1` : Forecast + - [1] Message Version : Version `0` is currently supported. Other versions might be added in future releases + +### Current Weather + +The byte array must contain the following data: + + - [0] : Message type = `0` + - [1] : Message version = `0` + - [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) + - [10, 11] : Current temperature (°C * 100) + - [12, 13] : Minimum temperature (°C * 100) + - [14, 15] : Maximum temperature (°C * 100) + - [16]..[47] : location (string, unused characters should be set to `0`) + - [48] : icon ID + - 0 = Sun, clear sky + - 1 = Few clouds + - 2 = Clouds + - 3 = Heavy clouds + - 4 = Clouds & rain + - 5 = Rain + - 6 = Thunderstorm + - 7 = Snow + - 8 = Mist, smog + +### Forecast + +The byte array must contain the following data: + + - [0] : Message type = `1` + - [1] : Message version = `0` + - [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) + - [10] Number of days (Max 5, fields for unused days should be set to `0`) + - [11,12] Day 0 Minimum temperature (°C * 100) + - [13,14] Day 0 Maximum temperature (°C * 100) + - [15] Day 0 Icon ID + - [16,17] Day 1 Minimum temperature (°C * 100) + - [18,19] Day 1 Maximum temperature (°C * 100) + - [20] Day 1 Icon ID + - [21,22] Day 2 Minimum temperature (°C * 100) + - [23,24] Day 2 Maximum temperature (°C * 100) + - [25] Day 2 Icon ID + - [26,27] Day 3 Minimum temperature (°C * 100) + - [28,29] Day 3 Maximum temperature (°C * 100) + - [30] Day 3 Icon ID + - [31,32] Day 4 Minimum temperature (°C * 100) + - [33,34] Day 4 Maximum temperature (°C * 100) + - [35] Day 4 Icon ID @@ -92,7 +92,10 @@ The following custom services are implemented in InfiniTime: - Since InfiniTime 1.8: - - [Weather Service](/src/components/ble/weather/WeatherService.h): `00040000-78fc-48fe-8e23-433b3a1942d0` + - ~~Weather Service: `00040000-78fc-48fe-8e23-433b3a1942d0`~~ (replaced by Simple Weather Service in InfiniTime 1.14) + +- Since InfiniTime 1.14 + - [Simple Weather Service](SimpleWeatherService.md) : `00050000-78fc-48fe-8e23-433b3a1942d0` --- diff --git a/doc/buildAndProgram.md b/doc/buildAndProgram.md index 7909c59c..b588b649 100644 --- a/doc/buildAndProgram.md +++ b/doc/buildAndProgram.md @@ -42,13 +42,23 @@ CMake configures the project according to variables you specify the command line **NRF5_SDK_PATH**|path to the NRF52 SDK|`-DNRF5_SDK_PATH=/home/jf/nrf52/Pinetime/sdk`| **CMAKE_BUILD_TYPE (\*)**| Build type (Release or Debug). Release is applied by default if this variable is not specified.|`-DCMAKE_BUILD_TYPE=Debug` **BUILD_DFU (\*\*)**|Build DFU files while building (needs [adafruit-nrfutil](https://github.com/adafruit/Adafruit_nRF52_nrfutil)).|`-DBUILD_DFU=1` -**BUILD_RESOURCES (\*\*)**| Generate external resource while building (needs [lv_font_conv](https://github.com/lvgl/lv_font_conv) and [lv_img_conv](https://github.com/lvgl/lv_img_conv). |`-DBUILD_RESOURCES=1` -**TARGET_DEVICE**|Target device, used for hardware configuration. Allowed: `PINETIME, MOY-TFK5, MOY-TIN5, MOY-TON5, MOY-UNK`|`-DTARGET_DEVICE=PINETIME` (Default) +**BUILD_RESOURCES (\*\*)**| Generate external resource while building (needs [lv_font_conv](https://github.com/lvgl/lv_font_conv) and [python3-pil/pillow](https://pillow.readthedocs.io) module). |`-DBUILD_RESOURCES=1` +**TARGET_DEVICE**|Target device, used for hardware configuration. Allowed: `PINETIME, MOY_TFK5, MOY_TIN5, MOY_TON5, MOY_UNK`|`-DTARGET_DEVICE=PINETIME` (Default) #### (\*) Note about **CMAKE_BUILD_TYPE** By default, this variable is set to *Release*. It compiles the code with size and speed optimizations. We use this value for all the binaries we publish when we [release](https://github.com/InfiniTimeOrg/InfiniTime/releases) new versions of InfiniTime. -The *Debug* mode disables all optimizations, which makes the code easier to debug. However, the binary size will likely be too big to fit in the internal flash memory. If you want to build and debug a *Debug* binary, you'll need to disable some parts of the code. For example, the icons for the **Navigation** app use a lot of memory space. You can comment the content of `m_iconMap` in the [Navigation](https://github.com/InfiniTimeOrg/InfiniTime/blob/main/src/displayapp/screens/Navigation.h#L148) application to free some memory. +The *Debug* mode disables all optimizations, which makes the code easier to debug. However, the binary size will likely be too big to fit in the internal flash memory. If you want to build and debug a *Debug* binary, you can disable some parts of the code that are not needed for the test you want to achieve. You can also apply the *Debug* mode selectively on parts of the application by applying the `DEBUG_FLAGS` only for the part (CMake target) you want to debug. For example, let's say you want to debug code related to LittleFS, simply set the compilation options for the RELEASE configuration of the target to `DEBUG_FLAGS` (in `src/CMakeLists.txt`). This will force the compilation of that target in *Debug* mode while the rest of the project will be built in *Release* mode. Example: + +``` +target_compile_options(littlefs PRIVATE + ${COMMON_FLAGS} + $<$<CONFIG:DEBUG>: ${DEBUG_FLAGS}> + $<$<CONFIG:RELEASE>: ${DEBUG_FLAGS}> # Change from RELEASE_FLAGS to DEBUG_FLAGS + $<$<COMPILE_LANGUAGE:CXX>: ${CXX_FLAGS}> + $<$<COMPILE_LANGUAGE:ASM>: ${ASM_FLAGS}> + ) +``` #### (\*\*) Note about **BUILD_DFU** DFU files are the files you'll need to install your build of InfiniTime using OTA (over-the-air) mechanism. To generate the DFU file, the Python tool [adafruit-nrfutil](https://github.com/adafruit/Adafruit_nRF52_nrfutil) is needed on your system. Check that this tool is properly installed before enabling this option. @@ -56,7 +66,7 @@ DFU files are the files you'll need to install your build of InfiniTime using OT #### CMake command ``` -cmake -DARM_NONE_EABI_TOOLCHAIN_PATH=... -DNRF5_SDK_PATH=... +cmake -DARM_NONE_EABI_TOOLCHAIN_PATH=... -DNRF5_SDK_PATH=... -S .. ``` ### Build the project @@ -88,4 +98,4 @@ Binary files are generated into the folder `src`: - **pinetime-mcuboot-app-image** : MCUBoot image of the firmware - **pinetime-mcuboot-app-dfu** : DFU file of the firmware -The same files are generated for **pinetime-recovery** and **pinetime-recoveryloader** +The same files are generated for **pinetime-recovery** and **pinetime-recovery-loader** diff --git a/doc/buildWithDocker.md b/doc/buildWithDocker.md index c0d425e5..670590a6 100644 --- a/doc/buildWithDocker.md +++ b/doc/buildWithDocker.md @@ -11,6 +11,16 @@ Based on Ubuntu 22.04 with the following build dependencies: - adafruit-nrfutil - lv_font_conv +## Clone the repository + +Before building, local repository must be fully initialized. + +``` +git clone https://github.com/InfiniTimeOrg/InfiniTime.git +cd InfiniTime +git submodule update --init +``` + ## Run a container to build the project The `infinitime-build` image contains all the dependencies you need. diff --git a/doc/buildWithVScode.md b/doc/buildWithVScode.md index 9d0a5bdf..5f872482 100644 --- a/doc/buildWithVScode.md +++ b/doc/buildWithVScode.md @@ -32,7 +32,7 @@ The .devcontainer folder contains the configuration and scripts for using a Dock Using the [Remote-Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension is recommended. It will handle configuring the Docker virtual machine and setting everything up. -More documentation is available in the [readme in .devcontainer](../.devcontainer/README.md) +More documentation is available in the [readme in .devcontainer](usingDevcontainers.md) ### DevContainer on Ubuntu diff --git a/doc/code/Apps.md b/doc/code/Apps.md index cb7cd518..5c8a4acb 100644 --- a/doc/code/Apps.md +++ b/doc/code/Apps.md @@ -9,59 +9,144 @@ 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. +Every app in InfiniTime is its own class. 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 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. +Apps can be refreshed periodically and reacts to external events (touch or button). ## Interface -Every app class has to be inside the namespace `Pinetime::Applications::Screens` and inherit from `Screen`. -The constructor should have at least one parameter `DisplayApp* app`, which it needs for the constructor of its parent class Screen. -Other parameters should be references to controllers that the app needs. -A destructor is needed to clean up LVGL and restore any changes (for example re-enable sleeping). -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 reference. +Every app class is declared inside the namespace `Pinetime::Applications::Screens` +and inherits +from [`Pinetime::Applications::Screens::Screen`](https://github.com/InfiniTimeOrg/InfiniTime/blob/main/src/displayapp/screens/Screen.h). -### Continuous updating +Each app defines its own constructor. +The constructors mostly take references to InfiniTime `Controllers` (ex: Alarm, DateTime, BLE services, Settings,...) +the app needs for its operations. The constructor is responsible for initializing the UI of the app. -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. +The **destructor** cleans up LVGL and restores any changes (for example re-enable sleeping). -An example call could look like this: +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. -```cpp -taskRefresh = lv_task_create(RefreshTaskCallback, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, this); +Apps that need to be refreshed periodically create an `lv_task` (using `lv_task_create()`) +that will call the method `Refresh()` periodically. + +## App types + +There are basically 3 types of applications : **system** apps and **user** apps and **watch faces**. + +**System** applications are always built into InfiniTime, and InfiniTime cannot work properly without those apps. +Settings, notifications and the application launcher are examples of such system applications. + +**User** applications are optionally built into the firmware. They extend the functionalities of the system. + +**Watch faces** are very similar to the **user** apps, they are optional, but at least one must be built into the firmware. + +The distinction between **system** apps, **user** apps and watch faces allows for more flexibility and customization. +This allows to easily select which user applications and watch faces must be built into the firmware +without overflowing the system memory. + +## Apps and watch faces initialization + +Apps are created by `DisplayApp` in `DisplayApp::LoadScreen()`. +This method simply call the creates an instance of the class that corresponds to the app specified in parameters. + +The constructor of **system** apps is called directly. If the application is a **user** app, +the corresponding `AppDescription` is first retrieved from `userApps` +and then the function `create` is called to create an instance of the app. + +Watch faces are handled in a very similar way as the **user** apps : they are created by `DisplayApp` in the method `DisplayApp::LoadScreen()` when the application type is `Apps::Clock`. + +## User application selection at build time + +The list of user applications is generated at build time by the `consteval` function `CreateAppDescriptions()` +in `UserApps.h`. This method takes the list of applications that must be built into the firmware image. +This list of applications is defined as a list `Apps` enum values named `UserAppTypes` in `Apps.h`. +For each application listed in `UserAppTypes`, an entry of type `AppDescription` is added to the array `userApps`. +This entry is created by using the information provided by a template `AppTraits` +that is customized for every user application. + +Here is an example of an AppTraits customized for the Alarm application. +It defines the type of application, its icon and a function that returns an instance of the application. + +```c++ +template <> +struct AppTraits<Apps::Alarm> { + static constexpr Apps app = Apps::Alarm; + static constexpr const char* icon = Screens::Symbols::clock; + + static Screens::Screen* Create(AppControllers& controllers) { + return new Screens::Alarm(controllers.alarmController, + controllers.settingsController.GetClockType(), + *controllers.systemTask, + controllers.motorController); + }; +}; ``` -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. +This array `userApps` is used by `DisplayApp` to create the applications and the `AppLauncher` +to list all available applications. + +## Watch face selection at build time + +The list of available watch faces is also generated at build time by the `consteval` +function `CreateWatchFaceDescriptions()` in `UserApps.h` in the same way as the **user** apps. +Watch faces must declare a `WatchFaceTraits` so that the corresponding `WatchFaceDescription` can be generated. +Here is an example of `WatchFaceTraits`: +```c++ + template <> + struct WatchFaceTraits<WatchFace::Analog> { + static constexpr WatchFace watchFace = WatchFace::Analog; + static constexpr const char* name = "Analog face"; + + static Screens::Screen* Create(AppControllers& controllers) { + return new Screens::WatchFaceAnalog(controllers.dateTimeController, + controllers.batteryController, + controllers.bleController, + controllers.notificationManager, + controllers.settingsController); + }; + + static bool IsAvailable(Pinetime::Controllers::FS& /*filesystem*/) { + return true; + } + }; +``` ## Creating your own app -A minimal app could look like this: +A minimal user app could look like this: MyApp.h: ```cpp #pragma once +#include "displayapp/apps/Apps.h" #include "displayapp/screens/Screen.h" -#include <lvgl/lvgl.h> +#include "displayapp/Controllers.h" +#include "Symbols.h" namespace Pinetime { namespace Applications { namespace Screens { class MyApp : public Screen { public: - MyApp(DisplayApp* app); + MyApp(); ~MyApp() override; }; } + + template <> + struct AppTraits<Apps::MyApp> { + static constexpr Apps app = Apps::MyApp; + static constexpr const char* icon = Screens::Symbols::myApp; + static Screens::Screen* Create(AppControllers& controllers) { + return new Screens::MyApp(); + } + }; } } ``` @@ -70,11 +155,10 @@ MyApp.cpp: ```cpp #include "displayapp/screens/MyApp.h" -#include "displayapp/DisplayApp.h" using namespace Pinetime::Applications::Screens; -MyApp::MyApp(DisplayApp* app) : Screen(app) { +MyApp::MyApp() { 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); @@ -86,20 +170,42 @@ MyApp::~MyApp() { } ``` -Both of these files should be in [displayapp/screens/](/src/displayapp/screens/) -or [displayapp/screens/settings/](/src/displayapp/screens/settings/) if it's a setting app. +Both of these files should be in [displayapp/screens/](/src/displayapp/screens/). Now we have our very own app, but InfiniTime does not know about it yet. -The first step is to include your MyApp.cpp (or any new cpp files for that matter) +The first step is to include your `MyApp.cpp` (or any new cpp files for that matter) in the compilation by adding it to [CMakeLists.txt](/CMakeLists.txt). -The next step to making it launchable is to give your app an id. -To do this, add an entry in the enum class `Pinetime::Applications::Apps` ([displayapp/Apps.h](/src/displayapp/Apps.h)). -Name this entry after your app. Add `#include "displayapp/screens/MyApp.h"` to the file [displayapp/DisplayApp.cpp](/src/displayapp/DisplayApp.cpp). -Now, go to the function `DisplayApp::LoadScreen` and add another case to the switch statement. +The next step to making it launch-able is to give your app an id. +To do this, add an entry in the enum class `Pinetime::Applications::Apps` ([displayapp/apps/Apps.h](/src/displayapp/apps/Apps.h.in)). +Name this entry after your app. Add `#include "displayapp/screens/MyApp.h"` +to the file [displayapp/DisplayApp.cpp](/src/displayapp/DisplayApp.cpp). + +If your application is a **system** application, go to the function `DisplayApp::LoadScreen` +and add another case to the switch statement. 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 to add your app in the app launcher, add your app in [displayapp/screens/ApplicationList.h](/src/displayapp/screens/ApplicationList.h) to the array containing the applications and their corresponding symbol. If your app is a setting, do the same procedure in [displayapp/screens/settings/Settings.h](/src/displayapp/screens/settings/Settings.h). +If your application is a **user** application, you don't need to add anything in DisplayApp, +everything will be automatically generated for you. +The user application will also be automatically be added to the app launcher menu. + +Since the list of **user** application is generated by CMake, you need to add the variable `ENABLE_USERAPPS` to the command line of CMake. +This variable must be set with a string composed of an ordered list of the **user** applications that must be built into the firmware. +The items of the list are fields from the enumeration `Apps`. +Ex : build the firmware with 3 user application : Alarm, Timer and MyApp (the application will be listed in this specific order in the application menu). + +```cmake +$ cmake ... -DENABLE_USERAPPS="Apps::Alarm, Apps::Timer, Apps::MyApp" ... +``` + +Similarly, the list of watch faces is also generated by CMake, so you need to add the variable `ENABLE_WATCHFACES` to the command line of CMake. +It must be set with the comma separated list of watch faces that will be built into the firmware. + +Ex: build the firmware with 3 watch faces : Analog, PineTimeStyle and Infineat: + +```cmake +$ cmake ... -DENABLE_WATCHFACES="WatchFace::Analog,WatchFace::PineTimeStyle,WatchFace::Infineat" ... +``` You should now be able to [build](../buildAndProgram.md) the firmware and flash it to your PineTime. Yay! diff --git a/doc/gettingStarted/Applications.md b/doc/gettingStarted/Applications.md new file mode 100644 index 00000000..8ca2b252 --- /dev/null +++ b/doc/gettingStarted/Applications.md @@ -0,0 +1,99 @@ +# Applications + +InfiniTime has 13 apps on the `main` branch at the time of writing. + +## List of apps +- Stopwatch +- Alarm +- Timer +- Steps +- Heartrate +- Music +- InfiniPaint +- Paddle +- 2 +- InfiniDice +- Metronome +- Maps +- Weather + +### Stopwatch + +- Press the Start button (bottom right) to start or stop the timer. + - You can also press the side button while the timer is running to pause the timer. +- Press the Flag button (bottom left) to add a lap. +- The stopwatch will not yet continue counting time while the app is closed. + +### Alarm + +- Ajust the time with the time picker. +- Press the Info button in the top middle to see time remaning. +- Use the toggle in the bottom left to turn the alarm on/off. +- Use the button in the bottom right to change the alarm frequency. + - You can choose between once, daily, or Monday - Friday. + +### Timer + +- Ajust how long the timer should go for with the time picker. +- Press the Start button at the bottom to start/stop the timer. + +### Steps + +- The total count of steps for the current display will show in the middle of the screen. +- The Reset button in the bottom middle resets the Trip counter. (Total of all steps taken.) +- The progress circle shows the percentage of your daily goal completed. + +### Heartrate + +- Press Start to start measuring your heartrate. + - It may take a bit to get the first measurement. + +### Music + +- This app shows currently playing music. + - Please note that this app is not very useful without a device connected. +- Press the button in the center to play/pause, and the buttons on the left and right to go to the previous and next tracks, respectively. +- Swipe up to get to volume controls. + +### InfiniPaint + +- This app does not allow you to swipe from the top to exit, use the side button instead. +- Draw on the screen to add lines. +- Hold down in one spot to change paint colors. + +### Paddle + +- This app does not allow you to swipe from the top to exit, use the side button instead. +- Drag your finger to move the paddle. +- Goal: Don't let the ball go off the left side of the screen. + +### 2 + +- This app does not allow you to swipe from the top to exit, use the side button instead. +- Play a game of 2048. +- Swipe up, down, left, or right tomove the tiles. +- When two tiles with the same number run into each other, they will add together. +- Goal: Don't let the screen fill up with tiles, and get to the 2048 tile to win. + +### InfiniDice + +- Ajust the count to change the number of dice. +- Ajust the sides to change the number of sides. +- Press the button at the bottom to roll. +- The result will be on the right side of the screen. + +### Metronome + +- Ajust the BPM with the circular slider. + - A bug currently makes it always snap to 98 BPM. +- Use the button in the bottom left to start the metronome. + +### Maps + +- This app shows info from a navigation app. + - Please note that this app is not very useful without a device connected. + +### Weather + +- This app shows weather info. + - Please note that this app is not very useful without a device connected. diff --git a/doc/gettingStarted/AppsScreenshots/2048.png b/doc/gettingStarted/AppsScreenshots/2048.png Binary files differnew file mode 100644 index 00000000..472e4fce --- /dev/null +++ b/doc/gettingStarted/AppsScreenshots/2048.png diff --git a/doc/gettingStarted/AppsScreenshots/Dice.png b/doc/gettingStarted/AppsScreenshots/Dice.png Binary files differnew file mode 100644 index 00000000..f5421c83 --- /dev/null +++ b/doc/gettingStarted/AppsScreenshots/Dice.png diff --git a/doc/gettingStarted/AppsScreenshots/Heartrate.png b/doc/gettingStarted/AppsScreenshots/Heartrate.png Binary files differnew file mode 100644 index 00000000..ed0470dc --- /dev/null +++ b/doc/gettingStarted/AppsScreenshots/Heartrate.png diff --git a/doc/gettingStarted/AppsScreenshots/Maps.png b/doc/gettingStarted/AppsScreenshots/Maps.png Binary files differnew file mode 100644 index 00000000..84e3ebef --- /dev/null +++ b/doc/gettingStarted/AppsScreenshots/Maps.png diff --git a/doc/gettingStarted/AppsScreenshots/Metronome.png b/doc/gettingStarted/AppsScreenshots/Metronome.png Binary files differnew file mode 100644 index 00000000..989fbfda --- /dev/null +++ b/doc/gettingStarted/AppsScreenshots/Metronome.png diff --git a/doc/gettingStarted/AppsScreenshots/Music.png b/doc/gettingStarted/AppsScreenshots/Music.png Binary files differnew file mode 100644 index 00000000..063603e7 --- /dev/null +++ b/doc/gettingStarted/AppsScreenshots/Music.png diff --git a/doc/gettingStarted/AppsScreenshots/Paint.png b/doc/gettingStarted/AppsScreenshots/Paint.png Binary files differnew file mode 100644 index 00000000..147487f9 --- /dev/null +++ b/doc/gettingStarted/AppsScreenshots/Paint.png diff --git a/doc/gettingStarted/AppsScreenshots/Pong.png b/doc/gettingStarted/AppsScreenshots/Pong.png Binary files differnew file mode 100644 index 00000000..08f739ef --- /dev/null +++ b/doc/gettingStarted/AppsScreenshots/Pong.png diff --git a/doc/gettingStarted/AppsScreenshots/Weather.png b/doc/gettingStarted/AppsScreenshots/Weather.png Binary files differnew file mode 100644 index 00000000..89714aa4 --- /dev/null +++ b/doc/gettingStarted/AppsScreenshots/Weather.png diff --git a/doc/gettingStarted/AppsScreenshots/alarm.png b/doc/gettingStarted/AppsScreenshots/alarm.png Binary files differnew file mode 100644 index 00000000..5d840e80 --- /dev/null +++ b/doc/gettingStarted/AppsScreenshots/alarm.png diff --git a/doc/gettingStarted/AppsScreenshots/steps.png b/doc/gettingStarted/AppsScreenshots/steps.png Binary files differnew file mode 100644 index 00000000..1d7f5608 --- /dev/null +++ b/doc/gettingStarted/AppsScreenshots/steps.png diff --git a/doc/gettingStarted/AppsScreenshots/stopwatch.png b/doc/gettingStarted/AppsScreenshots/stopwatch.png Binary files differnew file mode 100644 index 00000000..19b34a5a --- /dev/null +++ b/doc/gettingStarted/AppsScreenshots/stopwatch.png diff --git a/doc/gettingStarted/AppsScreenshots/timer.png b/doc/gettingStarted/AppsScreenshots/timer.png Binary files differnew file mode 100644 index 00000000..a0d3babf --- /dev/null +++ b/doc/gettingStarted/AppsScreenshots/timer.png diff --git a/doc/gettingStarted/Watchfaces.md b/doc/gettingStarted/Watchfaces.md new file mode 100644 index 00000000..9edff0bb --- /dev/null +++ b/doc/gettingStarted/Watchfaces.md @@ -0,0 +1,31 @@ +# Watchfaces + +InfiniTime has 6 apps on the `main` branch at the time of writing. + +## List of apps +- Digital +- Analog +- PineTimeStyle +- Terminal +- Infinineat +- Casio G7710 + +### Digital + + +### Analog + + +### PineTimeStyle + + - You can long-press on the display to change colors, step style, and weather. + +### Terminal + + +### Infinineat + + - You can long-press on the display to change colors. + +### Casio G7710 + diff --git a/doc/gettingStarted/Watchfaces/Analog.png b/doc/gettingStarted/Watchfaces/Analog.png Binary files differnew file mode 100644 index 00000000..9e64e5aa --- /dev/null +++ b/doc/gettingStarted/Watchfaces/Analog.png diff --git a/doc/gettingStarted/Watchfaces/CasioG7710.png b/doc/gettingStarted/Watchfaces/CasioG7710.png Binary files differnew file mode 100644 index 00000000..b8a55cd5 --- /dev/null +++ b/doc/gettingStarted/Watchfaces/CasioG7710.png diff --git a/doc/gettingStarted/Watchfaces/Digital.png b/doc/gettingStarted/Watchfaces/Digital.png Binary files differnew file mode 100644 index 00000000..242c9d5b --- /dev/null +++ b/doc/gettingStarted/Watchfaces/Digital.png diff --git a/doc/gettingStarted/Watchfaces/Infinineat.png b/doc/gettingStarted/Watchfaces/Infinineat.png Binary files differnew file mode 100644 index 00000000..6b8cd614 --- /dev/null +++ b/doc/gettingStarted/Watchfaces/Infinineat.png diff --git a/doc/gettingStarted/Watchfaces/PineTimeStyle.png b/doc/gettingStarted/Watchfaces/PineTimeStyle.png Binary files differnew file mode 100644 index 00000000..46f0b42b --- /dev/null +++ b/doc/gettingStarted/Watchfaces/PineTimeStyle.png diff --git a/doc/gettingStarted/Watchfaces/Terminal.png b/doc/gettingStarted/Watchfaces/Terminal.png Binary files differnew file mode 100644 index 00000000..3f148c5f --- /dev/null +++ b/doc/gettingStarted/Watchfaces/Terminal.png diff --git a/doc/gettingStarted/gadgetbridge0.jpg b/doc/gettingStarted/gadgetbridge0.jpg Binary files differindex 7ea2e3cd..2a0a295e 100644 --- a/doc/gettingStarted/gadgetbridge0.jpg +++ b/doc/gettingStarted/gadgetbridge0.jpg diff --git a/doc/gettingStarted/gadgetbridge1.jpg b/doc/gettingStarted/gadgetbridge1.jpg Binary files differindex 470b0b3c..20fa7d5a 100644 --- a/doc/gettingStarted/gadgetbridge1.jpg +++ b/doc/gettingStarted/gadgetbridge1.jpg diff --git a/doc/gettingStarted/gadgetbridge2.jpg b/doc/gettingStarted/gadgetbridge2.jpg Binary files differindex 8f75b232..a03b071a 100644 --- a/doc/gettingStarted/gadgetbridge2.jpg +++ b/doc/gettingStarted/gadgetbridge2.jpg diff --git a/doc/gettingStarted/gadgetbridge3.jpg b/doc/gettingStarted/gadgetbridge3.jpg Binary files differindex cfb83f52..2e9bea34 100644 --- a/doc/gettingStarted/gadgetbridge3.jpg +++ b/doc/gettingStarted/gadgetbridge3.jpg diff --git a/doc/gettingStarted/gadgetbridge4.jpg b/doc/gettingStarted/gadgetbridge4.jpg Binary files differindex e41aff04..1b4210ca 100644 --- a/doc/gettingStarted/gadgetbridge4.jpg +++ b/doc/gettingStarted/gadgetbridge4.jpg diff --git a/doc/gettingStarted/gadgetbridge5.jpg b/doc/gettingStarted/gadgetbridge5.jpg Binary files differindex 1ef9f779..15efb4d4 100644 --- a/doc/gettingStarted/gadgetbridge5.jpg +++ b/doc/gettingStarted/gadgetbridge5.jpg diff --git a/doc/gettingStarted/gettingStarted-1.0.md b/doc/gettingStarted/gettingStarted-1.0.md index 5c607444..2c35f1c1 100644 --- a/doc/gettingStarted/gettingStarted-1.0.md +++ b/doc/gettingStarted/gettingStarted-1.0.md @@ -14,7 +14,7 @@ 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) - [Sync the time with NRFConnect](/doc/gettingStarted/time-nrfconnect.md) -- Sync the time with your browser https://hubmartin.github.io/WebBLEWatch/ +- [Sync the time with your browser](https://hubmartin.github.io/WebBLEWatch/) You can also set the time in the settings without a companion app. (version >1.7.0) @@ -46,7 +46,7 @@ On the bottom right, you can see how many steps you have taken today.  - 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 **down** to display the notification panel. Notifications 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 diff --git a/doc/gettingStarted/ota-gadgetbridge.md b/doc/gettingStarted/ota-gadgetbridge.md index fe26c03b..76f99145 100644 --- a/doc/gettingStarted/ota-gadgetbridge.md +++ b/doc/gettingStarted/ota-gadgetbridge.md @@ -1,29 +1,35 @@ # Connecting to Gadgetbridge -Launch Gadgetbridge and tap on the **"+"** button on the bottom right to add a new device: +Launch Gadgetbridge and tap on the menu button in the top left:  -Wait for the scan to complete, your PineTime should be detected: +Press the "Connect new device" button:  +Your PineTime should appear on the list. Tap on it. + Tap on it. Gadgdetbridge will pair and connect to your device:  # Updating with Gadgetbridge -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: +Now that Gadgetbridge is connected to your PineTime, press the three dots on the device card:  -Read the warning carefully and tap **Install**: +Now press the "File Installer" button:  -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. +Select the firmware you downloaded (`pinetime-mcuboot-app-dfu-x.x.x.zip`) from the [Releases tab](https://github.com/InfiniTimeOrg/InfiniTime/releases/latest):  + +Wait for the transfer to finish. There will be a progress bar on both the watch and the phone. Your PineTime should 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 scroll to the 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 2b5d5d92..95149975 100644 --- a/doc/gettingStarted/updating-software.md +++ b/doc/gettingStarted/updating-software.md @@ -6,7 +6,7 @@ If you just want to flash or upgrade InfiniTime on your PineTime, this page is f You can check the InfiniTime version by first swiping right on the watch face to open quick settings, tapping the cogwheel to open settings, swipe up until you find an entry named "About" and tap on it. - + 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) @@ -49,7 +49,7 @@ Since those resources are not part of the firmware, they need to be flashed and Resources are packaged into a single .zip file named `infinitime-resources-x.y.z.zip` (where `x`, `y` and `z` are the version numbers of InfiniTime). You can use the companion app of your choice to flash the resources. -**Note : at the time of writing this page, [Amazfish](https://github.com/piggz/harbour-amazfish) and [ITD](https://gitea.arsenm.dev/Arsen6331/itd) have already integrated this functionality. Other companion apps will hopefully implement it soon!* +**Note: at the time of writing this page, [Amazfish](https://github.com/piggz/harbour-amazfish) and [ITD](https://gitea.arsenm.dev/Arsen6331/itd) have already integrated this functionality. Other companion apps will hopefully implement it soon!* ## Amazfish Use the `Download file` functionality of Amazfish. diff --git a/doc/gettingStarted/validate.png b/doc/gettingStarted/validate.png Binary files differnew file mode 100644 index 00000000..a6f3286b --- /dev/null +++ b/doc/gettingStarted/validate.png diff --git a/doc/gettingStarted/version.png b/doc/gettingStarted/version.png Binary files differnew file mode 100644 index 00000000..89f505a3 --- /dev/null +++ b/doc/gettingStarted/version.png diff --git a/doc/logo/watchface_collage.png b/doc/logo/watchface_collage.png Binary files differnew file mode 100644 index 00000000..caeb7456 --- /dev/null +++ b/doc/logo/watchface_collage.png diff --git a/doc/usingDevcontainers.md b/doc/usingDevcontainers.md new file mode 100644 index 00000000..fc755ba1 --- /dev/null +++ b/doc/usingDevcontainers.md @@ -0,0 +1,55 @@ +# VS Code Dev Container + +This is a docker-based interactive development environment using VS Code and Docker Dev Containers removing the need to install any tools locally\* + +## Requirements + +- VS Code + - [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension +- Docker +- OpenOCD - For debugging + +## Using + +### Code editing, and building. + +1. Clone InfiniTime and update submodules +2. Launch VS Code +3. Open InfiniTime directory, +4. Allow VS Code to open folder with devcontainer. + +After this the environment will be built if you do not currently have a container setup, it will install all the necessary tools and extra VSCode extensions. + +In order to build InfiniTime we need to run the initial submodule init and CMake commands. + +#### Manually + +You can use the VS Code terminal to run the CMake commands as outlined in the [build instructions](https://github.com/InfiniTimeOrg/InfiniTime/blob/main/doc/buildAndProgram.md) + +#### Script + +The dev environment comes with some scripts to make this easier, They are located in /opt/. + +There are also VS Code tasks provided should you desire to use those. + +The task "update submodules" will update the git submodules + +### Build + +You can use the build.sh script located in /opt/ + +CMake is also configured and controls for the CMake plugin are available in VS Code + +### Debugging + +Docker on windows does not support passing USB devices to the underlying WSL2 subsystem, To get around this we use OpenOCD in server mode running on the host. + +`openocd -f <yourinterface> -f <nrf52.cfg target file>` + +This will launch OpenOCD in server mode and attach it to the MCU. + +The default launch.json file expects OpenOCD to be listening on port 3333, edit if needed + +## Current Issues + +Currently WSL2 Has some real performance issues with IO on a windows host. Accessing files on the virtualized filesystem is much faster. Using VS Codes "clone in container" feature of the Remote - Containers will get around this. After the container is built you will need to update the submodules and follow the build instructions like normal |
