From d82a1c52251a9924d71c6a2d0f6c749230f5d664 Mon Sep 17 00:00:00 2001 From: Stoian Minaiev Date: Fri, 14 May 2021 01:07:32 +0300 Subject: docker: add git system package to image --- docker/.gitpod.Dockerfile | 3 +++ docker/Dockerfile | 3 +++ 2 files changed, 6 insertions(+) diff --git a/docker/.gitpod.Dockerfile b/docker/.gitpod.Dockerfile index 2f7099a5..4fbc7be0 100644 --- a/docker/.gitpod.Dockerfile +++ b/docker/.gitpod.Dockerfile @@ -19,8 +19,11 @@ RUN apt-get update -qq \ libffi-dev \ libssl-dev \ python3-dev \ + git \ && rm -rf /var/cache/apt/* /var/lib/apt/lists/*; +# Git needed for PROJECT_GIT_COMMIT_HASH variable setting + # Needs to be installed as root RUN pip3 install adafruit-nrfutil RUN pip3 install -Iv cryptography==3.3 diff --git a/docker/Dockerfile b/docker/Dockerfile index a6caa24e..0a4f69f0 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -19,8 +19,11 @@ RUN apt-get update -qq \ libssl-dev \ python3-dev \ python \ + git \ && rm -rf /var/cache/apt/* /var/lib/apt/lists/*; +# Git needed for PROJECT_GIT_COMMIT_HASH variable setting + RUN pip3 install adafruit-nrfutil RUN pip3 install -Iv cryptography==3.3 -- cgit v1.2.3-70-g09d2 From e04c8ee95ea9b5fe444b7a21c0d6557e815571e6 Mon Sep 17 00:00:00 2001 From: Stoian Minaiev Date: Fri, 14 May 2021 01:08:37 +0300 Subject: git: store git short ref hash on build stage to Version.h --- CMakeLists.txt | 12 ++++++++++++ src/Version.h.in | 2 ++ 2 files changed, 14 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f7770136..6c529f39 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,10 +55,22 @@ if(BUILD_DFU) set(BUILD_DFU true) endif() +set(PROJECT_GIT_COMMIT_HASH "") + +execute_process(COMMAND git rev-parse --short HEAD + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + OUTPUT_VARIABLE PROJECT_GIT_COMMIT_HASH + RESULT_VARIABLE PROJECT_GIT_COMMIT_HASH_SUCCESS) + +string(STRIP ${PROJECT_GIT_COMMIT_HASH} PROJECT_GIT_COMMIT_HASH) + +message("PROJECT_GIT_COMMIT_HASH_SUCCESS? " ${PROJECT_GIT_COMMIT_HASH_SUCCESS}) + message("BUILD CONFIGURATION") message("-------------------") message(" * Version : " ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}) message(" * Toolchain : " ${ARM_NONE_EABI_TOOLCHAIN_PATH}) +message(" * GitRef(S) : " ${PROJECT_GIT_COMMIT_HASH}) message(" * NRF52 SDK : " ${NRF5_SDK_PATH}) set(PROGRAMMER "???") if(USE_JLINK) diff --git a/src/Version.h.in b/src/Version.h.in index 6ff5938e..8cd39c96 100644 --- a/src/Version.h.in +++ b/src/Version.h.in @@ -8,11 +8,13 @@ namespace Pinetime { static constexpr uint32_t Major() {return major;} static constexpr uint32_t Minor() {return minor;} static constexpr uint32_t Patch() {return patch;} + static constexpr const char* GitCommitHash() {return commitHash;} static constexpr const char* VersionString() {return versionString;} private: static constexpr uint32_t major = @PROJECT_VERSION_MAJOR@; static constexpr uint32_t minor = @PROJECT_VERSION_MINOR@; static constexpr uint32_t patch = @PROJECT_VERSION_PATCH@; + static constexpr const char* commitHash = "@PROJECT_GIT_COMMIT_HASH@"; static constexpr const char* versionString = "@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@"; }; } \ No newline at end of file -- cgit v1.2.3-70-g09d2 From a4de61e1f5c7842d25bac0cfb22e4a9f0bff671c Mon Sep 17 00:00:00 2001 From: Stoian Minaiev Date: Fri, 14 May 2021 01:09:40 +0300 Subject: git: show git short ref hash on SystemInfo(first screen) and FirmwareValidation screen alongside other information --- src/displayapp/screens/FirmwareValidation.cpp | 11 +++++++++++ src/displayapp/screens/FirmwareValidation.h | 3 +++ src/displayapp/screens/SystemInfo.cpp | 2 ++ 3 files changed, 16 insertions(+) diff --git a/src/displayapp/screens/FirmwareValidation.cpp b/src/displayapp/screens/FirmwareValidation.cpp index 873a22f5..ad37a3df 100644 --- a/src/displayapp/screens/FirmwareValidation.cpp +++ b/src/displayapp/screens/FirmwareValidation.cpp @@ -27,6 +27,17 @@ FirmwareValidation::FirmwareValidation(Pinetime::Applications::DisplayApp* app, sprintf(version, "%ld.%ld.%ld", Version::Major(), Version::Minor(), Version::Patch()); lv_label_set_text(labelVersionValue, version); + labelShortRefInfo = lv_label_create(lv_scr_act(), nullptr); + lv_obj_align(labelShortRefInfo, nullptr, LV_ALIGN_IN_TOP_LEFT, 0, 25); + lv_label_set_text(labelShortRefInfo, "ShortRef : "); + lv_label_set_align(labelShortRefInfo, LV_LABEL_ALIGN_LEFT); + + labelShortRefValue = lv_label_create(lv_scr_act(), nullptr); + lv_obj_align(labelShortRefValue, labelShortRefInfo, LV_ALIGN_OUT_RIGHT_MID, 0, 0); + lv_label_set_recolor(labelShortRefValue, true); + sprintf(shortref, "%s", Version::GitCommitHash()); + lv_label_set_text(labelShortRefValue, shortref); + labelIsValidated = lv_label_create(lv_scr_act(), nullptr); lv_obj_align(labelIsValidated, nullptr, LV_ALIGN_IN_TOP_LEFT, 0, 50); lv_label_set_recolor(labelIsValidated, true); diff --git a/src/displayapp/screens/FirmwareValidation.h b/src/displayapp/screens/FirmwareValidation.h index 67662fd9..303c2154 100644 --- a/src/displayapp/screens/FirmwareValidation.h +++ b/src/displayapp/screens/FirmwareValidation.h @@ -25,7 +25,10 @@ namespace Pinetime { lv_obj_t* labelVersionInfo; lv_obj_t* labelVersionValue; + lv_obj_t* labelShortRefInfo; + lv_obj_t* labelShortRefValue; char version[9]; + char shortref[9]; lv_obj_t* labelIsValidated; lv_obj_t* buttonValidate; lv_obj_t* labelButtonValidate; diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp index ab349d7b..e4ef6911 100644 --- a/src/displayapp/screens/SystemInfo.cpp +++ b/src/displayapp/screens/SystemInfo.cpp @@ -69,12 +69,14 @@ std::unique_ptr SystemInfo::CreateScreen1() { lv_label_set_text_fmt(label, "#FFFF00 InfiniTime#\n\n" "#444444 Version# %ld.%ld.%ld\n\n" + "#444444 Short Ref# %s\n\n" "#444444 Build date#\n" "%s\n" "%s\n", Version::Major(), Version::Minor(), Version::Patch(), + Version::GitCommitHash(), __DATE__, __TIME__); lv_label_set_align(label, LV_LABEL_ALIGN_CENTER); -- cgit v1.2.3-70-g09d2 From 2627ef760e7e42ad0f9a1d2fe6299588b8fb631a Mon Sep 17 00:00:00 2001 From: Florian Kraupa Date: Fri, 14 May 2021 15:11:15 +0200 Subject: better handling of long notification titles --- src/displayapp/screens/Notifications.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/displayapp/screens/Notifications.cpp b/src/displayapp/screens/Notifications.cpp index f0fd2f66..1f113750 100644 --- a/src/displayapp/screens/Notifications.cpp +++ b/src/displayapp/screens/Notifications.cpp @@ -176,7 +176,17 @@ Notifications::NotificationItem::NotificationItem(const char* title, lv_obj_set_style_local_text_color(alert_type, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x888888)); if (title == nullptr) title = "Notification"; + char* pchar; + pchar = strchr(title, '\n'); + while (pchar != nullptr) { + *pchar = ' '; + pchar = + pchar = strchr(pchar + 1, '\n'); + } lv_label_set_text(alert_type, title); + lv_label_set_long_mode(alert_type, LV_LABEL_LONG_SROLL_CIRC); + lv_label_set_anim_speed(alert_type, 3); + lv_obj_set_width(alert_type, 180); lv_obj_align(alert_type, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 16); ///////// -- cgit v1.2.3-70-g09d2 From 9342d62a44830113241f0fdbc2951db93e474e26 Mon Sep 17 00:00:00 2001 From: David Ventura Date: Sun, 16 May 2021 21:13:22 +0200 Subject: Emit event on power-present toggle (#320) * Emit event on power-present toggle * clang-format on changes * also update battery status on any event * update comments; remove double battery update * Fix formatting * Vibrate shortly on charging event * debounce charge event --- src/components/battery/BatteryController.cpp | 1 - src/main.cpp | 15 +++++++++++++++ src/systemtask/SystemTask.cpp | 22 +++++++++++++++++----- src/systemtask/SystemTask.h | 4 +++- 4 files changed, 35 insertions(+), 7 deletions(-) diff --git a/src/components/battery/BatteryController.cpp b/src/components/battery/BatteryController.cpp index b39efefb..bc146457 100644 --- a/src/components/battery/BatteryController.cpp +++ b/src/components/battery/BatteryController.cpp @@ -15,7 +15,6 @@ Battery::Battery() { void Battery::Init() { nrf_gpio_cfg_input(chargingPin, (nrf_gpio_pin_pull_t) GPIO_PIN_CNF_PULL_Pullup); - nrf_gpio_cfg_input(powerPresentPin, (nrf_gpio_pin_pull_t) GPIO_PIN_CNF_PULL_Pullup); } void Battery::Update() { diff --git a/src/main.cpp b/src/main.cpp index 04cef6b5..61194b95 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -101,11 +101,13 @@ Pinetime::Drivers::Bma421 motionSensor {twiMaster, motionSensorTwiAddress}; Pinetime::Drivers::Hrs3300 heartRateSensor {twiMaster, heartRateSensorTwiAddress}; TimerHandle_t debounceTimer; +TimerHandle_t debounceChargeTimer; Pinetime::Controllers::Battery batteryController; Pinetime::Controllers::Ble bleController; void ble_manager_set_ble_connection_callback(void (*connection)()); void ble_manager_set_ble_disconnection_callback(void (*disconnection)()); static constexpr uint8_t pinTouchIrq = 28; +static constexpr uint8_t pinPowerPresentIrq = 19; std::unique_ptr systemTask; Pinetime::Controllers::Settings settingsController {spiNorFlash}; @@ -119,6 +121,13 @@ void nrfx_gpiote_evt_handler(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t action } BaseType_t xHigherPriorityTaskWoken = pdFALSE; + + if (pin == pinPowerPresentIrq and action == NRF_GPIOTE_POLARITY_TOGGLE) { + xTimerStartFromISR(debounceChargeTimer, &xHigherPriorityTaskWoken); + portYIELD_FROM_ISR(xHigherPriorityTaskWoken); + return; + } + xTimerStartFromISR(debounceTimer, &xHigherPriorityTaskWoken); portYIELD_FROM_ISR(xHigherPriorityTaskWoken); } @@ -130,6 +139,11 @@ void vApplicationIdleHook(void) { } } +void DebounceTimerChargeCallback(TimerHandle_t xTimer) { + xTimerStop(xTimer, 0); + systemTask->PushMessage(Pinetime::System::SystemTask::Messages::OnChargingEvent); +} + void DebounceTimerCallback(TimerHandle_t xTimer) { xTimerStop(xTimer, 0); systemTask->OnButtonPushed(); @@ -248,6 +262,7 @@ int main(void) { nrf_drv_clock_init(); debounceTimer = xTimerCreate("debounceTimer", 200, pdFALSE, (void*) 0, DebounceTimerCallback); + debounceChargeTimer = xTimerCreate("debounceTimerCharge", 200, pdFALSE, (void*) 0, DebounceTimerChargeCallback); systemTask = std::make_unique(spi, lcd, diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index 6d695e2c..59660623 100644 --- a/src/systemtask/SystemTask.cpp +++ b/src/systemtask/SystemTask.cpp @@ -149,6 +149,16 @@ void SystemTask::Work() { nrfx_gpiote_in_init(pinTouchIrq, &pinConfig, nrfx_gpiote_evt_handler); + nrf_gpio_cfg_sense_input(pinPowerPresentIrq, (nrf_gpio_pin_pull_t) NRF_GPIO_PIN_NOPULL, (nrf_gpio_pin_sense_t) GPIO_PIN_CNF_SENSE_Low); + + pinConfig.sense = NRF_GPIOTE_POLARITY_TOGGLE; + pinConfig.pull = NRF_GPIO_PIN_NOPULL; + pinConfig.is_watcher = false; + pinConfig.hi_accuracy = false; + pinConfig.skip_gpio_setup = true; + + nrfx_gpiote_in_init(pinPowerPresentIrq, &pinConfig, nrfx_gpiote_evt_handler); + idleTimer = xTimerCreate("idleTimer", pdMS_TO_TICKS(settingsController.GetScreenTimeOut()), pdFALSE, this, IdleTimerCallback); xTimerStart(idleTimer, 0); @@ -161,12 +171,9 @@ void SystemTask::Work() { uint8_t msg; if (xQueueReceive(systemTasksMsgQueue, &msg, 100)) { - // call the battery controller or use the MSG in DisplayApp to get the battery status ??? - // it is necessary to validate which is the most efficient batteryController.Update(); - // displayApp->PushMessage(Pinetime::Applications::Display::Messages::UpdateBatteryLevel); - // analyze a more efficient way to do this refreshment - // this and the UpdateMotion(); can be called on a timer to be independent of the main process ??? + // the battery does not emit events when changing charge levels, so we piggyback + // on any system event to read and update the current values Messages message = static_cast(msg); switch (message) { @@ -274,6 +281,11 @@ void SystemTask::Work() { // Remember we'll have to reset the counter next time we're awake stepCounterMustBeReset = true; break; + case Messages::OnChargingEvent: + motorController.SetDuration(15); + // Battery level is updated on every message - there's no need to do anything + break; + default: break; } diff --git a/src/systemtask/SystemTask.h b/src/systemtask/SystemTask.h index e65fbea0..52e71b17 100644 --- a/src/systemtask/SystemTask.h +++ b/src/systemtask/SystemTask.h @@ -55,7 +55,8 @@ namespace Pinetime { OnDisplayTaskSleeping, EnableSleeping, DisableSleeping, - OnNewDay + OnNewDay, + OnChargingEvent }; SystemTask(Drivers::SpiMaster& spi, @@ -121,6 +122,7 @@ namespace Pinetime { static constexpr uint8_t pinLcdDataCommand = 18; static constexpr uint8_t pinButton = 13; static constexpr uint8_t pinTouchIrq = 28; + static constexpr uint8_t pinPowerPresentIrq = 19; static void Process(void* instance); void Work(); -- cgit v1.2.3-70-g09d2 From f6f28a95f6405c6d99670a5bc25ad0b22d2cdd05 Mon Sep 17 00:00:00 2001 From: Avamander Date: Mon, 17 May 2021 02:08:12 +0300 Subject: Used a macro for UUID generation, switched from C-style casts to reinterpret_cast, renamed callback --- src/components/ble/MusicService.cpp | 194 +++++++++++++----------------------- src/components/ble/MusicService.h | 54 ++++------ 2 files changed, 93 insertions(+), 155 deletions(-) diff --git a/src/components/ble/MusicService.cpp b/src/components/ble/MusicService.cpp index 36bf2709..30dd7274 100644 --- a/src/components/ble/MusicService.cpp +++ b/src/components/ble/MusicService.cpp @@ -18,117 +18,68 @@ #include "MusicService.h" #include "systemtask/SystemTask.h" -int MSCallback(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt, void* arg) { - auto musicService = static_cast(arg); - return musicService->OnCommand(conn_handle, attr_handle, ctxt); +int MusicCallback(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt, void* arg) { + return static_cast(arg)->OnCommand(conn_handle, attr_handle, ctxt); } Pinetime::Controllers::MusicService::MusicService(Pinetime::System::SystemTask& system) : m_system(system) { - msUuid.value[14] = msId[0]; - msUuid.value[15] = msId[1]; - - msEventCharUuid.value[12] = msEventCharId[0]; - msEventCharUuid.value[13] = msEventCharId[1]; - msEventCharUuid.value[14] = msId[0]; - msEventCharUuid.value[15] = msId[1]; - - msStatusCharUuid.value[12] = msStatusCharId[0]; - msStatusCharUuid.value[13] = msStatusCharId[1]; - msStatusCharUuid.value[14] = msId[0]; - msStatusCharUuid.value[15] = msId[1]; - - msTrackCharUuid.value[12] = msTrackCharId[0]; - msTrackCharUuid.value[13] = msTrackCharId[1]; - msTrackCharUuid.value[14] = msId[0]; - msTrackCharUuid.value[15] = msId[1]; - - msArtistCharUuid.value[12] = msArtistCharId[0]; - msArtistCharUuid.value[13] = msArtistCharId[1]; - msArtistCharUuid.value[14] = msId[0]; - msArtistCharUuid.value[15] = msId[1]; - - msAlbumCharUuid.value[12] = msAlbumCharId[0]; - msAlbumCharUuid.value[13] = msAlbumCharId[1]; - msAlbumCharUuid.value[14] = msId[0]; - msAlbumCharUuid.value[15] = msId[1]; - - msPositionCharUuid.value[12] = msPositionCharId[0]; - msPositionCharUuid.value[13] = msPositionCharId[1]; - msPositionCharUuid.value[14] = msId[0]; - msPositionCharUuid.value[15] = msId[1]; - - msTotalLengthCharUuid.value[12] = msTotalLengthCharId[0]; - msTotalLengthCharUuid.value[13] = msTotalLengthCharId[1]; - msTotalLengthCharUuid.value[14] = msId[0]; - msTotalLengthCharUuid.value[15] = msId[1]; - - msTrackNumberCharUuid.value[12] = msTrackNumberCharId[0]; - msTrackNumberCharUuid.value[13] = msTrackNumberCharId[1]; - msTrackNumberCharUuid.value[14] = msId[0]; - msTrackNumberCharUuid.value[15] = msId[1]; - - msTrackTotalCharUuid.value[12] = msTrackTotalCharId[0]; - msTrackTotalCharUuid.value[13] = msTrackTotalCharId[1]; - msTrackTotalCharUuid.value[14] = msId[0]; - msTrackTotalCharUuid.value[15] = msId[1]; - - msPlaybackSpeedCharUuid.value[12] = msPlaybackSpeedCharId[0]; - msPlaybackSpeedCharUuid.value[13] = msPlaybackSpeedCharId[1]; - msPlaybackSpeedCharUuid.value[14] = msId[0]; - msPlaybackSpeedCharUuid.value[15] = msId[1]; - - msRepeatCharUuid.value[12] = msRepeatCharId[0]; - msRepeatCharUuid.value[13] = msRepeatCharId[1]; - msRepeatCharUuid.value[14] = msId[0]; - msRepeatCharUuid.value[15] = msId[1]; - - msShuffleCharUuid.value[12] = msShuffleCharId[0]; - msShuffleCharUuid.value[13] = msShuffleCharId[1]; - msShuffleCharUuid.value[14] = msId[0]; - msShuffleCharUuid.value[15] = msId[1]; - - characteristicDefinition[0] = {.uuid = (ble_uuid_t*) (&msEventCharUuid), - .access_cb = MSCallback, + characteristicDefinition[0] = {.uuid = reinterpret_cast(&msEventCharUuid), + .access_cb = MusicCallback, .arg = this, .flags = BLE_GATT_CHR_F_NOTIFY, .val_handle = &eventHandle}; - characteristicDefinition[1] = { - .uuid = (ble_uuid_t*) (&msStatusCharUuid), .access_cb = MSCallback, .arg = this, .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ}; - characteristicDefinition[2] = { - .uuid = (ble_uuid_t*) (&msTrackCharUuid), .access_cb = MSCallback, .arg = this, .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ}; - characteristicDefinition[3] = { - .uuid = (ble_uuid_t*) (&msArtistCharUuid), .access_cb = MSCallback, .arg = this, .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ}; - characteristicDefinition[4] = { - .uuid = (ble_uuid_t*) (&msAlbumCharUuid), .access_cb = MSCallback, .arg = this, .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ}; - characteristicDefinition[5] = { - .uuid = (ble_uuid_t*) (&msPositionCharUuid), .access_cb = MSCallback, .arg = this, .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ}; - characteristicDefinition[6] = {.uuid = (ble_uuid_t*) (&msTotalLengthCharUuid), - .access_cb = MSCallback, + characteristicDefinition[1] = {.uuid = reinterpret_cast(&msStatusCharUuid), + .access_cb = MusicCallback, .arg = this, .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ}; - characteristicDefinition[7] = {.uuid = (ble_uuid_t*) (&msTotalLengthCharUuid), - .access_cb = MSCallback, + characteristicDefinition[2] = {.uuid = reinterpret_cast(&msTrackCharUuid), + .access_cb = MusicCallback, .arg = this, .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ}; - characteristicDefinition[8] = {.uuid = (ble_uuid_t*) (&msTrackNumberCharUuid), - .access_cb = MSCallback, + characteristicDefinition[3] = {.uuid = reinterpret_cast(&msArtistCharUuid), + .access_cb = MusicCallback, .arg = this, .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ}; - characteristicDefinition[9] = {.uuid = (ble_uuid_t*) (&msTrackTotalCharUuid), - .access_cb = MSCallback, + characteristicDefinition[4] = {.uuid = reinterpret_cast(&msAlbumCharUuid), + .access_cb = MusicCallback, .arg = this, .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ}; - characteristicDefinition[10] = {.uuid = (ble_uuid_t*) (&msPlaybackSpeedCharUuid), - .access_cb = MSCallback, + characteristicDefinition[5] = {.uuid = reinterpret_cast(&msPositionCharUuid), + .access_cb = MusicCallback, + .arg = this, + .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ}; + characteristicDefinition[6] = {.uuid = reinterpret_cast(&msTotalLengthCharUuid), + .access_cb = MusicCallback, + .arg = this, + .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ}; + characteristicDefinition[7] = {.uuid = reinterpret_cast(&msTotalLengthCharUuid), + .access_cb = MusicCallback, + .arg = this, + .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ}; + characteristicDefinition[8] = {.uuid = reinterpret_cast(&msTrackNumberCharUuid), + .access_cb = MusicCallback, + .arg = this, + .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ}; + characteristicDefinition[9] = {.uuid = reinterpret_cast(&msTrackTotalCharUuid), + .access_cb = MusicCallback, + .arg = this, + .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ}; + characteristicDefinition[10] = {.uuid = reinterpret_cast(&msPlaybackSpeedCharUuid), + .access_cb = MusicCallback, + .arg = this, + .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ}; + characteristicDefinition[11] = {.uuid = reinterpret_cast(&msRepeatCharUuid), + .access_cb = MusicCallback, + .arg = this, + .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ}; + characteristicDefinition[12] = {.uuid = reinterpret_cast(&msShuffleCharUuid), + .access_cb = MusicCallback, .arg = this, .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ}; - characteristicDefinition[11] = { - .uuid = (ble_uuid_t*) (&msRepeatCharUuid), .access_cb = MSCallback, .arg = this, .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ}; - characteristicDefinition[12] = { - .uuid = (ble_uuid_t*) (&msShuffleCharUuid), .access_cb = MSCallback, .arg = this, .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ}; characteristicDefinition[13] = {0}; - serviceDefinition[0] = {.type = BLE_GATT_SVC_TYPE_PRIMARY, .uuid = (ble_uuid_t*) &msUuid, .characteristics = characteristicDefinition}; + serviceDefinition[0] = { + .type = BLE_GATT_SVC_TYPE_PRIMARY, .uuid = reinterpret_cast(&msUuid), .characteristics = characteristicDefinition}; serviceDefinition[1] = {0}; artistName = "Waiting for"; @@ -143,7 +94,7 @@ Pinetime::Controllers::MusicService::MusicService(Pinetime::System::SystemTask& } void Pinetime::Controllers::MusicService::Init() { - int res = 0; + uint8_t res = 0; res = ble_gatts_count_cfg(serviceDefinition); ASSERT(res == 0); @@ -152,60 +103,67 @@ void Pinetime::Controllers::MusicService::Init() { } int Pinetime::Controllers::MusicService::OnCommand(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt) { - if (ctxt->op == BLE_GATT_ACCESS_OP_WRITE_CHR) { size_t notifSize = OS_MBUF_PKTLEN(ctxt->om); - uint8_t data[notifSize + 1]; + char data[notifSize + 1]; data[notifSize] = '\0'; os_mbuf_copydata(ctxt->om, 0, notifSize, data); - char* s = (char*) &data[0]; - if (ble_uuid_cmp(ctxt->chr->uuid, (ble_uuid_t*) &msArtistCharUuid) == 0) { + char* s = &data[0]; + if (ble_uuid_cmp(ctxt->chr->uuid, reinterpret_cast(&msArtistCharUuid)) == 0) { artistName = s; - } else if (ble_uuid_cmp(ctxt->chr->uuid, (ble_uuid_t*) &msTrackCharUuid) == 0) { + } else if (ble_uuid_cmp(ctxt->chr->uuid, reinterpret_cast(&msTrackCharUuid)) == 0) { trackName = s; - } else if (ble_uuid_cmp(ctxt->chr->uuid, (ble_uuid_t*) &msAlbumCharUuid) == 0) { + } else if (ble_uuid_cmp(ctxt->chr->uuid, reinterpret_cast(&msAlbumCharUuid)) == 0) { albumName = s; - } else if (ble_uuid_cmp(ctxt->chr->uuid, (ble_uuid_t*) &msStatusCharUuid) == 0) { + } else if (ble_uuid_cmp(ctxt->chr->uuid, reinterpret_cast(&msStatusCharUuid)) == 0) { playing = s[0]; - } else if (ble_uuid_cmp(ctxt->chr->uuid, (ble_uuid_t*) &msRepeatCharUuid) == 0) { + } else if (ble_uuid_cmp(ctxt->chr->uuid, reinterpret_cast(&msRepeatCharUuid)) == 0) { repeat = s[0]; - } else if (ble_uuid_cmp(ctxt->chr->uuid, (ble_uuid_t*) &msShuffleCharUuid) == 0) { + } else if (ble_uuid_cmp(ctxt->chr->uuid, reinterpret_cast(&msShuffleCharUuid)) == 0) { shuffle = s[0]; - } else if (ble_uuid_cmp(ctxt->chr->uuid, (ble_uuid_t*) &msPositionCharUuid) == 0) { + } else if (ble_uuid_cmp(ctxt->chr->uuid, reinterpret_cast(&msPositionCharUuid)) == 0) { trackProgress = (s[0] << 24) | (s[1] << 16) | (s[2] << 8) | s[3]; - } else if (ble_uuid_cmp(ctxt->chr->uuid, (ble_uuid_t*) &msTotalLengthCharUuid) == 0) { + } else if (ble_uuid_cmp(ctxt->chr->uuid, reinterpret_cast(&msTotalLengthCharUuid)) == 0) { trackLength = (s[0] << 24) | (s[1] << 16) | (s[2] << 8) | s[3]; - } else if (ble_uuid_cmp(ctxt->chr->uuid, (ble_uuid_t*) &msTrackNumberCharUuid) == 0) { + } else if (ble_uuid_cmp(ctxt->chr->uuid, reinterpret_cast(&msTrackNumberCharUuid)) == 0) { trackNumber = (s[0] << 24) | (s[1] << 16) | (s[2] << 8) | s[3]; - } else if (ble_uuid_cmp(ctxt->chr->uuid, (ble_uuid_t*) &msTrackTotalCharUuid) == 0) { + } else if (ble_uuid_cmp(ctxt->chr->uuid, reinterpret_cast(&msTrackTotalCharUuid)) == 0) { tracksTotal = (s[0] << 24) | (s[1] << 16) | (s[2] << 8) | s[3]; - } else if (ble_uuid_cmp(ctxt->chr->uuid, (ble_uuid_t*) &msPlaybackSpeedCharUuid) == 0) { + } else if (ble_uuid_cmp(ctxt->chr->uuid, reinterpret_cast(&msPlaybackSpeedCharUuid)) == 0) { playbackSpeed = static_cast(((s[0] << 24) | (s[1] << 16) | (s[2] << 8) | s[3])) / 100.0f; } } return 0; } -std::string Pinetime::Controllers::MusicService::getAlbum() { +std::string Pinetime::Controllers::MusicService::getAlbum() const { return albumName; } -std::string Pinetime::Controllers::MusicService::getArtist() { +std::string Pinetime::Controllers::MusicService::getArtist() const { return artistName; } -std::string Pinetime::Controllers::MusicService::getTrack() { +std::string Pinetime::Controllers::MusicService::getTrack() const { return trackName; } -bool Pinetime::Controllers::MusicService::isPlaying() { +bool Pinetime::Controllers::MusicService::isPlaying() const { return playing; } -float Pinetime::Controllers::MusicService::getPlaybackSpeed() { +float Pinetime::Controllers::MusicService::getPlaybackSpeed() const { return playbackSpeed; } +int Pinetime::Controllers::MusicService::getProgress() const { + return trackProgress; +} + +int Pinetime::Controllers::MusicService::getTrackLength() const { + return trackLength; +} + void Pinetime::Controllers::MusicService::event(char event) { auto* om = ble_hs_mbuf_from_flat(&event, 1); @@ -216,12 +174,4 @@ void Pinetime::Controllers::MusicService::event(char event) { } ble_gattc_notify_custom(connectionHandle, eventHandle, om); -} - -int Pinetime::Controllers::MusicService::getProgress() { - return trackProgress; -} - -int Pinetime::Controllers::MusicService::getTrackLength() { - return trackLength; -} +} \ No newline at end of file diff --git a/src/components/ble/MusicService.h b/src/components/ble/MusicService.h index 5f5343e4..4314db0f 100644 --- a/src/components/ble/MusicService.h +++ b/src/components/ble/MusicService.h @@ -29,6 +29,8 @@ // 00000000-78fc-48fe-8e23-433b3a1942d0 #define MUSIC_SERVICE_UUID_BASE \ { 0xd0, 0x42, 0x19, 0x3a, 0x3b, 0x43, 0x23, 0x8e, 0xfe, 0x48, 0xfc, 0x78, 0x00, 0x00, 0x00, 0x00 } +#define MUSIC_SERVICE_CHAR_UUID(x, y) \ + { 0xd0, 0x42, 0x19, 0x3a, 0x3b, 0x43, 0x23, 0x8e, 0xfe, 0x48, 0xfc, 0x78, x, y, 0x00, 0x00 } namespace Pinetime { namespace System { @@ -46,19 +48,19 @@ namespace Pinetime { void event(char event); - std::string getArtist(); + std::string getArtist() const; - std::string getTrack(); + std::string getTrack() const; - std::string getAlbum(); + std::string getAlbum() const; - int getProgress(); + int getProgress() const; - int getTrackLength(); + int getTrackLength() const; - float getPlaybackSpeed(); + float getPlaybackSpeed() const; - bool isPlaying(); + bool isPlaying() const; static const char EVENT_MUSIC_OPEN = 0xe0; static const char EVENT_MUSIC_PLAY = 0x00; @@ -71,34 +73,20 @@ namespace Pinetime { enum MusicStatus { NotPlaying = 0x00, Playing = 0x01 }; private: - static constexpr uint8_t msId[2] = {0x00, 0x00}; - static constexpr uint8_t msEventCharId[2] = {0x01, 0x00}; - static constexpr uint8_t msStatusCharId[2] = {0x02, 0x00}; - static constexpr uint8_t msArtistCharId[2] = {0x03, 0x00}; - static constexpr uint8_t msTrackCharId[2] = {0x04, 0x00}; - static constexpr uint8_t msAlbumCharId[2] = {0x05, 0x00}; - static constexpr uint8_t msPositionCharId[2] = {0x06, 0x00}; - static constexpr uint8_t msTotalLengthCharId[2] = {0x07, 0x00}; - static constexpr uint8_t msTrackNumberCharId[2] = {0x08, 0x00}; - static constexpr uint8_t msTrackTotalCharId[2] = {0x09, 0x00}; - static constexpr uint8_t msPlaybackSpeedCharId[2] = {0x0a, 0x00}; - static constexpr uint8_t msRepeatCharId[2] = {0x0b, 0x00}; - static constexpr uint8_t msShuffleCharId[2] = {0x0c, 0x00}; - ble_uuid128_t msUuid {.u = {.type = BLE_UUID_TYPE_128}, .value = MUSIC_SERVICE_UUID_BASE}; - ble_uuid128_t msEventCharUuid {.u = {.type = BLE_UUID_TYPE_128}, .value = MUSIC_SERVICE_UUID_BASE}; - ble_uuid128_t msStatusCharUuid {.u = {.type = BLE_UUID_TYPE_128}, .value = MUSIC_SERVICE_UUID_BASE}; - ble_uuid128_t msArtistCharUuid {.u = {.type = BLE_UUID_TYPE_128}, .value = MUSIC_SERVICE_UUID_BASE}; - ble_uuid128_t msTrackCharUuid {.u = {.type = BLE_UUID_TYPE_128}, .value = MUSIC_SERVICE_UUID_BASE}; - ble_uuid128_t msAlbumCharUuid {.u = {.type = BLE_UUID_TYPE_128}, .value = MUSIC_SERVICE_UUID_BASE}; - ble_uuid128_t msPositionCharUuid {.u = {.type = BLE_UUID_TYPE_128}, .value = MUSIC_SERVICE_UUID_BASE}; - ble_uuid128_t msTotalLengthCharUuid {.u = {.type = BLE_UUID_TYPE_128}, .value = MUSIC_SERVICE_UUID_BASE}; - ble_uuid128_t msTrackNumberCharUuid {.u = {.type = BLE_UUID_TYPE_128}, .value = MUSIC_SERVICE_UUID_BASE}; - ble_uuid128_t msTrackTotalCharUuid {.u = {.type = BLE_UUID_TYPE_128}, .value = MUSIC_SERVICE_UUID_BASE}; - ble_uuid128_t msPlaybackSpeedCharUuid {.u = {.type = BLE_UUID_TYPE_128}, .value = MUSIC_SERVICE_UUID_BASE}; - ble_uuid128_t msRepeatCharUuid {.u = {.type = BLE_UUID_TYPE_128}, .value = MUSIC_SERVICE_UUID_BASE}; - ble_uuid128_t msShuffleCharUuid {.u = {.type = BLE_UUID_TYPE_128}, .value = MUSIC_SERVICE_UUID_BASE}; + ble_uuid128_t msEventCharUuid {.u = {.type = BLE_UUID_TYPE_128}, .value = MUSIC_SERVICE_CHAR_UUID(0x01, 0x00)}; + ble_uuid128_t msStatusCharUuid {.u = {.type = BLE_UUID_TYPE_128}, .value = MUSIC_SERVICE_CHAR_UUID(0x02, 0x00)}; + ble_uuid128_t msArtistCharUuid {.u = {.type = BLE_UUID_TYPE_128}, .value = MUSIC_SERVICE_CHAR_UUID(0x03, 0x00)}; + ble_uuid128_t msTrackCharUuid {.u = {.type = BLE_UUID_TYPE_128}, .value = MUSIC_SERVICE_CHAR_UUID(0x04, 0x00)}; + ble_uuid128_t msAlbumCharUuid {.u = {.type = BLE_UUID_TYPE_128}, .value = MUSIC_SERVICE_CHAR_UUID(0x05, 0x00)}; + ble_uuid128_t msPositionCharUuid {.u = {.type = BLE_UUID_TYPE_128}, .value = MUSIC_SERVICE_CHAR_UUID(0x06, 0x00)}; + ble_uuid128_t msTotalLengthCharUuid {.u = {.type = BLE_UUID_TYPE_128}, .value = MUSIC_SERVICE_CHAR_UUID(0x07, 0x00)}; + ble_uuid128_t msTrackNumberCharUuid {.u = {.type = BLE_UUID_TYPE_128}, .value = MUSIC_SERVICE_CHAR_UUID(0x08, 0x00)}; + ble_uuid128_t msTrackTotalCharUuid {.u = {.type = BLE_UUID_TYPE_128}, .value = MUSIC_SERVICE_CHAR_UUID(0x09, 0x00)}; + ble_uuid128_t msPlaybackSpeedCharUuid {.u = {.type = BLE_UUID_TYPE_128}, .value = MUSIC_SERVICE_CHAR_UUID(0x0a, 0x00)}; + ble_uuid128_t msRepeatCharUuid {.u = {.type = BLE_UUID_TYPE_128}, .value = MUSIC_SERVICE_CHAR_UUID(0x0b, 0x00)}; + ble_uuid128_t msShuffleCharUuid {.u = {.type = BLE_UUID_TYPE_128}, .value = MUSIC_SERVICE_CHAR_UUID(0x0c, 0x00)}; struct ble_gatt_chr_def characteristicDefinition[14]; struct ble_gatt_svc_def serviceDefinition[2]; -- cgit v1.2.3-70-g09d2 From 8568b5f31b1b3f6b5232ba0ce6e3e6a7064fe787 Mon Sep 17 00:00:00 2001 From: Avamander Date: Mon, 17 May 2021 02:16:50 +0300 Subject: Updated license header year --- src/components/ble/MusicService.cpp | 2 +- src/components/ble/MusicService.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ble/MusicService.cpp b/src/components/ble/MusicService.cpp index 30dd7274..c420a576 100644 --- a/src/components/ble/MusicService.cpp +++ b/src/components/ble/MusicService.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 JF, Adam Pigg, Avamander +/* Copyright (C) 2020-2021 JF, Adam Pigg, Avamander This file is part of InfiniTime. diff --git a/src/components/ble/MusicService.h b/src/components/ble/MusicService.h index 4314db0f..0b5a7464 100644 --- a/src/components/ble/MusicService.h +++ b/src/components/ble/MusicService.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 JF, Adam Pigg, Avamander +/* Copyright (C) 2020-2021 JF, Adam Pigg, Avamander This file is part of InfiniTime. -- cgit v1.2.3-70-g09d2 From 9ab298c09e273479822d10aad9f7bfe1d287ce75 Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Mon, 17 May 2021 09:52:31 +0200 Subject: Fix wrong initialization of 'pinPowerPresent' pin that would prevent the touchpanel from working correctly when the device boots while connected to the charger. --- src/systemtask/SystemTask.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index 59660623..80f4d5db 100644 --- a/src/systemtask/SystemTask.cpp +++ b/src/systemtask/SystemTask.cpp @@ -149,16 +149,19 @@ void SystemTask::Work() { nrfx_gpiote_in_init(pinTouchIrq, &pinConfig, nrfx_gpiote_evt_handler); - nrf_gpio_cfg_sense_input(pinPowerPresentIrq, (nrf_gpio_pin_pull_t) NRF_GPIO_PIN_NOPULL, (nrf_gpio_pin_sense_t) GPIO_PIN_CNF_SENSE_Low); - pinConfig.sense = NRF_GPIOTE_POLARITY_TOGGLE; pinConfig.pull = NRF_GPIO_PIN_NOPULL; pinConfig.is_watcher = false; pinConfig.hi_accuracy = false; pinConfig.skip_gpio_setup = true; - nrfx_gpiote_in_init(pinPowerPresentIrq, &pinConfig, nrfx_gpiote_evt_handler); + if (nrf_gpio_pin_read(pinPowerPresentIrq)) { + nrf_gpio_cfg_sense_input(pinPowerPresentIrq, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_SENSE_LOW); + } else { + nrf_gpio_cfg_sense_input(pinPowerPresentIrq, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_SENSE_HIGH); + } + idleTimer = xTimerCreate("idleTimer", pdMS_TO_TICKS(settingsController.GetScreenTimeOut()), pdFALSE, this, IdleTimerCallback); xTimerStart(idleTimer, 0); -- cgit v1.2.3-70-g09d2 From 8c3b250dbfe17be61462adc8f84760ce9a648e55 Mon Sep 17 00:00:00 2001 From: Florian Date: Thu, 20 May 2021 20:34:21 +0200 Subject: removed an empty assignment that caused a compiler warning (#372) --- src/displayapp/screens/Notifications.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/displayapp/screens/Notifications.cpp b/src/displayapp/screens/Notifications.cpp index 1f113750..1a1729ea 100644 --- a/src/displayapp/screens/Notifications.cpp +++ b/src/displayapp/screens/Notifications.cpp @@ -180,7 +180,6 @@ Notifications::NotificationItem::NotificationItem(const char* title, pchar = strchr(title, '\n'); while (pchar != nullptr) { *pchar = ' '; - pchar = pchar = strchr(pchar + 1, '\n'); } lv_label_set_text(alert_type, title); -- cgit v1.2.3-70-g09d2 From 13e3463276114dff838fc8fe281754eecfbe9538 Mon Sep 17 00:00:00 2001 From: Florian Date: Thu, 20 May 2021 20:43:54 +0200 Subject: Timer App (#355) * built timer app * Style improvements * making sure buttons stay hidden when the app is reopened and reappear after the timer runs out * more sensible calculations of time deltas. eliminated that mysterious scaling factor * changing the timer icon --- src/CMakeLists.txt | 5 + src/components/motor/MotorController.cpp | 1 - src/components/timer/TimerController.cpp | 64 ++++++++++ src/components/timer/TimerController.h | 36 ++++++ src/displayapp/Apps.h | 1 + src/displayapp/DisplayApp.cpp | 18 ++- src/displayapp/DisplayApp.h | 5 +- src/displayapp/Messages.h | 1 + src/displayapp/fonts/README.md | 2 +- src/displayapp/fonts/jetbrains_mono_bold_20.c | 36 +++--- src/displayapp/screens/ApplicationList.cpp | 2 +- src/displayapp/screens/Symbols.h | 1 + src/displayapp/screens/Timer.cpp | 173 ++++++++++++++++++++++++++ src/displayapp/screens/Timer.h | 42 +++++++ src/systemtask/SystemTask.cpp | 17 ++- src/systemtask/SystemTask.h | 3 + 16 files changed, 385 insertions(+), 22 deletions(-) create mode 100644 src/components/timer/TimerController.cpp create mode 100644 src/components/timer/TimerController.h create mode 100644 src/displayapp/screens/Timer.cpp create mode 100644 src/displayapp/screens/Timer.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index acbfba18..7ccd4ce7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -407,6 +407,7 @@ list(APPEND SOURCE_FILES displayapp/screens/List.cpp displayapp/screens/BatteryInfo.cpp displayapp/screens/Steps.cpp + displayapp/screens/Timer.cpp ## Settings displayapp/screens/settings/QuickSettings.cpp @@ -459,6 +460,7 @@ list(APPEND SOURCE_FILES components/firmwarevalidator/FirmwareValidator.cpp components/motor/MotorController.cpp components/settings/Settings.cpp + components/timer/TimerController.cpp drivers/Cst816s.cpp FreeRTOS/port.c FreeRTOS/port_cmsis_systick.c @@ -520,6 +522,7 @@ list(APPEND RECOVERY_SOURCE_FILES components/ble/HeartRateService.cpp components/firmwarevalidator/FirmwareValidator.cpp components/settings/Settings.cpp + components/timer/TimerController.cpp drivers/Cst816s.cpp FreeRTOS/port.c FreeRTOS/port_cmsis_systick.c @@ -590,6 +593,7 @@ set(INCLUDE_FILES displayapp/screens/Notifications.h displayapp/screens/HeartRate.h displayapp/screens/Motion.h + displayapp/screens/Timer.h drivers/St7789.h drivers/SpiNorFlash.h drivers/SpiMaster.h @@ -619,6 +623,7 @@ set(INCLUDE_FILES components/ble/BleClient.h components/ble/HeartRateService.h components/settings/Settings.h + components/timer/TimerController.h drivers/Cst816s.h FreeRTOS/portmacro.h FreeRTOS/portmacro_cmsis.h diff --git a/src/components/motor/MotorController.cpp b/src/components/motor/MotorController.cpp index a834ab6b..3afa0ced 100644 --- a/src/components/motor/MotorController.cpp +++ b/src/components/motor/MotorController.cpp @@ -13,7 +13,6 @@ MotorController::MotorController(Controllers::Settings& settingsController) : se void MotorController::Init() { nrf_gpio_cfg_output(pinMotor); nrf_gpio_pin_set(pinMotor); - app_timer_init(); app_timer_create(&vibTimer, APP_TIMER_MODE_SINGLE_SHOT, vibrate); } diff --git a/src/components/timer/TimerController.cpp b/src/components/timer/TimerController.cpp new file mode 100644 index 00000000..3b25901c --- /dev/null +++ b/src/components/timer/TimerController.cpp @@ -0,0 +1,64 @@ +// +// Created by florian on 16.05.21. +// + +#include "TimerController.h" +#include "systemtask/SystemTask.h" +#include "app_timer.h" +#include "task.h" + +using namespace Pinetime::Controllers; + + +APP_TIMER_DEF(timerAppTimer); + + +TimerController::TimerController(System::SystemTask& systemTask) : systemTask{systemTask} { +} + + +void TimerController::Init() { + app_timer_create(&timerAppTimer, APP_TIMER_MODE_SINGLE_SHOT, timerEnd); + +} + +void TimerController::StartTimer(uint32_t duration) { + app_timer_stop(timerAppTimer); + auto currentTicks = xTaskGetTickCount(); + app_timer_start(timerAppTimer, APP_TIMER_TICKS(duration), this); + endTicks = currentTicks + APP_TIMER_TICKS(duration); + timerRunning = true; +} + +uint32_t TimerController::GetTimeRemaining() { + if (!timerRunning) { + return 0; + } + auto currentTicks = xTaskGetTickCount(); + + TickType_t deltaTicks = 0; + if (currentTicks > endTicks) { + deltaTicks = 0xffffffff - currentTicks; + deltaTicks += (endTicks + 1); + } else { + deltaTicks = endTicks - currentTicks; + } + + return (static_cast(deltaTicks) / static_cast(configTICK_RATE_HZ)) * 1000; +} + +void TimerController::timerEnd(void* p_context) { + + auto* controller = static_cast (p_context); + controller->timerRunning = false; + controller->systemTask.PushMessage(System::SystemTask::Messages::OnTimerDone); +} + +void TimerController::StopTimer() { + app_timer_stop(timerAppTimer); + timerRunning = false; +} + +bool TimerController::IsRunning() { + return timerRunning; +} \ No newline at end of file diff --git a/src/components/timer/TimerController.h b/src/components/timer/TimerController.h new file mode 100644 index 00000000..5a0b293e --- /dev/null +++ b/src/components/timer/TimerController.h @@ -0,0 +1,36 @@ +#pragma once + +#include +#include "app_timer.h" +#include "portmacro_cmsis.h" + +namespace Pinetime { + namespace System { + class SystemTask; + } + namespace Controllers { + + class TimerController { + public: + TimerController(Pinetime::System::SystemTask& systemTask); + + void Init(); + + void StartTimer(uint32_t duration); + + void StopTimer(); + + uint32_t GetTimeRemaining(); + + bool IsRunning(); + + private: + System::SystemTask& systemTask; + + static void timerEnd(void* p_context); + + TickType_t endTicks; + bool timerRunning = false; + }; + } +} \ No newline at end of file diff --git a/src/displayapp/Apps.h b/src/displayapp/Apps.h index 09a20181..2df517f8 100644 --- a/src/displayapp/Apps.h +++ b/src/displayapp/Apps.h @@ -11,6 +11,7 @@ namespace Pinetime { FirmwareValidation, NotificationsPreview, Notifications, + Timer, FlashLight, BatteryInfo, Music, diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index a6c4a3ec..419b9f6f 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include "components/battery/BatteryController.h" #include "components/ble/BleController.h" #include "components/datetime/DateTimeController.h" @@ -55,7 +56,8 @@ DisplayApp::DisplayApp(Drivers::St7789& lcd, Pinetime::Controllers::HeartRateController& heartRateController, Controllers::Settings& settingsController, Pinetime::Controllers::MotorController& motorController, - Pinetime::Controllers::MotionController& motionController) + Pinetime::Controllers::MotionController& motionController, + Pinetime::Controllers::TimerController& timerController) : lcd {lcd}, lvgl {lvgl}, touchPanel {touchPanel}, @@ -68,7 +70,8 @@ DisplayApp::DisplayApp(Drivers::St7789& lcd, heartRateController {heartRateController}, settingsController {settingsController}, motorController {motorController}, - motionController {motionController} { + motionController {motionController}, + timerController {timerController} { msgQueue = xQueueCreate(queueSize, itemSize); // Start clock when smartwatch boots LoadApp(Apps::Clock, DisplayApp::FullRefreshDirections::None); @@ -148,6 +151,14 @@ void DisplayApp::Refresh() { case Messages::NewNotification: LoadApp(Apps::NotificationsPreview, DisplayApp::FullRefreshDirections::Down); break; + case Messages::TimerDone: + if (currentApp == Apps::Timer) { + auto *timer = dynamic_cast(currentScreen.get()); + timer->setDone(); + } else { + LoadApp(Apps::Timer, DisplayApp::FullRefreshDirections::Down); + } + break; case Messages::TouchEvent: { if (state != States::Running) break; @@ -264,6 +275,9 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction) this, notificationManager, systemTask.nimble().alertService(), Screens::Notifications::Modes::Preview); ReturnApp(Apps::Clock, FullRefreshDirections::Up, TouchEvents::SwipeUp); break; + case Apps::Timer: + currentScreen = std::make_unique(this, timerController); + break; // Settings case Apps::QuickSettings: diff --git a/src/displayapp/DisplayApp.h b/src/displayapp/DisplayApp.h index ffe27cf1..0c7bd216 100644 --- a/src/displayapp/DisplayApp.h +++ b/src/displayapp/DisplayApp.h @@ -12,6 +12,7 @@ #include "components/firmwarevalidator/FirmwareValidator.h" #include "components/settings/Settings.h" #include "displayapp/screens/Screen.h" +#include "components/timer/TimerController.h" #include "Messages.h" namespace Pinetime { @@ -53,7 +54,8 @@ namespace Pinetime { Pinetime::Controllers::HeartRateController& heartRateController, Controllers::Settings& settingsController, Pinetime::Controllers::MotorController& motorController, - Pinetime::Controllers::MotionController& motionController); + Pinetime::Controllers::MotionController& motionController, + Pinetime::Controllers::TimerController& timerController); void Start(); void PushMessage(Display::Messages msg); @@ -76,6 +78,7 @@ namespace Pinetime { Pinetime::Controllers::Settings& settingsController; Pinetime::Controllers::MotorController& motorController; Pinetime::Controllers::MotionController& motionController; + Pinetime::Controllers::TimerController& timerController; Pinetime::Controllers::FirmwareValidator validator; Controllers::BrightnessController brightnessController; diff --git a/src/displayapp/Messages.h b/src/displayapp/Messages.h index 81871c54..ce65f846 100644 --- a/src/displayapp/Messages.h +++ b/src/displayapp/Messages.h @@ -11,6 +11,7 @@ namespace Pinetime { TouchEvent, ButtonPushed, NewNotification, + TimerDone, BleFirmwareUpdateStarted, UpdateTimeOut }; diff --git a/src/displayapp/fonts/README.md b/src/displayapp/fonts/README.md index f43e9c52..183ad7e4 100644 --- a/src/displayapp/fonts/README.md +++ b/src/displayapp/fonts/README.md @@ -12,7 +12,7 @@ * Do not enable font compression and horizontal subpixel hinting * Load the file `JetBrainsMono-Bold.tff` and specify the following range : `0x20-0x7f, 0x410-0x44f` * Add a 2nd font, load the file `FontAwesome5-Solid+Brands+Regular.woff` and specify the following - range : `0xf293, 0xf294, 0xf244, 0xf240, 0xf242, 0xf243, 0xf241, 0xf54b, 0xf21e, 0xf1e6, 0xf54b, 0xf017, 0xf129, 0xf03a, 0xf185, 0xf560, 0xf001, 0xf3fd, 0xf069, 0xf1fc, 0xf45d, 0xf59f, 0xf5a0, 0xf029, 0xf027, 0xf028, 0xf6a9, 0xf04b, 0xf04c, 0xf048, 0xf051, 0xf095, 0xf3dd, 0xf04d, 0xf2f2, 0xf024` + range : `0xf293, 0xf294, 0xf244, 0xf240, 0xf242, 0xf243, 0xf241, 0xf54b, 0xf21e, 0xf1e6, 0xf54b, 0xf017, 0xf129, 0xf03a, 0xf185, 0xf560, 0xf001, 0xf3fd, 0xf069, 0xf1fc, 0xf45d, 0xf59f, 0xf5a0, 0xf029, 0xf027, 0xf028, 0xf6a9, 0xf04b, 0xf04c, 0xf048, 0xf051, 0xf095, 0xf3dd, 0xf04d, 0xf2f2, 0xf024, 0xf252` * Click on Convert, and download the file `jetbrains_mono_bold_20.c` and copy it in `src/DisplayApp/Fonts` Add new symbols: diff --git a/src/displayapp/fonts/jetbrains_mono_bold_20.c b/src/displayapp/fonts/jetbrains_mono_bold_20.c index f4050db8..9174ff48 100644 --- a/src/displayapp/fonts/jetbrains_mono_bold_20.c +++ b/src/displayapp/fonts/jetbrains_mono_bold_20.c @@ -900,6 +900,13 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { 0x7, 0xe0, 0x0, 0x7, 0xf0, 0x0, 0x3, 0xff, 0xff, 0xff, 0xcf, 0xff, 0xff, 0xe0, + /* U+F252 "" */ + 0xff, 0xff, 0xff, 0xfd, 0x80, 0x33, 0x80, 0xe7, + 0xff, 0xc7, 0xff, 0xf, 0xfe, 0xf, 0xf8, 0xf, + 0xe0, 0xf, 0x80, 0x7f, 0xc0, 0xe3, 0x83, 0x83, + 0x86, 0x3, 0x1f, 0xff, 0x3f, 0xfe, 0x7f, 0xfd, + 0xff, 0xff, 0xff, 0xf8, + /* U+F293 "" */ 0x7, 0xe0, 0x3f, 0xe0, 0xfb, 0xe3, 0xf3, 0xe7, 0xe3, 0xdf, 0xd3, 0xf9, 0xb3, 0xf9, 0x4f, 0xf8, @@ -1184,17 +1191,18 @@ static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { {.bitmap_index = 3380, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1}, {.bitmap_index = 3418, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1}, {.bitmap_index = 3456, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1}, - {.bitmap_index = 3494, .adv_w = 280, .box_w = 15, .box_h = 20, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 3532, .adv_w = 200, .box_w = 11, .box_h = 21, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 3561, .adv_w = 280, .box_w = 16, .box_h = 19, .ofs_x = 1, .ofs_y = -2}, - {.bitmap_index = 3599, .adv_w = 400, .box_w = 25, .box_h = 21, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 3665, .adv_w = 360, .box_w = 23, .box_h = 17, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 3714, .adv_w = 320, .box_w = 20, .box_h = 20, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 3764, .adv_w = 400, .box_w = 25, .box_h = 19, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 3824, .adv_w = 320, .box_w = 20, .box_h = 21, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 3877, .adv_w = 360, .box_w = 22, .box_h = 20, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 3932, .adv_w = 360, .box_w = 22, .box_h = 19, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 3985, .adv_w = 320, .box_w = 20, .box_h = 15, .ofs_x = 0, .ofs_y = 0} + {.bitmap_index = 3494, .adv_w = 240, .box_w = 15, .box_h = 19, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 3530, .adv_w = 280, .box_w = 15, .box_h = 20, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 3568, .adv_w = 200, .box_w = 11, .box_h = 21, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 3597, .adv_w = 280, .box_w = 16, .box_h = 19, .ofs_x = 1, .ofs_y = -2}, + {.bitmap_index = 3635, .adv_w = 400, .box_w = 25, .box_h = 21, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 3701, .adv_w = 360, .box_w = 23, .box_h = 17, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3750, .adv_w = 320, .box_w = 20, .box_h = 20, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 3800, .adv_w = 400, .box_w = 25, .box_h = 19, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 3860, .adv_w = 320, .box_w = 20, .box_h = 21, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 3913, .adv_w = 360, .box_w = 22, .box_h = 20, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 3968, .adv_w = 360, .box_w = 22, .box_h = 19, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 4021, .adv_w = 320, .box_w = 20, .box_h = 15, .ofs_x = 0, .ofs_y = 0} }; /*--------------------- @@ -1205,8 +1213,8 @@ static const uint16_t unicode_list_2[] = { 0x0, 0x16, 0x23, 0x26, 0x27, 0x28, 0x39, 0x47, 0x4a, 0x4b, 0x4c, 0x50, 0x68, 0x94, 0x128, 0x184, 0x1e5, 0x1fb, 0x21d, 0x23f, 0x240, 0x241, 0x242, 0x243, - 0x292, 0x293, 0x2f1, 0x3dc, 0x3fc, 0x45c, 0x54a, 0x55f, - 0x59e, 0x59f, 0x6a8 + 0x251, 0x292, 0x293, 0x2f1, 0x3dc, 0x3fc, 0x45c, 0x54a, + 0x55f, 0x59e, 0x59f, 0x6a8 }; /*Collect the unicode lists and glyph_id offsets*/ @@ -1222,7 +1230,7 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = }, { .range_start = 61441, .range_length = 1705, .glyph_id_start = 160, - .unicode_list = unicode_list_2, .glyph_id_ofs_list = NULL, .list_length = 35, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY + .unicode_list = unicode_list_2, .glyph_id_ofs_list = NULL, .list_length = 36, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY } }; diff --git a/src/displayapp/screens/ApplicationList.cpp b/src/displayapp/screens/ApplicationList.cpp index 1eb36999..d599f5cc 100644 --- a/src/displayapp/screens/ApplicationList.cpp +++ b/src/displayapp/screens/ApplicationList.cpp @@ -51,7 +51,7 @@ std::unique_ptr ApplicationList::CreateScreen1() { {Symbols::map, Apps::Navigation}, {Symbols::shoe, Apps::Steps}, {Symbols::heartBeat, Apps::HeartRate}, - {"", Apps::None}, + {Symbols::hourGlass, Apps::Timer}, }}; return std::make_unique(0, 2, app, settingsController, batteryController, dateTimeController, applications); diff --git a/src/displayapp/screens/Symbols.h b/src/displayapp/screens/Symbols.h index e60825c1..8d55f693 100644 --- a/src/displayapp/screens/Symbols.h +++ b/src/displayapp/screens/Symbols.h @@ -38,6 +38,7 @@ namespace Pinetime { static constexpr const char* pause = "\xEF\x81\x8C"; static constexpr const char* stop = "\xEF\x81\x8D"; static constexpr const char* stopWatch = "\xEF\x8B\xB2"; + static constexpr const char* hourGlass = "\xEF\x89\x92"; static constexpr const char* lapsFlag = "\xEF\x80\xA4"; // lv_font_sys_48.c diff --git a/src/displayapp/screens/Timer.cpp b/src/displayapp/screens/Timer.cpp new file mode 100644 index 00000000..260a17ef --- /dev/null +++ b/src/displayapp/screens/Timer.cpp @@ -0,0 +1,173 @@ +#include "Timer.h" + +#include "Screen.h" +#include "Symbols.h" +#include "lvgl/lvgl.h" + + +using namespace Pinetime::Applications::Screens; + + +static void btnEventHandler(lv_obj_t* obj, lv_event_t event) { + Timer* screen = static_cast(obj->user_data); + screen->OnButtonEvent(obj, event); +} + +void Timer::createButtons() { + btnMinutesUp = lv_btn_create(lv_scr_act(), nullptr); + btnMinutesUp->user_data = this; + lv_obj_set_event_cb(btnMinutesUp, btnEventHandler); + lv_obj_align(btnMinutesUp, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 20, -80); + lv_obj_set_height(btnMinutesUp, 40); + lv_obj_set_width(btnMinutesUp, 60); + txtMUp = lv_label_create(btnMinutesUp, nullptr); + lv_label_set_text(txtMUp, "+"); + + btnMinutesDown = lv_btn_create(lv_scr_act(), nullptr); + btnMinutesDown->user_data = this; + lv_obj_set_event_cb(btnMinutesDown, btnEventHandler); + lv_obj_align(btnMinutesDown, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 20, +40); + lv_obj_set_height(btnMinutesDown, 40); + lv_obj_set_width(btnMinutesDown, 60); + txtMDown = lv_label_create(btnMinutesDown, nullptr); + lv_label_set_text(txtMDown, "-"); + + btnSecondsUp = lv_btn_create(lv_scr_act(), nullptr); + btnSecondsUp->user_data = this; + lv_obj_set_event_cb(btnSecondsUp, btnEventHandler); + lv_obj_align(btnSecondsUp, lv_scr_act(), LV_ALIGN_IN_RIGHT_MID, 10, -80); + lv_obj_set_height(btnSecondsUp, 40); + lv_obj_set_width(btnSecondsUp, 60); + txtSUp = lv_label_create(btnSecondsUp, nullptr); + lv_label_set_text(txtSUp, "+"); + + btnSecondsDown = lv_btn_create(lv_scr_act(), nullptr); + btnSecondsDown->user_data = this; + lv_obj_set_event_cb(btnSecondsDown, btnEventHandler); + lv_obj_align(btnSecondsDown, lv_scr_act(), LV_ALIGN_IN_RIGHT_MID, 10, +40); + lv_obj_set_height(btnSecondsDown, 40); + lv_obj_set_width(btnSecondsDown, 60); + txtSDown = lv_label_create(btnSecondsDown, nullptr); + lv_label_set_text(txtSDown, "-"); + +} + + +Timer::Timer(DisplayApp* app, Controllers::TimerController& timerController) + : Screen(app), + running{true}, + timerController{timerController} { + + time = lv_label_create(lv_scr_act(), nullptr); + lv_obj_set_style_local_text_font(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_76); + lv_obj_set_style_local_text_color(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GRAY); + + uint32_t seconds = timerController.GetTimeRemaining() / 1000; + lv_label_set_text_fmt(time, "%02d:%02d", seconds / 60, seconds % 60); + + lv_obj_align(time, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, -20); + + btnPlayPause = lv_btn_create(lv_scr_act(), nullptr); + btnPlayPause->user_data = this; + lv_obj_set_event_cb(btnPlayPause, btnEventHandler); + lv_obj_align(btnPlayPause, lv_scr_act(), LV_ALIGN_IN_BOTTOM_MID, 0, -10); + lv_obj_set_height(btnPlayPause, 40); + txtPlayPause = lv_label_create(btnPlayPause, nullptr); + if (timerController.IsRunning()) { + lv_label_set_text(txtPlayPause, Symbols::pause); + } else { + lv_label_set_text(txtPlayPause, Symbols::play); + createButtons(); + } + +} + +Timer::~Timer() { + lv_obj_clean(lv_scr_act()); + +} + +bool Timer::Refresh() { + if (timerController.IsRunning()) { + uint32_t seconds = timerController.GetTimeRemaining() / 1000; + lv_label_set_text_fmt(time, "%02d:%02d", seconds / 60, seconds % 60); + } + return running; +} + +void Timer::OnButtonEvent(lv_obj_t* obj, lv_event_t event) { + if (event == LV_EVENT_CLICKED) { + if (obj == btnPlayPause) { + if (timerController.IsRunning()) { + lv_label_set_text(txtPlayPause, Symbols::play); + uint32_t seconds = timerController.GetTimeRemaining() / 1000; + minutesToSet = seconds / 60; + secondsToSet = seconds % 60; + timerController.StopTimer(); + createButtons(); + + } else if (secondsToSet + minutesToSet > 0) { + lv_label_set_text(txtPlayPause, Symbols::pause); + timerController.StartTimer((secondsToSet + minutesToSet * 60) * 1000); + + lv_obj_del(btnSecondsDown); + btnSecondsDown = nullptr; + lv_obj_del(btnSecondsUp); + btnSecondsUp = nullptr; + lv_obj_del(btnMinutesDown); + btnMinutesDown = nullptr; + lv_obj_del(btnMinutesUp); + btnMinutesUp = nullptr; + + } + } else { + if (!timerController.IsRunning()) { + if (obj == btnMinutesUp) { + if (minutesToSet >= 59) { + minutesToSet = 0; + } else { + minutesToSet++; + } + lv_label_set_text_fmt(time, "%02d:%02d", minutesToSet, secondsToSet); + + } else if (obj == btnMinutesDown) { + if (minutesToSet == 0) { + minutesToSet = 59; + } else { + minutesToSet--; + } + lv_label_set_text_fmt(time, "%02d:%02d", minutesToSet, secondsToSet); + + } else if (obj == btnSecondsUp) { + if (secondsToSet >= 59) { + secondsToSet = 0; + } else { + secondsToSet++; + } + lv_label_set_text_fmt(time, "%02d:%02d", minutesToSet, secondsToSet); + + } else if (obj == btnSecondsDown) { + if (secondsToSet == 0) { + secondsToSet = 59; + } else { + secondsToSet--; + } + lv_label_set_text_fmt(time, "%02d:%02d", minutesToSet, secondsToSet); + + } + } + + } + + } + +} + + +void Timer::setDone() { + lv_label_set_text(time, "00:00"); + lv_label_set_text(txtPlayPause, Symbols::play); + secondsToSet = 0; + minutesToSet = 0; + createButtons(); +} \ No newline at end of file diff --git a/src/displayapp/screens/Timer.h b/src/displayapp/screens/Timer.h new file mode 100644 index 00000000..0d66f2d4 --- /dev/null +++ b/src/displayapp/screens/Timer.h @@ -0,0 +1,42 @@ +#pragma once + +#include "Screen.h" +#include "components/datetime/DateTimeController.h" +#include "systemtask/SystemTask.h" +#include "../LittleVgl.h" + +#include "components/timer/TimerController.h" + +namespace Pinetime::Applications::Screens { + + + class Timer : public Screen { + public: + + enum class Modes { + Normal, Done + }; + + Timer(DisplayApp* app, Controllers::TimerController& timerController); + + ~Timer() override; + + bool Refresh() override; + + void setDone(); + + void OnButtonEvent(lv_obj_t* obj, lv_event_t event); + + private: + + bool running; + uint8_t secondsToSet = 0; + uint8_t minutesToSet = 0; + Controllers::TimerController& timerController; + + void createButtons(); + + lv_obj_t* time, * msecTime, * btnPlayPause, * txtPlayPause, * btnMinutesUp, * btnMinutesDown, * btnSecondsUp, * btnSecondsDown, * txtMUp, + * txtMDown, * txtSUp, * txtSDown; + }; +} \ No newline at end of file diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index 80f4d5db..58377764 100644 --- a/src/systemtask/SystemTask.cpp +++ b/src/systemtask/SystemTask.cpp @@ -56,6 +56,7 @@ SystemTask::SystemTask(Drivers::SpiMaster& spi, heartRateController {*this}, bleController {bleController}, dateTimeController {*this}, + timerController {*this}, watchdog {}, watchdogView {watchdog}, motorController {motorController}, @@ -83,6 +84,8 @@ void SystemTask::Work() { NRF_LOG_INFO("Last reset reason : %s", Pinetime::Drivers::Watchdog::ResetReasonToString(watchdog.ResetReason())); APP_GPIOTE_INIT(2); + app_timer_init(); + spi.Init(); spiNorFlash.Init(); spiNorFlash.Wakeup(); @@ -96,6 +99,7 @@ void SystemTask::Work() { batteryController.Init(); motorController.Init(); motionSensor.SoftReset(); + timerController.Init(); // Reset the TWI device because the motion sensor chip most probably crashed it... twiMaster.Sleep(); @@ -116,7 +120,8 @@ void SystemTask::Work() { heartRateController, settingsController, motorController, - motionController); + motionController, + timerController); displayApp->Start(); displayApp->PushMessage(Pinetime::Applications::Display::Messages::UpdateBatteryLevel); @@ -233,11 +238,19 @@ void SystemTask::Work() { displayApp->PushMessage(Pinetime::Applications::Display::Messages::UpdateDateTime); break; case Messages::OnNewNotification: - if (isSleeping && !isWakingUp) + if (isSleeping && !isWakingUp) { GoToRunning(); + } motorController.SetDuration(35); displayApp->PushMessage(Pinetime::Applications::Display::Messages::NewNotification); break; + case Messages::OnTimerDone: + if (isSleeping && !isWakingUp) { + GoToRunning(); + } + motorController.SetDuration(35); + displayApp->PushMessage(Pinetime::Applications::Display::Messages::TimerDone); + break; case Messages::BleConnected: ReloadIdleTimer(); isBleDiscoveryTimerRunning = true; diff --git a/src/systemtask/SystemTask.h b/src/systemtask/SystemTask.h index 52e71b17..ea41a69d 100644 --- a/src/systemtask/SystemTask.h +++ b/src/systemtask/SystemTask.h @@ -16,6 +16,7 @@ #include "components/ble/NimbleController.h" #include "components/ble/NotificationManager.h" #include "components/motor/MotorController.h" +#include "components/timer/TimerController.h" #ifdef PINETIME_IS_RECOVERY #include "displayapp/DisplayAppRecovery.h" #include "displayapp/DummyLittleVgl.h" @@ -45,6 +46,7 @@ namespace Pinetime { TouchWakeUp, OnNewTime, OnNewNotification, + OnTimerDone, OnNewCall, BleConnected, UpdateTimeOut, @@ -100,6 +102,7 @@ namespace Pinetime { Pinetime::Controllers::Ble& bleController; Pinetime::Controllers::DateTime dateTimeController; + Pinetime::Controllers::TimerController timerController; QueueHandle_t systemTasksMsgQueue; std::atomic isSleeping {false}; std::atomic isGoingToSleep {false}; -- cgit v1.2.3-70-g09d2 From 7c9513be8a3bf36fda5706cb0fb1bd6232d42ffd Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Fri, 21 May 2021 11:37:32 +0200 Subject: Set version to 1.1.0. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c529f39..1a488eaa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10) -project(pinetime VERSION 1.0.0 LANGUAGES C CXX ASM) +project(pinetime VERSION 1.1.0 LANGUAGES C CXX ASM) set(CMAKE_C_STANDARD 99) set(CMAKE_CXX_STANDARD 14) -- cgit v1.2.3-70-g09d2 From f88c0f41fac506cc55e026cc67d1d5bce4669d31 Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Fri, 21 May 2021 11:56:50 +0200 Subject: Fix recovery DisplayApp. --- src/displayapp/DisplayAppRecovery.cpp | 5 +++-- src/displayapp/DisplayAppRecovery.h | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/displayapp/DisplayAppRecovery.cpp b/src/displayapp/DisplayAppRecovery.cpp index a132a47c..856eafd8 100644 --- a/src/displayapp/DisplayAppRecovery.cpp +++ b/src/displayapp/DisplayAppRecovery.cpp @@ -17,9 +17,10 @@ DisplayApp::DisplayApp(Drivers::St7789& lcd, System::SystemTask& systemTask, Pinetime::Controllers::NotificationManager& notificationManager, Pinetime::Controllers::HeartRateController& heartRateController, - Pinetime::Controllers::Settings& settingsController, + Controllers::Settings& settingsController, Pinetime::Controllers::MotorController& motorController, - Pinetime::Controllers::MotionController& motionController) + Pinetime::Controllers::MotionController& motionController, + Pinetime::Controllers::TimerController& timerController) : lcd {lcd}, bleController {bleController} { msgQueue = xQueueCreate(queueSize, itemSize); } diff --git a/src/displayapp/DisplayAppRecovery.h b/src/displayapp/DisplayAppRecovery.h index 30b8e0a1..2c5a36fb 100644 --- a/src/displayapp/DisplayAppRecovery.h +++ b/src/displayapp/DisplayAppRecovery.h @@ -23,6 +23,7 @@ #include "Apps.h" #include "Messages.h" #include "DummyLittleVgl.h" +#include "components/timer/TimerController.h" namespace Pinetime { namespace System { @@ -41,9 +42,10 @@ namespace Pinetime { System::SystemTask& systemTask, Pinetime::Controllers::NotificationManager& notificationManager, Pinetime::Controllers::HeartRateController& heartRateController, - Pinetime::Controllers::Settings& settingsController, + Controllers::Settings& settingsController, Pinetime::Controllers::MotorController& motorController, - Pinetime::Controllers::MotionController& motionController); + Pinetime::Controllers::MotionController& motionController, + Pinetime::Controllers::TimerController& timerController); void Start(); void PushMessage(Pinetime::Applications::Display::Messages msg); -- cgit v1.2.3-70-g09d2 From b39310508292b6d5f0d235872fad6b0bf31efb75 Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Wed, 26 May 2021 15:15:10 +0300 Subject: improve ui and optimize code --- src/displayapp/screens/StopWatch.cpp | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/src/displayapp/screens/StopWatch.cpp b/src/displayapp/screens/StopWatch.cpp index d7cd20c3..76c4bfa0 100644 --- a/src/displayapp/screens/StopWatch.cpp +++ b/src/displayapp/screens/StopWatch.cpp @@ -61,22 +61,32 @@ StopWatch::StopWatch(DisplayApp* app) lv_obj_set_style_local_text_font(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_76); lv_obj_set_style_local_text_color(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GRAY); lv_label_set_text(time, "00:00"); - lv_obj_align(time, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, -45); + lv_obj_align(time, lv_scr_act(), LV_ALIGN_CENTER, 0, -45); msecTime = lv_label_create(lv_scr_act(), nullptr); // lv_obj_set_style_local_text_font(msecTime, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_bold_20); lv_obj_set_style_local_text_color(msecTime, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GRAY); lv_label_set_text(msecTime, "00"); - lv_obj_align(msecTime, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 108, 3); + lv_obj_align(msecTime, lv_scr_act(), LV_ALIGN_CENTER, 0, 3); btnPlayPause = lv_btn_create(lv_scr_act(), nullptr); btnPlayPause->user_data = this; lv_obj_set_event_cb(btnPlayPause, play_pause_event_handler); - lv_obj_align(btnPlayPause, lv_scr_act(), LV_ALIGN_IN_BOTTOM_MID, 0, -10); - lv_obj_set_height(btnPlayPause, 40); + lv_obj_set_height(btnPlayPause, 50); + lv_obj_set_width(btnPlayPause, 115); + lv_obj_align(btnPlayPause, lv_scr_act(), LV_ALIGN_IN_BOTTOM_RIGHT, 0, 0); txtPlayPause = lv_label_create(btnPlayPause, nullptr); lv_label_set_text(txtPlayPause, Symbols::play); + btnStopLap = lv_btn_create(lv_scr_act(), nullptr); + btnStopLap->user_data = this; + lv_obj_set_event_cb(btnStopLap, stop_lap_event_handler); + lv_obj_set_height(btnStopLap, 50); + lv_obj_set_width(btnStopLap, 115); + lv_obj_align(btnStopLap, lv_scr_act(), LV_ALIGN_IN_BOTTOM_LEFT, 0, 0); + txtStopLap = lv_label_create(btnStopLap, nullptr); + lv_obj_set_hidden(btnStopLap, true); + lapOneText = lv_label_create(lv_scr_act(), nullptr); // lv_obj_set_style_local_text_font(lapOneText, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_bold_20); lv_obj_set_style_local_text_color(lapOneText, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_YELLOW); @@ -88,9 +98,6 @@ StopWatch::StopWatch(DisplayApp* app) lv_obj_set_style_local_text_color(lapTwoText, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_YELLOW); lv_obj_align(lapTwoText, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 50, 55); lv_label_set_text(lapTwoText, ""); - - // We don't want this button in the init state - btnStopLap = nullptr; } StopWatch::~StopWatch() { @@ -115,10 +122,6 @@ bool StopWatch::Refresh() { // Init state when an user first opens the app // and when a stop/reset button is pressed case States::Init: { - if (btnStopLap != nullptr) { - lv_obj_del(btnStopLap); - btnStopLap = nullptr; - } // The initial default value lv_label_set_text(time, "00:00"); lv_label_set_text(msecTime, "00"); @@ -129,16 +132,12 @@ bool StopWatch::Refresh() { lapNr = 0; if (currentEvent == Events::Play) { - btnStopLap = lv_btn_create(lv_scr_act(), nullptr); - btnStopLap->user_data = this; - lv_obj_set_event_cb(btnStopLap, stop_lap_event_handler); - lv_obj_align(btnStopLap, lv_scr_act(), LV_ALIGN_IN_TOP_MID, 0, 0); - lv_obj_set_height(btnStopLap, 40); - txtStopLap = lv_label_create(btnStopLap, nullptr); - lv_label_set_text(txtStopLap, Symbols::lapsFlag); + lv_obj_set_hidden(btnStopLap, false); startTime = xTaskGetTickCount(); currentState = States::Running; + } else { + lv_obj_set_hidden(btnStopLap, true); } break; } -- cgit v1.2.3-70-g09d2 From c6969268fc162c41dbb37f7a2f061858563ba3c1 Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Wed, 26 May 2021 16:13:40 +0300 Subject: Keep button visible, but disabled --- src/displayapp/screens/StopWatch.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/displayapp/screens/StopWatch.cpp b/src/displayapp/screens/StopWatch.cpp index 76c4bfa0..7c128d1b 100644 --- a/src/displayapp/screens/StopWatch.cpp +++ b/src/displayapp/screens/StopWatch.cpp @@ -84,8 +84,12 @@ StopWatch::StopWatch(DisplayApp* app) lv_obj_set_height(btnStopLap, 50); lv_obj_set_width(btnStopLap, 115); lv_obj_align(btnStopLap, lv_scr_act(), LV_ALIGN_IN_BOTTOM_LEFT, 0, 0); + lv_obj_set_style_local_bg_color(btnStopLap, LV_BTN_PART_MAIN, LV_STATE_DISABLED, lv_color_hex(0x080808)); txtStopLap = lv_label_create(btnStopLap, nullptr); - lv_obj_set_hidden(btnStopLap, true); + lv_obj_set_style_local_text_color(txtStopLap, LV_BTN_PART_MAIN, LV_STATE_DISABLED, lv_color_hex(0x888888)); + lv_label_set_text(txtStopLap, Symbols::stop); + lv_obj_set_state(btnStopLap, LV_STATE_DISABLED); + lv_obj_set_state(txtStopLap, LV_STATE_DISABLED); lapOneText = lv_label_create(lv_scr_act(), nullptr); // lv_obj_set_style_local_text_font(lapOneText, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_bold_20); @@ -132,12 +136,14 @@ bool StopWatch::Refresh() { lapNr = 0; if (currentEvent == Events::Play) { - lv_obj_set_hidden(btnStopLap, false); + lv_obj_set_state(btnStopLap, LV_STATE_DEFAULT); + lv_obj_set_state(txtStopLap, LV_STATE_DEFAULT); startTime = xTaskGetTickCount(); currentState = States::Running; } else { - lv_obj_set_hidden(btnStopLap, true); + lv_obj_set_state(btnStopLap, LV_STATE_DISABLED); + lv_obj_set_state(txtStopLap, LV_STATE_DISABLED); } break; } -- cgit v1.2.3-70-g09d2 From 287399f9932eb5562917c3fc4986cc65bec7fed2 Mon Sep 17 00:00:00 2001 From: JF002 Date: Tue, 1 Jun 2021 21:01:32 +0200 Subject: Navigation app: reduce memory usage (#362) * Navigation app: - Renaming and reformatting according to coding conventions - declare iconMap as constexpr and use char* instead of std::string This reduces the flash usage from 424644B to 419344B (-5300B)! --- src/displayapp/screens/Navigation.cpp | 137 ++++++++++++++++++++++++++++------ src/displayapp/screens/Navigation.h | 101 +------------------------ 2 files changed, 118 insertions(+), 120 deletions(-) diff --git a/src/displayapp/screens/Navigation.cpp b/src/displayapp/screens/Navigation.cpp index b5ce8b83..79b04e21 100644 --- a/src/displayapp/screens/Navigation.cpp +++ b/src/displayapp/screens/Navigation.cpp @@ -24,6 +24,106 @@ using namespace Pinetime::Applications::Screens; LV_FONT_DECLARE(lv_font_navi_80) +namespace { + constexpr std::array, 86> m_iconMap = {{ + {"arrive-left", "\xEE\xA4\x81"}, + {"arrive-right", "\xEE\xA4\x82"}, + {"arrive-straight", "\xEE\xA4\x80"}, + {"arrive", "\xEE\xA4\x80"}, + {"close", "\xEE\xA4\x83"}, + {"continue-left", "\xEE\xA4\x85"}, + {"continue-right", "\xEE\xA4\x86"}, + {"continue-slight-left", "\xEE\xA4\x87"}, + {"continue-slight-right", "\xEE\xA4\x88"}, + {"continue-straight", "\xEE\xA4\x84"}, + {"continue-uturn", "\xEE\xA4\x89"}, + {"continue", "\xEE\xA4\x84"}, + {"depart-left", "\xEE\xA4\x8B"}, + {"depart-right", "\xEE\xA4\x8C"}, + {"depart-straight", "\xEE\xA4\x8A"}, + {"end-of-road-left", "\xEE\xA4\x8D"}, + {"end-of-road-right", "\xEE\xA4\x8E"}, + {"ferry", "\xEE\xA4\x8F"}, + {"flag", "\xEE\xA4\x90"}, + {"fork-left", "\xEE\xA4\x92"}, + {"fork-right", "\xEE\xA4\x93"}, + {"fork-slight-left", "\xEE\xA4\x94"}, + {"fork-slight-right", "\xEE\xA4\x95"}, + {"fork-straight", "\xEE\xA4\x96"}, + {"invalid", "\xEE\xA4\x84"}, + {"invalid-left", "\xEE\xA4\x85"}, + {"invalid-right", "\xEE\xA4\x86"}, + {"invalid-slight-left", "\xEE\xA4\x87"}, + {"invalid-slight-right", "\xEE\xA4\x88"}, + {"invalid-straight", "\xEE\xA4\x84"}, + {"invalid-uturn", "\xEE\xA4\x89"}, + {"merge-left", "\xEE\xA4\x97"}, + {"merge-right", "\xEE\xA4\x98"}, + {"merge-slight-left", "\xEE\xA4\x99"}, + {"merge-slight-right", "\xEE\xA4\x9A"}, + {"merge-straight", "\xEE\xA4\x84"}, + {"new-name-left", "\xEE\xA4\x85"}, + {"new-name-right", "\xEE\xA4\x86"}, + {"new-name-sharp-left", "\xEE\xA4\x9B"}, + {"new-name-sharp-right", "\xEE\xA4\x9C"}, + {"new-name-slight-left", "\xEE\xA4\x87"}, + {"new-name-slight-right", "\xEE\xA4\x88"}, + {"new-name-straight", "\xEE\xA4\x84"}, + {"notification-left", "\xEE\xA4\x85"}, + {"notification-right", "\xEE\xA4\x86"}, + {"notification-sharp-left", "\xEE\xA4\x9B"}, + {"notification-sharp-right", "\xEE\xA4\xA5"}, + {"notification-slight-left", "\xEE\xA4\x87"}, + {"notification-slight-right", "\xEE\xA4\x88"}, + {"notification-straight", "\xEE\xA4\x84"}, + {"off-ramp-left", "\xEE\xA4\x9D"}, + {"off-ramp-right", "\xEE\xA4\x9E"}, + {"off-ramp-slight-left", "\xEE\xA4\x9F"}, + {"off-ramp-slight-right", "\xEE\xA4\xA0"}, + {"on-ramp-left", "\xEE\xA4\x85"}, + {"on-ramp-right", "\xEE\xA4\x86"}, + {"on-ramp-sharp-left", "\xEE\xA4\x9B"}, + {"on-ramp-sharp-right", "\xEE\xA4\xA5"}, + {"on-ramp-slight-left", "\xEE\xA4\x87"}, + {"on-ramp-slight-right", "\xEE\xA4\x88"}, + {"on-ramp-straight", "\xEE\xA4\x84"}, + {"rotary", "\xEE\xA4\xA1"}, + {"rotary-left", "\xEE\xA4\xA2"}, + {"rotary-right", "\xEE\xA4\xA3"}, + {"rotary-sharp-left", "\xEE\xA4\xA4"}, + {"rotary-sharp-right", "\xEE\xA4\xA5"}, + {"rotary-slight-left", "\xEE\xA4\xA6"}, + {"rotary-slight-right", "\xEE\xA4\xA7"}, + {"rotary-straight", "\xEE\xA4\xA8"}, + {"roundabout", "\xEE\xA4\xA1"}, + {"roundabout-left", "\xEE\xA4\xA2"}, + {"roundabout-right", "\xEE\xA4\xA3"}, + {"roundabout-sharp-left", "\xEE\xA4\xA4"}, + {"roundabout-sharp-right", "\xEE\xA4\xA5"}, + {"roundabout-slight-left", "\xEE\xA4\xA6"}, + {"roundabout-slight-right", "\xEE\xA4\xA7"}, + {"roundabout-straight", "\xEE\xA4\xA8"}, + {"turn-left", "\xEE\xA4\x85"}, + {"turn-right", "\xEE\xA4\x86"}, + {"turn-sharp-left", "\xEE\xA4\x9B"}, + {"turn-sharp-right", "\xEE\xA4\xA5"}, + {"turn-slight-left", "\xEE\xA4\x87"}, + {"turn-slight-right", "\xEE\xA4\x88"}, + {"turn-straight", "\xEE\xA4\x84"}, + {"updown", "\xEE\xA4\xA9"}, + {"uturn", "\xEE\xA4\x89"}, + }}; + + const char* iconForName(const std::string& icon) { + for (auto iter : m_iconMap) { + if (iter.first == icon) { + return iter.second; + } + } + return "\xEE\xA4\x90"; + } +} + /** * Navigation watchapp * @@ -68,27 +168,25 @@ Navigation::~Navigation() { } bool Navigation::Refresh() { - - if (m_flag != navService.getFlag()) { - m_flag = navService.getFlag(); - lv_label_set_text(imgFlag, iconForName(m_flag)); - // lv_img_set_src_arr(imgFlag, iconForName(m_flag)); + if (flag != navService.getFlag()) { + flag = navService.getFlag(); + lv_label_set_text(imgFlag, iconForName(flag)); } - if (m_narrative != navService.getNarrative()) { - m_narrative = navService.getNarrative(); - lv_label_set_text(txtNarrative, m_narrative.data()); + if (narrative != navService.getNarrative()) { + narrative = navService.getNarrative(); + lv_label_set_text(txtNarrative, narrative.data()); } - if (m_manDist != navService.getManDist()) { - m_manDist = navService.getManDist(); - lv_label_set_text(txtManDist, m_manDist.data()); + if (manDist != navService.getManDist()) { + manDist = navService.getManDist(); + lv_label_set_text(txtManDist, manDist.data()); } - if (m_progress != navService.getProgress()) { - m_progress = navService.getProgress(); - lv_bar_set_value(barProgress, m_progress, LV_ANIM_OFF); - if (m_progress > 90) { + if (progress != navService.getProgress()) { + progress = navService.getProgress(); + lv_bar_set_value(barProgress, progress, LV_ANIM_OFF); + if (progress > 90) { lv_obj_set_style_local_bg_color(barProgress, LV_BAR_PART_INDIC, LV_STATE_DEFAULT, LV_COLOR_RED); } else { lv_obj_set_style_local_bg_color(barProgress, LV_BAR_PART_INDIC, LV_STATE_DEFAULT, LV_COLOR_ORANGE); @@ -98,11 +196,4 @@ bool Navigation::Refresh() { return running; } -const char* Navigation::iconForName(std::string icon) { - for (auto iter : m_iconMap) { - if (iter.first == icon) { - return iter.second; - } - } - return "\xEE\xA4\x90"; -} + diff --git a/src/displayapp/screens/Navigation.h b/src/displayapp/screens/Navigation.h index 46816c33..eb7e00c4 100644 --- a/src/displayapp/screens/Navigation.h +++ b/src/displayapp/screens/Navigation.h @@ -45,103 +45,10 @@ namespace Pinetime { Pinetime::Controllers::NavigationService& navService; - std::string m_flag; - std::string m_narrative; - std::string m_manDist; - int m_progress; - - /** Watchapp */ - - const char* iconForName(std::string icon); - - std::array, 89> m_iconMap = {{ - {"arrive-left", "\xEE\xA4\x81"}, - {"arrive-right", "\xEE\xA4\x82"}, - {"arrive-straight", "\xEE\xA4\x80"}, - {"arrive", "\xEE\xA4\x80"}, - {"close", "\xEE\xA4\x83"}, - {"continue-left", "\xEE\xA4\x85"}, - {"continue-right", "\xEE\xA4\x86"}, - {"continue-slight-left", "\xEE\xA4\x87"}, - {"continue-slight-right", "\xEE\xA4\x88"}, - {"continue-straight", "\xEE\xA4\x84"}, - {"continue-uturn", "\xEE\xA4\x89"}, - {"continue", "\xEE\xA4\x84"}, - {"depart-left", "\xEE\xA4\x8B"}, - {"depart-right", "\xEE\xA4\x8C"}, - {"depart-straight", "\xEE\xA4\x8A"}, - {"end-of-road-left", "\xEE\xA4\x8D"}, - {"end-of-road-right", "\xEE\xA4\x8E"}, - {"ferry", "\xEE\xA4\x8F"}, - {"flag", "\xEE\xA4\x90"}, - {"fork-left", "\xEE\xA4\x92"}, - {"fork-right", "\xEE\xA4\x93"}, - {"fork-slight-left", "\xEE\xA4\x94"}, - {"fork-slight-right", "\xEE\xA4\x95"}, - {"fork-straight", "\xEE\xA4\x96"}, - {"invalid", "\xEE\xA4\x84"}, - {"invalid-left", "\xEE\xA4\x85"}, - {"invalid-right", "\xEE\xA4\x86"}, - {"invalid-slight-left", "\xEE\xA4\x87"}, - {"invalid-slight-right", "\xEE\xA4\x88"}, - {"invalid-straight", "\xEE\xA4\x84"}, - {"invalid-uturn", "\xEE\xA4\x89"}, - {"merge-left", "\xEE\xA4\x97"}, - {"merge-right", "\xEE\xA4\x98"}, - {"merge-slight-left", "\xEE\xA4\x99"}, - {"merge-slight-right", "\xEE\xA4\x9A"}, - {"merge-straight", "\xEE\xA4\x84"}, - {"new-name-left", "\xEE\xA4\x85"}, - {"new-name-right", "\xEE\xA4\x86"}, - {"new-name-sharp-left", "\xEE\xA4\x9B"}, - {"new-name-sharp-right", "\xEE\xA4\x9C"}, - {"new-name-slight-left", "\xEE\xA4\x87"}, - {"new-name-slight-right", "\xEE\xA4\x88"}, - {"new-name-straight", "\xEE\xA4\x84"}, - {"notification-left", "\xEE\xA4\x85"}, - {"notification-right", "\xEE\xA4\x86"}, - {"notification-sharp-left", "\xEE\xA4\x9B"}, - {"notification-sharp-right", "\xEE\xA4\xA5"}, - {"notification-slight-left", "\xEE\xA4\x87"}, - {"notification-slight-right", "\xEE\xA4\x88"}, - {"notification-straight", "\xEE\xA4\x84"}, - {"off-ramp-left", "\xEE\xA4\x9D"}, - {"off-ramp-right", "\xEE\xA4\x9E"}, - {"off-ramp-slight-left", "\xEE\xA4\x9F"}, - {"off-ramp-slight-right", "\xEE\xA4\xA0"}, - {"on-ramp-left", "\xEE\xA4\x85"}, - {"on-ramp-right", "\xEE\xA4\x86"}, - {"on-ramp-sharp-left", "\xEE\xA4\x9B"}, - {"on-ramp-sharp-right", "\xEE\xA4\xA5"}, - {"on-ramp-slight-left", "\xEE\xA4\x87"}, - {"on-ramp-slight-right", "\xEE\xA4\x88"}, - {"on-ramp-straight", "\xEE\xA4\x84"}, - {"rotary", "\xEE\xA4\xA1"}, - {"rotary-left", "\xEE\xA4\xA2"}, - {"rotary-right", "\xEE\xA4\xA3"}, - {"rotary-sharp-left", "\xEE\xA4\xA4"}, - {"rotary-sharp-right", "\xEE\xA4\xA5"}, - {"rotary-slight-left", "\xEE\xA4\xA6"}, - {"rotary-slight-right", "\xEE\xA4\xA7"}, - {"rotary-straight", "\xEE\xA4\xA8"}, - {"roundabout", "\xEE\xA4\xA1"}, - {"roundabout-left", "\xEE\xA4\xA2"}, - {"roundabout-right", "\xEE\xA4\xA3"}, - {"roundabout-sharp-left", "\xEE\xA4\xA4"}, - {"roundabout-sharp-right", "\xEE\xA4\xA5"}, - {"roundabout-slight-left", "\xEE\xA4\xA6"}, - {"roundabout-slight-right", "\xEE\xA4\xA7"}, - {"roundabout-straight", "\xEE\xA4\xA8"}, - {"turn-left", "\xEE\xA4\x85"}, - {"turn-right", "\xEE\xA4\x86"}, - {"turn-sharp-left", "\xEE\xA4\x9B"}, - {"turn-sharp-right", "\xEE\xA4\xA5"}, - {"turn-slight-left", "\xEE\xA4\x87"}, - {"turn-slight-right", "\xEE\xA4\x88"}, - {"turn-straight", "\xEE\xA4\x84"}, - {"updown", "\xEE\xA4\xA9"}, - {"uturn", "\xEE\xA4\x89"}, - }}; + std::string flag; + std::string narrative; + std::string manDist; + int progress; }; } } -- cgit v1.2.3-70-g09d2 From c0b0f8cb732f0cd8c6a519a97f41b0ef6275a24f Mon Sep 17 00:00:00 2001 From: JF002 Date: Tue, 1 Jun 2021 21:02:15 +0200 Subject: Remove debug defines (DEBUG & DEBUG_NRF_USER) from the build. These debug can be useful for debugging purposes but not in production (release). (#400) This reduces the size of the binary by about 6KB! This also removes filepath that were embedded into the binary (.bin) file. --- src/CMakeLists.txt | 6 ++++-- src/FreeRTOS/port_cmsis.c | 39 +++++++++++++++++++-------------------- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7ccd4ce7..43608568 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -746,15 +746,17 @@ link_directories( set(COMMON_FLAGS -MP -MD -mthumb -mabi=aapcs -Wall -Wno-unknown-pragmas -g3 -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin --short-enums -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wreturn-type -Werror=return-type) add_definitions(-DCONFIG_GPIO_AS_PINRESET) -add_definitions(-DDEBUG) add_definitions(-DNIMBLE_CFG_CONTROLLER) add_definitions(-DOS_CPUTIME_FREQ) add_definitions(-DNRF52 -DNRF52832 -DNRF52832_XXAA -DNRF52_PAN_74 -DNRF52_PAN_64 -DNRF52_PAN_12 -DNRF52_PAN_58 -DNRF52_PAN_54 -DNRF52_PAN_31 -DNRF52_PAN_51 -DNRF52_PAN_36 -DNRF52_PAN_15 -DNRF52_PAN_20 -DNRF52_PAN_55 -DBOARD_PCA10040) add_definitions(-DFREERTOS) -add_definitions(-DDEBUG_NRF_USER) add_definitions(-D__STACK_SIZE=8192) add_definitions(-D__HEAP_SIZE=8192) +# NOTE : Add the following defines to enable debug mode of the NRF SDK: +#add_definitions(-DDEBUG) +#add_definitions(-DDEBUG_NRF_USER) + if (NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Release") endif () diff --git a/src/FreeRTOS/port_cmsis.c b/src/FreeRTOS/port_cmsis.c index d8850b52..0ccf2e27 100644 --- a/src/FreeRTOS/port_cmsis.c +++ b/src/FreeRTOS/port_cmsis.c @@ -294,6 +294,25 @@ static void vPortEnableVFP( void ) } /*-----------------------------------------------------------*/ +uint32_t ulSetInterruptMaskFromISR( void ) +{ + __asm volatile ( + " mrs r0, PRIMASK \n" + " cpsid i \n" + " bx lr " + ::: "memory" + ); +} + +void vClearInterruptMaskFromISR( __attribute__( ( unused ) ) uint32_t ulMask ) +{ + __asm volatile ( + " msr PRIMASK, r0 \n" + " bx lr " + ::: "memory" + ); +} + #if ( configASSERT_DEFINED == 1 ) void vPortValidateInterruptPriority( void ) @@ -354,24 +373,4 @@ static void vPortEnableVFP( void ) configASSERT( NVIC_GetPriorityGrouping() <= ulMaxPRIGROUPValue ); } -uint32_t ulSetInterruptMaskFromISR( void ) -{ - __asm volatile ( - " mrs r0, PRIMASK \n" - " cpsid i \n" - " bx lr " - ::: "memory" - ); -} -/*-----------------------------------------------------------*/ - -void vClearInterruptMaskFromISR( __attribute__( ( unused ) ) uint32_t ulMask ) -{ - __asm volatile ( - " msr PRIMASK, r0 \n" - " bx lr " - ::: "memory" - ); -} - #endif /* configASSERT_DEFINED */ -- cgit v1.2.3-70-g09d2 From 1b6acdedc2ae892bece04479a64ad28120eced8c Mon Sep 17 00:00:00 2001 From: JF002 Date: Tue, 1 Jun 2021 21:03:01 +0200 Subject: Enable various compilation flags to reduce the binary size (#401) * Add the following compilation flags: * -fno-exceptions and -fno-non-call-exceptions : disable exception handling * -fno-rtti : disable run time type information (needed by dynamic_cast, for example) These flags reduce the binary size by about 100KB! Also, -fstack-usage generate debug info (not in final binary) to allow tools like Puncover to do a stack analysis. * Remove unused CMake variables in CMake_nRF5x.cmake (duplicated in src/CMakeLists.txt). Replace -O0 by -Og in DEBUG builds. This generates a smaller binary (small enough for the internal memory) that is debugger friendly. --- cmake-nRF5x/CMake_nRF5x.cmake | 15 --------- src/CMakeLists.txt | 74 +++++++++++++++++++++---------------------- src/displayapp/DisplayApp.cpp | 2 +- 3 files changed, 38 insertions(+), 53 deletions(-) diff --git a/cmake-nRF5x/CMake_nRF5x.cmake b/cmake-nRF5x/CMake_nRF5x.cmake index ead7b9f6..c7d0a68b 100755 --- a/cmake-nRF5x/CMake_nRF5x.cmake +++ b/cmake-nRF5x/CMake_nRF5x.cmake @@ -74,21 +74,6 @@ macro(nRF5x_setup) ) endif () - set(COMMON_FLAGS "-MP -MD -mthumb -mabi=aapcs -Wall -g3 -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin --short-enums ${CPU_FLAGS} -Wreturn-type -Werror=return-type") - - # compiler/assambler/linker flags - set(CMAKE_C_FLAGS "${COMMON_FLAGS}") - set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -g3") - set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3") - set(CMAKE_CXX_FLAGS "${COMMON_FLAGS}") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g3") - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3") - set(CMAKE_ASM_FLAGS "-MP -MD -x assembler-with-cpp") - set(CMAKE_EXE_LINKER_FLAGS "-mthumb -mabi=aapcs -L ${NRF5_SDK_PATH}/modules/nrfx/mdk -T${NRF5_LINKER_SCRIPT} ${CPU_FLAGS} -Wl,--gc-sections --specs=nano.specs -lc -lnosys -lm") - # note: we must override the default cmake linker flags so that CMAKE_C_FLAGS are not added implicitly - set(CMAKE_C_LINK_EXECUTABLE "${CMAKE_C_COMPILER} -o ") - set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_C_COMPILER} -lstdc++ -o ") - # basic board definitions and drivers include_directories( "${NRF5_SDK_PATH}/components" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 43608568..cd729921 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -744,7 +744,7 @@ link_directories( ) -set(COMMON_FLAGS -MP -MD -mthumb -mabi=aapcs -Wall -Wno-unknown-pragmas -g3 -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin --short-enums -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wreturn-type -Werror=return-type) +set(COMMON_FLAGS -MP -MD -mthumb -mabi=aapcs -Wall -Wno-unknown-pragmas -g3 -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin --short-enums -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wreturn-type -Werror=return-type -fstack-usage -fno-exceptions -fno-non-call-exceptions) add_definitions(-DCONFIG_GPIO_AS_PINRESET) add_definitions(-DNIMBLE_CFG_CONTROLLER) add_definitions(-DOS_CPUTIME_FREQ) @@ -766,10 +766,10 @@ add_library(nrf-sdk STATIC ${SDK_SOURCE_FILES}) target_include_directories(nrf-sdk SYSTEM PUBLIC . ../) target_include_directories(nrf-sdk SYSTEM PUBLIC ${INCLUDES_FROM_LIBS}) target_compile_options(nrf-sdk PRIVATE - $<$,$>: ${COMMON_FLAGS} -O0 -g3> - $<$,$>: ${COMMON_FLAGS} -O3> - $<$,$>: ${COMMON_FLAGS} -O0> - $<$,$>: ${COMMON_FLAGS} -O3> + $<$,$>: ${COMMON_FLAGS} -Og -g3> + $<$,$>: ${COMMON_FLAGS} -Os> + $<$,$>: ${COMMON_FLAGS} -Og -fno-rtti> + $<$,$>: ${COMMON_FLAGS} -Os -fno-rtti> $<$: -MP -MD -x assembler-with-cpp> ) @@ -778,10 +778,10 @@ add_library(nimble STATIC ${NIMBLE_SRC} ${TINYCRYPT_SRC}) target_include_directories(nimble SYSTEM PUBLIC . ../) target_include_directories(nimble SYSTEM PUBLIC ${INCLUDES_FROM_LIBS}) target_compile_options(nimble PRIVATE - $<$,$>: ${COMMON_FLAGS} -O0 -g3 -Wno-unused-but-set-variable -Wno-maybe-uninitialized> - $<$,$>: ${COMMON_FLAGS} -O3 -Wno-unused-but-set-variable -Wno-maybe-uninitialized> - $<$,$>: ${COMMON_FLAGS} -O0 -g3 -Wno-unused-but-set-variable -Wno-maybe-uninitialized> - $<$,$>: ${COMMON_FLAGS} -O3 -Wno-unused-but-set-variable -Wno-maybe-uninitialized> + $<$,$>: ${COMMON_FLAGS} -Og -g3 -Wno-unused-but-set-variable -Wno-maybe-uninitialized> + $<$,$>: ${COMMON_FLAGS} -Os -Wno-unused-but-set-variable -Wno-maybe-uninitialized> + $<$,$>: ${COMMON_FLAGS} -Og -g3 -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-rtti> + $<$,$>: ${COMMON_FLAGS} -Os -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-rtti> $<$: -MP -MD -x assembler-with-cpp> ) @@ -790,10 +790,10 @@ add_library(lvgl STATIC ${LVGL_SRC}) target_include_directories(lvgl SYSTEM PUBLIC . ../) target_include_directories(lvgl SYSTEM PUBLIC ${INCLUDES_FROM_LIBS}) target_compile_options(lvgl PRIVATE - $<$,$>: ${COMMON_FLAGS} -O0 -g3> - $<$,$>: ${COMMON_FLAGS} -O3> - $<$,$>: ${COMMON_FLAGS} -O0 -g3> - $<$,$>: ${COMMON_FLAGS} -O3> + $<$,$>: ${COMMON_FLAGS} -Og -g3> + $<$,$>: ${COMMON_FLAGS} -Os> + $<$,$>: ${COMMON_FLAGS} -Og -g3 -fno-rtti> + $<$,$>: ${COMMON_FLAGS} -Os -fno-rtti> $<$: -MP -MD -x assembler-with-cpp> ) @@ -805,10 +805,10 @@ add_executable(${EXECUTABLE_NAME} ${SOURCE_FILES}) set_target_properties(${EXECUTABLE_NAME} PROPERTIES OUTPUT_NAME ${EXECUTABLE_FILE_NAME}) target_link_libraries(${EXECUTABLE_NAME} nimble nrf-sdk lvgl) target_compile_options(${EXECUTABLE_NAME} PUBLIC - $<$,$>: ${COMMON_FLAGS} -O0 -g3> - $<$,$>: ${COMMON_FLAGS} -O3> - $<$,$>: ${COMMON_FLAGS} -O0 -g3> - $<$,$>: ${COMMON_FLAGS} -O3> + $<$,$>: ${COMMON_FLAGS} -Og -g3> + $<$,$>: ${COMMON_FLAGS} -Os> + $<$,$>: ${COMMON_FLAGS} -Og -g3 -fno-rtti> + $<$,$>: ${COMMON_FLAGS} -Os -fno-rtti> $<$: -MP -MD -x assembler-with-cpp> ) @@ -835,10 +835,10 @@ add_executable(${EXECUTABLE_MCUBOOT_NAME} ${SOURCE_FILES}) target_link_libraries(${EXECUTABLE_MCUBOOT_NAME} nimble nrf-sdk lvgl) set_target_properties(${EXECUTABLE_MCUBOOT_NAME} PROPERTIES OUTPUT_NAME ${EXECUTABLE_MCUBOOT_FILE_NAME}) target_compile_options(${EXECUTABLE_MCUBOOT_NAME} PUBLIC - $<$,$>: ${COMMON_FLAGS} -O0 -g3> - $<$,$>: ${COMMON_FLAGS} -O3> - $<$,$>: ${COMMON_FLAGS} -O0 -g3> - $<$,$>: ${COMMON_FLAGS} -O3> + $<$,$>: ${COMMON_FLAGS} -Og -g3> + $<$,$>: ${COMMON_FLAGS} -Os> + $<$,$>: ${COMMON_FLAGS} -Og -g3 -fno-rtti> + $<$,$>: ${COMMON_FLAGS} -Os -fno-rtti> $<$: -MP -MD -x assembler-with-cpp> ) @@ -872,10 +872,10 @@ target_link_libraries(${EXECUTABLE_RECOVERY_NAME} nimble nrf-sdk) set_target_properties(${EXECUTABLE_RECOVERY_NAME} PROPERTIES OUTPUT_NAME ${EXECUTABLE_RECOVERY_FILE_NAME}) target_compile_definitions(${EXECUTABLE_RECOVERY_NAME} PUBLIC "PINETIME_IS_RECOVERY") target_compile_options(${EXECUTABLE_RECOVERY_NAME} PUBLIC - $<$,$>: ${COMMON_FLAGS} -O0 -g3> - $<$,$>: ${COMMON_FLAGS} -O3> - $<$,$>: ${COMMON_FLAGS} -O0 -g3> - $<$,$>: ${COMMON_FLAGS} -O3> + $<$,$>: ${COMMON_FLAGS} -Og -g3> + $<$,$>: ${COMMON_FLAGS} -Os> + $<$,$>: ${COMMON_FLAGS} -Og -g3 -fno-rtti> + $<$,$>: ${COMMON_FLAGS} -Os -fno-rtti> $<$: -MP -MD -x assembler-with-cpp> ) @@ -902,10 +902,10 @@ target_link_libraries(${EXECUTABLE_RECOVERY_MCUBOOT_NAME} nimble nrf-sdk) set_target_properties(${EXECUTABLE_RECOVERY_MCUBOOT_NAME} PROPERTIES OUTPUT_NAME ${EXECUTABLE_RECOVERY_MCUBOOT_FILE_NAME}) target_compile_definitions(${EXECUTABLE_RECOVERY_MCUBOOT_NAME} PUBLIC "PINETIME_IS_RECOVERY") target_compile_options(${EXECUTABLE_RECOVERY_MCUBOOT_NAME} PUBLIC - $<$,$>: ${COMMON_FLAGS} -O0 -g3> - $<$,$>: ${COMMON_FLAGS} -O3> - $<$,$>: ${COMMON_FLAGS} -O0 -g3> - $<$,$>: ${COMMON_FLAGS} -O3> + $<$,$>: ${COMMON_FLAGS} -Og -g3> + $<$,$>: ${COMMON_FLAGS} -Os> + $<$,$>: ${COMMON_FLAGS} -Og -g3 -fno-rtti> + $<$,$>: ${COMMON_FLAGS} -Os -fno-rtti> $<$: -MP -MD -x assembler-with-cpp> ) @@ -939,10 +939,10 @@ add_executable(${EXECUTABLE_RECOVERYLOADER_NAME} ${RECOVERYLOADER_SOURCE_FILES}) target_link_libraries(${EXECUTABLE_RECOVERYLOADER_NAME} nrf-sdk) set_target_properties(${EXECUTABLE_RECOVERYLOADER_NAME} PROPERTIES OUTPUT_NAME ${EXECUTABLE_RECOVERYLOADER_FILE_NAME}) target_compile_options(${EXECUTABLE_RECOVERYLOADER_NAME} PUBLIC - $<$,$>: ${COMMON_FLAGS} -O0 -g3> - $<$,$>: ${COMMON_FLAGS} -O3> - $<$,$>: ${COMMON_FLAGS} -O0 -g3> - $<$,$>: ${COMMON_FLAGS} -O3> + $<$,$>: ${COMMON_FLAGS} -Og -g3> + $<$,$>: ${COMMON_FLAGS} -Os> + $<$,$>: ${COMMON_FLAGS} -Og -g3 -fno-rtti> + $<$,$>: ${COMMON_FLAGS} -Os -fno-rtti> $<$: -MP -MD -x assembler-with-cpp> ) target_include_directories(${EXECUTABLE_RECOVERYLOADER_NAME} PUBLIC @@ -972,10 +972,10 @@ add_executable(${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME} ${RECOVERYLOADER_SOURCE target_link_libraries(${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME} nrf-sdk) set_target_properties(${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME} PROPERTIES OUTPUT_NAME ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_FILE_NAME}) target_compile_options(${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME} PUBLIC - $<$,$>: ${COMMON_FLAGS} -O0 -g3> - $<$,$>: ${COMMON_FLAGS} -O3> - $<$,$>: ${COMMON_FLAGS} -O0 -g3> - $<$,$>: ${COMMON_FLAGS} -O3> + $<$,$>: ${COMMON_FLAGS} -Og -g3> + $<$,$>: ${COMMON_FLAGS} -Os> + $<$,$>: ${COMMON_FLAGS} -Og -g3 -fno-rtti> + $<$,$>: ${COMMON_FLAGS} -Os -fno-rtti> $<$: -MP -MD -x assembler-with-cpp> ) target_include_directories(${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME} PUBLIC diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index 419b9f6f..7b03d569 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -153,7 +153,7 @@ void DisplayApp::Refresh() { break; case Messages::TimerDone: if (currentApp == Apps::Timer) { - auto *timer = dynamic_cast(currentScreen.get()); + auto *timer = static_cast(currentScreen.get()); timer->setDone(); } else { LoadApp(Apps::Timer, DisplayApp::FullRefreshDirections::Down); -- cgit v1.2.3-70-g09d2 From 79f0fcb07aa80eb70385223272e29f2ba5657bc8 Mon Sep 17 00:00:00 2001 From: JF002 Date: Tue, 1 Jun 2021 21:03:29 +0200 Subject: Add the maximum memory used by LVGL in SystemInfo app. This will help the developers to size the memory buffer allocated to lvgl. (#408) --- src/displayapp/screens/SystemInfo.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp index e4ef6911..f61d2ff1 100644 --- a/src/displayapp/screens/SystemInfo.cpp +++ b/src/displayapp/screens/SystemInfo.cpp @@ -175,8 +175,9 @@ std::unique_ptr SystemInfo::CreateScreen3() { "#444444 BLE MAC#\n" " %02x:%02x:%02x:%02x:%02x:%02x" "\n" - "#444444 Memory#\n" + "#444444 LVGL Memory#\n" " #444444 used# %d (%d%%)\n" + " #444444 max used# %d\n" " #444444 frag# %d%%\n" " #444444 free# %d" "\n" @@ -189,6 +190,7 @@ std::unique_ptr SystemInfo::CreateScreen3() { bleAddr[0], (int) mon.total_size - mon.free_size, mon.used_pct, + mon.max_used, mon.frag_pct, (int) mon.free_biggest_size, 0); -- cgit v1.2.3-70-g09d2 From 7f9cc51b050e1034b573e37484f7afe29c370d81 Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Sun, 6 Jun 2021 15:56:03 +0200 Subject: Initialize SystemTask, DisplayApp and HeartRateTask as global static variable instead of variables on the heap. We don't need them on the heap as we know their size at build time, it'll reduce memory fragmentation and it'll make memory analysis easier. --- src/CMakeLists.txt | 4 +- src/FreeRTOSConfig.h | 2 +- src/components/ble/AlertNotificationClient.cpp | 2 +- src/components/ble/AlertNotificationService.cpp | 2 +- src/components/ble/DfuService.cpp | 6 +- src/components/ble/ImmediateAlertService.cpp | 2 +- src/components/ble/NimbleController.cpp | 2 +- src/components/datetime/DateTimeController.cpp | 10 +-- src/components/datetime/DateTimeController.h | 6 +- src/components/heartrate/HeartRateController.cpp | 3 - src/components/heartrate/HeartRateController.h | 4 +- src/components/heartrate/Ppg.cpp | 11 +--- src/components/heartrate/Ppg.h | 3 +- src/components/timer/TimerController.cpp | 29 +++++---- src/components/timer/TimerController.h | 13 ++-- src/displayapp/DisplayApp.cpp | 32 ++++++---- src/displayapp/DisplayApp.h | 7 ++- src/displayapp/screens/FlashLight.cpp | 4 +- src/displayapp/screens/HeartRate.cpp | 8 +-- src/displayapp/screens/ScreenList.h | 13 ++-- src/displayapp/screens/settings/QuickSettings.cpp | 4 +- src/drivers/Bma421.cpp | 2 - src/drivers/SpiMaster.h | 1 - src/heartratetask/HeartRateTask.cpp | 2 +- src/main.cpp | 69 +++++++++++++++------ src/systemtask/Messages.h | 26 ++++++++ src/systemtask/SystemTask.cpp | 75 +++++++++++------------ src/systemtask/SystemTask.h | 53 +++++++--------- 28 files changed, 224 insertions(+), 171 deletions(-) create mode 100644 src/systemtask/Messages.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cd729921..c72f7c9c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -750,8 +750,8 @@ add_definitions(-DNIMBLE_CFG_CONTROLLER) add_definitions(-DOS_CPUTIME_FREQ) add_definitions(-DNRF52 -DNRF52832 -DNRF52832_XXAA -DNRF52_PAN_74 -DNRF52_PAN_64 -DNRF52_PAN_12 -DNRF52_PAN_58 -DNRF52_PAN_54 -DNRF52_PAN_31 -DNRF52_PAN_51 -DNRF52_PAN_36 -DNRF52_PAN_15 -DNRF52_PAN_20 -DNRF52_PAN_55 -DBOARD_PCA10040) add_definitions(-DFREERTOS) -add_definitions(-D__STACK_SIZE=8192) -add_definitions(-D__HEAP_SIZE=8192) +add_definitions(-D__STACK_SIZE=1024) +add_definitions(-D__HEAP_SIZE=4096) # NOTE : Add the following defines to enable debug mode of the NRF SDK: #add_definitions(-DDEBUG) diff --git a/src/FreeRTOSConfig.h b/src/FreeRTOSConfig.h index 15185766..07c152dc 100644 --- a/src/FreeRTOSConfig.h +++ b/src/FreeRTOSConfig.h @@ -62,7 +62,7 @@ #define configTICK_RATE_HZ 1024 #define configMAX_PRIORITIES (3) #define configMINIMAL_STACK_SIZE (120) -#define configTOTAL_HEAP_SIZE (1024 * 16) +#define configTOTAL_HEAP_SIZE (1024 * 17) #define configMAX_TASK_NAME_LEN (4) #define configUSE_16_BIT_TICKS 0 #define configIDLE_SHOULD_YIELD 1 diff --git a/src/components/ble/AlertNotificationClient.cpp b/src/components/ble/AlertNotificationClient.cpp index 6043a129..c3d1d69a 100644 --- a/src/components/ble/AlertNotificationClient.cpp +++ b/src/components/ble/AlertNotificationClient.cpp @@ -159,7 +159,7 @@ void AlertNotificationClient::OnNotification(ble_gap_event* event) { notif.category = Pinetime::Controllers::NotificationManager::Categories::SimpleAlert; notificationManager.Push(std::move(notif)); - systemTask.PushMessage(Pinetime::System::SystemTask::Messages::OnNewNotification); + systemTask.PushMessage(Pinetime::System::Messages::OnNewNotification); } } diff --git a/src/components/ble/AlertNotificationService.cpp b/src/components/ble/AlertNotificationService.cpp index e9f5941e..d5fc7f65 100644 --- a/src/components/ble/AlertNotificationService.cpp +++ b/src/components/ble/AlertNotificationService.cpp @@ -79,7 +79,7 @@ int AlertNotificationService::OnAlert(uint16_t conn_handle, uint16_t attr_handle break; } - auto event = Pinetime::System::SystemTask::Messages::OnNewNotification; + auto event = Pinetime::System::Messages::OnNewNotification; notificationManager.Push(std::move(notif)); systemTask.PushMessage(event); } diff --git a/src/components/ble/DfuService.cpp b/src/components/ble/DfuService.cpp index 2031668e..cec194cc 100644 --- a/src/components/ble/DfuService.cpp +++ b/src/components/ble/DfuService.cpp @@ -205,7 +205,7 @@ int DfuService::ControlPointHandler(uint16_t connectionHandle, os_mbuf* om) { bleController.State(Pinetime::Controllers::Ble::FirmwareUpdateStates::Running); bleController.FirmwareUpdateTotalBytes(0xffffffffu); bleController.FirmwareUpdateCurrentBytes(0); - systemTask.PushMessage(Pinetime::System::SystemTask::Messages::BleFirmwareUpdateStarted); + systemTask.PushMessage(Pinetime::System::Messages::BleFirmwareUpdateStarted); return 0; } else { NRF_LOG_INFO("[DFU] -> Start DFU, mode %d not supported!", imageType); @@ -279,7 +279,7 @@ int DfuService::ControlPointHandler(uint16_t connectionHandle, os_mbuf* om) { } NRF_LOG_INFO("[DFU] -> Activate image and reset!"); bleController.StopFirmwareUpdate(); - systemTask.PushMessage(Pinetime::System::SystemTask::Messages::BleFirmwareUpdateFinished); + systemTask.PushMessage(Pinetime::System::Messages::BleFirmwareUpdateFinished); Reset(); bleController.State(Pinetime::Controllers::Ble::FirmwareUpdateStates::Validated); return 0; @@ -304,7 +304,7 @@ void DfuService::Reset() { notificationManager.Reset(); bleController.State(Pinetime::Controllers::Ble::FirmwareUpdateStates::Error); bleController.StopFirmwareUpdate(); - systemTask.PushMessage(Pinetime::System::SystemTask::Messages::BleFirmwareUpdateFinished); + systemTask.PushMessage(Pinetime::System::Messages::BleFirmwareUpdateFinished); } DfuService::NotificationManager::NotificationManager() { diff --git a/src/components/ble/ImmediateAlertService.cpp b/src/components/ble/ImmediateAlertService.cpp index fd6430af..820d3b6e 100644 --- a/src/components/ble/ImmediateAlertService.cpp +++ b/src/components/ble/ImmediateAlertService.cpp @@ -67,7 +67,7 @@ int ImmediateAlertService::OnAlertLevelChanged(uint16_t connectionHandle, uint16 notif.category = Pinetime::Controllers::NotificationManager::Categories::SimpleAlert; notificationManager.Push(std::move(notif)); - systemTask.PushMessage(Pinetime::System::SystemTask::Messages::OnNewNotification); + systemTask.PushMessage(Pinetime::System::Messages::OnNewNotification); } } diff --git a/src/components/ble/NimbleController.cpp b/src/components/ble/NimbleController.cpp index 67a6d691..2c1d0f99 100644 --- a/src/components/ble/NimbleController.cpp +++ b/src/components/ble/NimbleController.cpp @@ -149,7 +149,7 @@ int NimbleController::OnGAPEvent(ble_gap_event* event) { bleController.Disconnect(); } else { bleController.Connect(); - systemTask.PushMessage(Pinetime::System::SystemTask::Messages::BleConnected); + systemTask.PushMessage(Pinetime::System::Messages::BleConnected); connectionHandle = event->connect.conn_handle; // Service discovery is deffered via systemtask } diff --git a/src/components/datetime/DateTimeController.cpp b/src/components/datetime/DateTimeController.cpp index 4f9302eb..28a70abc 100644 --- a/src/components/datetime/DateTimeController.cpp +++ b/src/components/datetime/DateTimeController.cpp @@ -5,9 +5,6 @@ using namespace Pinetime::Controllers; -DateTime::DateTime(System::SystemTask& systemTask) : systemTask {systemTask} { -} - void DateTime::SetTime( uint16_t year, uint8_t month, uint8_t day, uint8_t dayOfWeek, uint8_t hour, uint8_t minute, uint8_t second, uint32_t systickCounter) { std::tm tm = { @@ -70,7 +67,8 @@ void DateTime::UpdateTime(uint32_t systickCounter) { // Notify new day to SystemTask if (hour == 0 and not isMidnightAlreadyNotified) { isMidnightAlreadyNotified = true; - systemTask.PushMessage(System::SystemTask::Messages::OnNewDay); + if(systemTask != nullptr) + systemTask->PushMessage(System::Messages::OnNewDay); } else if (hour != 0) { isMidnightAlreadyNotified = false; } @@ -104,6 +102,10 @@ const char* DateTime::DayOfWeekShortToStringLow() { return DateTime::DaysStringShortLow[(uint8_t) dayOfWeek]; } +void DateTime::Register(Pinetime::System::SystemTask* systemTask) { + this->systemTask = systemTask; +} + char const* DateTime::DaysStringLow[] = {"--", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"}; char const* DateTime::DaysStringShortLow[] = {"--", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"}; diff --git a/src/components/datetime/DateTimeController.h b/src/components/datetime/DateTimeController.h index d0ae727e..265d6e9d 100644 --- a/src/components/datetime/DateTimeController.h +++ b/src/components/datetime/DateTimeController.h @@ -27,8 +27,6 @@ namespace Pinetime { December }; - DateTime(System::SystemTask& systemTask); - void SetTime(uint16_t year, uint8_t month, uint8_t day, @@ -75,8 +73,9 @@ namespace Pinetime { return uptime; } + void Register(System::SystemTask* systemTask); + private: - System::SystemTask& systemTask; uint16_t year = 0; Months month = Months::Unknown; uint8_t day = 0; @@ -90,6 +89,7 @@ namespace Pinetime { std::chrono::seconds uptime {0}; bool isMidnightAlreadyNotified = false; + System::SystemTask* systemTask = nullptr; static char const* DaysString[]; static char const* DaysStringShort[]; diff --git a/src/components/heartrate/HeartRateController.cpp b/src/components/heartrate/HeartRateController.cpp index e84d665a..716813b3 100644 --- a/src/components/heartrate/HeartRateController.cpp +++ b/src/components/heartrate/HeartRateController.cpp @@ -4,9 +4,6 @@ using namespace Pinetime::Controllers; -HeartRateController::HeartRateController(Pinetime::System::SystemTask& systemTask) : systemTask {systemTask} { -} - void HeartRateController::Update(HeartRateController::States newState, uint8_t heartRate) { this->state = newState; if (this->heartRate != heartRate) { diff --git a/src/components/heartrate/HeartRateController.h b/src/components/heartrate/HeartRateController.h index d3a8460d..a63f1a70 100644 --- a/src/components/heartrate/HeartRateController.h +++ b/src/components/heartrate/HeartRateController.h @@ -15,8 +15,7 @@ namespace Pinetime { public: enum class States { Stopped, NotEnoughData, NoTouch, Running }; - explicit HeartRateController(System::SystemTask& systemTask); - + HeartRateController() = default; void Start(); void Stop(); void Update(States newState, uint8_t heartRate); @@ -32,7 +31,6 @@ namespace Pinetime { void SetService(Pinetime::Controllers::HeartRateService* service); private: - System::SystemTask& systemTask; Applications::HeartRateTask* task = nullptr; States state = States::Stopped; uint8_t heartRate = 0; diff --git a/src/components/heartrate/Ppg.cpp b/src/components/heartrate/Ppg.cpp index da0789e0..fcba3815 100644 --- a/src/components/heartrate/Ppg.cpp +++ b/src/components/heartrate/Ppg.cpp @@ -38,9 +38,8 @@ namespace { } } -Ppg::Ppg(float spl) - : offset {spl}, - hpf {0.87033078, -1.74066156, 0.87033078, -1.72377617, 0.75754694}, +Ppg::Ppg() + : hpf {0.87033078, -1.74066156, 0.87033078, -1.72377617, 0.75754694}, agc {20, 0.971, 2}, lpf {0.11595249, 0.23190498, 0.11595249, -0.72168143, 0.18549138} { } @@ -67,13 +66,7 @@ float Ppg::HeartRate() { dataIndex = 0; return hr; } - -int cccount = 0; float Ppg::ProcessHeartRate() { - - if (cccount > 2) - asm("nop"); - cccount++; auto t0 = Trough(data.data(), dataIndex, 7, 48); if (t0 < 0) return 0; diff --git a/src/components/heartrate/Ppg.h b/src/components/heartrate/Ppg.h index ee07dfcf..00014162 100644 --- a/src/components/heartrate/Ppg.h +++ b/src/components/heartrate/Ppg.h @@ -8,8 +8,7 @@ namespace Pinetime { namespace Controllers { class Ppg { public: - explicit Ppg(float spl); - + Ppg(); int8_t Preprocess(float spl); float HeartRate(); diff --git a/src/components/timer/TimerController.cpp b/src/components/timer/TimerController.cpp index 3b25901c..8d5f5c33 100644 --- a/src/components/timer/TimerController.cpp +++ b/src/components/timer/TimerController.cpp @@ -12,14 +12,17 @@ using namespace Pinetime::Controllers; APP_TIMER_DEF(timerAppTimer); - -TimerController::TimerController(System::SystemTask& systemTask) : systemTask{systemTask} { +namespace { + void TimerEnd(void* p_context) { + auto* controller = static_cast (p_context); + if(controller != nullptr) + controller->OnTimerEnd(); + } } void TimerController::Init() { - app_timer_create(&timerAppTimer, APP_TIMER_MODE_SINGLE_SHOT, timerEnd); - + app_timer_create(&timerAppTimer, APP_TIMER_MODE_SINGLE_SHOT, TimerEnd); } void TimerController::StartTimer(uint32_t duration) { @@ -47,13 +50,6 @@ uint32_t TimerController::GetTimeRemaining() { return (static_cast(deltaTicks) / static_cast(configTICK_RATE_HZ)) * 1000; } -void TimerController::timerEnd(void* p_context) { - - auto* controller = static_cast (p_context); - controller->timerRunning = false; - controller->systemTask.PushMessage(System::SystemTask::Messages::OnTimerDone); -} - void TimerController::StopTimer() { app_timer_stop(timerAppTimer); timerRunning = false; @@ -61,4 +57,13 @@ void TimerController::StopTimer() { bool TimerController::IsRunning() { return timerRunning; -} \ No newline at end of file +} +void TimerController::OnTimerEnd() { + timerRunning = false; + if(systemTask != nullptr) + systemTask->PushMessage(System::Messages::OnTimerDone); +} + +void TimerController::Register(Pinetime::System::SystemTask* systemTask) { + this->systemTask = systemTask; +} diff --git a/src/components/timer/TimerController.h b/src/components/timer/TimerController.h index 5a0b293e..fa7bc90d 100644 --- a/src/components/timer/TimerController.h +++ b/src/components/timer/TimerController.h @@ -12,7 +12,7 @@ namespace Pinetime { class TimerController { public: - TimerController(Pinetime::System::SystemTask& systemTask); + TimerController() = default; void Init(); @@ -23,12 +23,13 @@ namespace Pinetime { uint32_t GetTimeRemaining(); bool IsRunning(); - + + void OnTimerEnd(); + + void Register(System::SystemTask* systemTask); + private: - System::SystemTask& systemTask; - - static void timerEnd(void* p_context); - + System::SystemTask* systemTask = nullptr; TickType_t endTicks; bool timerRunning = false; }; diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index 7b03d569..ba6dfbd2 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -32,6 +32,7 @@ #include "drivers/St7789.h" #include "drivers/Watchdog.h" #include "systemtask/SystemTask.h" +#include "systemtask/Messages.h" #include "displayapp/screens/settings/QuickSettings.h" #include "displayapp/screens/settings/Settings.h" @@ -51,7 +52,6 @@ DisplayApp::DisplayApp(Drivers::St7789& lcd, Controllers::Ble& bleController, Controllers::DateTime& dateTimeController, Drivers::WatchdogView& watchdog, - System::SystemTask& systemTask, Pinetime::Controllers::NotificationManager& notificationManager, Pinetime::Controllers::HeartRateController& heartRateController, Controllers::Settings& settingsController, @@ -65,7 +65,6 @@ DisplayApp::DisplayApp(Drivers::St7789& lcd, bleController {bleController}, dateTimeController {dateTimeController}, watchdog {watchdog}, - systemTask {systemTask}, notificationManager {notificationManager}, heartRateController {heartRateController}, settingsController {settingsController}, @@ -130,7 +129,7 @@ void DisplayApp::Refresh() { vTaskDelay(100); } lcd.DisplayOff(); - systemTask.PushMessage(System::SystemTask::Messages::OnDisplayTaskSleeping); + PushMessageToSystemTask(Pinetime::System::Messages::OnDisplayTaskSleeping); state = States::Idle; break; case Messages::GoToRunning: @@ -139,7 +138,7 @@ void DisplayApp::Refresh() { state = States::Running; break; case Messages::UpdateTimeOut: - systemTask.PushMessage(System::SystemTask::Messages::UpdateTimeOut); + PushMessageToSystemTask(System::Messages::UpdateTimeOut); break; case Messages::UpdateBleConnection: // clockScreen.SetBleConnectionState(bleController.IsConnected() ? Screens::Clock::BleConnectionStates::Connected : @@ -176,7 +175,7 @@ void DisplayApp::Refresh() { LoadApp(Apps::QuickSettings, DisplayApp::FullRefreshDirections::RightAnim); break; case TouchEvents::DoubleTap: - systemTask.PushMessage(System::SystemTask::Messages::GoToSleep); + PushMessageToSystemTask(System::Messages::GoToSleep); break; default: break; @@ -188,7 +187,7 @@ void DisplayApp::Refresh() { } break; case Messages::ButtonPushed: if (currentApp == Apps::Clock) { - systemTask.PushMessage(System::SystemTask::Messages::GoToSleep); + PushMessageToSystemTask(System::Messages::GoToSleep); } else { if (!currentScreen->OnButtonPushed()) { LoadApp(returnToApp, returnDirection); @@ -267,12 +266,12 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction) case Apps::Notifications: currentScreen = std::make_unique( - this, notificationManager, systemTask.nimble().alertService(), Screens::Notifications::Modes::Normal); + this, notificationManager, systemTask->nimble().alertService(), Screens::Notifications::Modes::Normal); ReturnApp(Apps::Clock, FullRefreshDirections::Up, TouchEvents::SwipeUp); break; case Apps::NotificationsPreview: currentScreen = std::make_unique( - this, notificationManager, systemTask.nimble().alertService(), Screens::Notifications::Modes::Preview); + this, notificationManager, systemTask->nimble().alertService(), Screens::Notifications::Modes::Preview); ReturnApp(Apps::Clock, FullRefreshDirections::Up, TouchEvents::SwipeUp); break; case Apps::Timer: @@ -321,7 +320,7 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction) // case Apps::FlashLight: - currentScreen = std::make_unique(this, systemTask, brightnessController); + currentScreen = std::make_unique(this, *systemTask, brightnessController); ReturnApp(Apps::Clock, FullRefreshDirections::Down, TouchEvents::None); break; case Apps::StopWatch: @@ -337,13 +336,13 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction) currentScreen = std::make_unique(this, lvgl); break; case Apps::Music: - currentScreen = std::make_unique(this, systemTask.nimble().music()); + currentScreen = std::make_unique(this, systemTask->nimble().music()); break; case Apps::Navigation: - currentScreen = std::make_unique(this, systemTask.nimble().navigation()); + currentScreen = std::make_unique(this, systemTask->nimble().navigation()); break; case Apps::HeartRate: - currentScreen = std::make_unique(this, heartRateController, systemTask); + currentScreen = std::make_unique(this, heartRateController, *systemTask); break; case Apps::Motion: currentScreen = std::make_unique(this, motionController); @@ -425,3 +424,12 @@ void DisplayApp::SetFullRefresh(DisplayApp::FullRefreshDirections direction) { void DisplayApp::SetTouchMode(DisplayApp::TouchModes mode) { touchMode = mode; } + +void DisplayApp::PushMessageToSystemTask(Pinetime::System::Messages message) { + if(systemTask != nullptr) + systemTask->PushMessage(message); +} + +void DisplayApp::Register(Pinetime::System::SystemTask* systemTask) { + this->systemTask = systemTask; +} diff --git a/src/displayapp/DisplayApp.h b/src/displayapp/DisplayApp.h index 0c7bd216..65abd41a 100644 --- a/src/displayapp/DisplayApp.h +++ b/src/displayapp/DisplayApp.h @@ -4,6 +4,7 @@ #include #include #include +#include #include "Apps.h" #include "LittleVgl.h" #include "TouchEvents.h" @@ -49,7 +50,6 @@ namespace Pinetime { Controllers::Ble& bleController, Controllers::DateTime& dateTimeController, Drivers::WatchdogView& watchdog, - System::SystemTask& systemTask, Pinetime::Controllers::NotificationManager& notificationManager, Pinetime::Controllers::HeartRateController& heartRateController, Controllers::Settings& settingsController, @@ -64,6 +64,8 @@ namespace Pinetime { void SetFullRefresh(FullRefreshDirections direction); void SetTouchMode(TouchModes mode); + void Register(Pinetime::System::SystemTask* systemTask); + private: Pinetime::Drivers::St7789& lcd; Pinetime::Components::LittleVgl& lvgl; @@ -72,7 +74,7 @@ namespace Pinetime { Pinetime::Controllers::Ble& bleController; Pinetime::Controllers::DateTime& dateTimeController; Pinetime::Drivers::WatchdogView& watchdog; - Pinetime::System::SystemTask& systemTask; + Pinetime::System::SystemTask* systemTask = nullptr; Pinetime::Controllers::NotificationManager& notificationManager; Pinetime::Controllers::HeartRateController& heartRateController; Pinetime::Controllers::Settings& settingsController; @@ -108,6 +110,7 @@ namespace Pinetime { void Refresh(); void ReturnApp(Apps app, DisplayApp::FullRefreshDirections direction, TouchEvents touchEvent); void LoadApp(Apps app, DisplayApp::FullRefreshDirections direction); + void PushMessageToSystemTask(Pinetime::System::Messages message); }; } } diff --git a/src/displayapp/screens/FlashLight.cpp b/src/displayapp/screens/FlashLight.cpp index 4568db40..7db2c6c8 100644 --- a/src/displayapp/screens/FlashLight.cpp +++ b/src/displayapp/screens/FlashLight.cpp @@ -39,14 +39,14 @@ FlashLight::FlashLight(Pinetime::Applications::DisplayApp* app, backgroundAction->user_data = this; lv_obj_set_event_cb(backgroundAction, event_handler); - systemTask.PushMessage(Pinetime::System::SystemTask::Messages::DisableSleeping); + systemTask.PushMessage(Pinetime::System::Messages::DisableSleeping); } FlashLight::~FlashLight() { lv_obj_clean(lv_scr_act()); lv_obj_set_style_local_bg_color(lv_scr_act(), LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x000000)); brightness.Restore(); - systemTask.PushMessage(Pinetime::System::SystemTask::Messages::EnableSleeping); + systemTask.PushMessage(Pinetime::System::Messages::EnableSleeping); } void FlashLight::OnClickEvent(lv_obj_t* obj, lv_event_t event) { diff --git a/src/displayapp/screens/HeartRate.cpp b/src/displayapp/screens/HeartRate.cpp index 90f6bc26..5689b63e 100644 --- a/src/displayapp/screens/HeartRate.cpp +++ b/src/displayapp/screens/HeartRate.cpp @@ -63,12 +63,12 @@ HeartRate::HeartRate(Pinetime::Applications::DisplayApp* app, label_startStop = lv_label_create(btn_startStop, nullptr); UpdateStartStopButton(isHrRunning); if (isHrRunning) - systemTask.PushMessage(Pinetime::System::SystemTask::Messages::DisableSleeping); + systemTask.PushMessage(Pinetime::System::Messages::DisableSleeping); } HeartRate::~HeartRate() { lv_obj_clean(lv_scr_act()); - systemTask.PushMessage(Pinetime::System::SystemTask::Messages::EnableSleeping); + systemTask.PushMessage(Pinetime::System::Messages::EnableSleeping); } bool HeartRate::Refresh() { @@ -95,12 +95,12 @@ void HeartRate::OnStartStopEvent(lv_event_t event) { if (heartRateController.State() == Controllers::HeartRateController::States::Stopped) { heartRateController.Start(); UpdateStartStopButton(heartRateController.State() != Controllers::HeartRateController::States::Stopped); - systemTask.PushMessage(Pinetime::System::SystemTask::Messages::DisableSleeping); + systemTask.PushMessage(Pinetime::System::Messages::DisableSleeping); lv_obj_set_style_local_text_color(label_hr, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GREEN); } else { heartRateController.Stop(); UpdateStartStopButton(heartRateController.State() != Controllers::HeartRateController::States::Stopped); - systemTask.PushMessage(Pinetime::System::SystemTask::Messages::EnableSleeping); + systemTask.PushMessage(Pinetime::System::Messages::EnableSleeping); lv_obj_set_style_local_text_color(label_hr, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GRAY); } } diff --git a/src/displayapp/screens/ScreenList.h b/src/displayapp/screens/ScreenList.h index 73ea4610..ea66bfb2 100644 --- a/src/displayapp/screens/ScreenList.h +++ b/src/displayapp/screens/ScreenList.h @@ -15,12 +15,17 @@ namespace Pinetime { public: ScreenList(DisplayApp* app, uint8_t initScreen, - std::array()>, N>&& screens, + const std::array()>, N>&& screens, ScreenListModes mode) - : Screen(app), initScreen {initScreen}, screens {std::move(screens)}, mode {mode}, current {this->screens[initScreen]()} { - screenIndex = initScreen; + : Screen(app), initScreen {initScreen}, screens {std::move(screens)}, mode {mode}, screenIndex{initScreen}, current {this->screens[initScreen]()} { + } + ScreenList(const ScreenList&) = delete; + ScreenList& operator=(const ScreenList&) = delete; + ScreenList(ScreenList&&) = delete; + ScreenList& operator=(ScreenList&&) = delete; + ~ScreenList() override { lv_obj_clean(lv_scr_act()); } @@ -97,7 +102,7 @@ namespace Pinetime { private: uint8_t initScreen = 0; - std::array()>, N> screens; + const std::array()>, N> screens; ScreenListModes mode = ScreenListModes::UpDown; uint8_t screenIndex = 0; diff --git a/src/displayapp/screens/settings/QuickSettings.cpp b/src/displayapp/screens/settings/QuickSettings.cpp index 3994794d..5db7468c 100644 --- a/src/displayapp/screens/settings/QuickSettings.cpp +++ b/src/displayapp/screens/settings/QuickSettings.cpp @@ -7,12 +7,12 @@ using namespace Pinetime::Applications::Screens; namespace { static void ButtonEventHandler(lv_obj_t* obj, lv_event_t event) { - QuickSettings* screen = static_cast(obj->user_data); + auto* screen = static_cast(obj->user_data); screen->OnButtonEvent(obj, event); } static void lv_update_task(struct _lv_task_t* task) { - auto user_data = static_cast(task->user_data); + auto* user_data = static_cast(task->user_data); user_data->UpdateScreen(); } } diff --git a/src/drivers/Bma421.cpp b/src/drivers/Bma421.cpp index 925b66c7..35b2c105 100644 --- a/src/drivers/Bma421.cpp +++ b/src/drivers/Bma421.cpp @@ -103,8 +103,6 @@ Bma421::Values Bma421::Process() { uint8_t activity = 0; bma423_activity_output(&activity, &bma); - NRF_LOG_INFO("MOTION : %d - %d/%d/%d", steps, data.x, data.y, data.z); - // X and Y axis are swapped because of the way the sensor is mounted in the PineTime return {steps, data.y, data.x, data.z}; } diff --git a/src/drivers/SpiMaster.h b/src/drivers/SpiMaster.h index dfc195b7..5045369a 100644 --- a/src/drivers/SpiMaster.h +++ b/src/drivers/SpiMaster.h @@ -10,7 +10,6 @@ namespace Pinetime { namespace Drivers { class SpiMaster { public: - ; enum class SpiModule : uint8_t { SPI0, SPI1 }; enum class BitOrder : uint8_t { Msb_Lsb, Lsb_Msb }; enum class Modes : uint8_t { Mode0, Mode1, Mode2, Mode3 }; diff --git a/src/heartratetask/HeartRateTask.cpp b/src/heartratetask/HeartRateTask.cpp index 36c8cc18..1c21db71 100644 --- a/src/heartratetask/HeartRateTask.cpp +++ b/src/heartratetask/HeartRateTask.cpp @@ -6,7 +6,7 @@ using namespace Pinetime::Applications; HeartRateTask::HeartRateTask(Drivers::Hrs3300& heartRateSensor, Controllers::HeartRateController& controller) - : heartRateSensor {heartRateSensor}, controller {controller}, ppg {static_cast(heartRateSensor.ReadHrs())} { + : heartRateSensor {heartRateSensor}, controller {controller}, ppg{} { messageQueue = xQueueCreate(10, 1); controller.SetHeartRateTask(this); } diff --git a/src/main.cpp b/src/main.cpp index 61194b95..60ed058b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -34,6 +34,7 @@ #include "components/motor/MotorController.h" #include "components/datetime/DateTimeController.h" #include "components/settings/Settings.h" +#include "components/heartrate/HeartRateController.h" #include "drivers/Spi.h" #include "drivers/SpiMaster.h" #include "drivers/SpiNorFlash.h" @@ -50,8 +51,6 @@ Pinetime::Logging::NrfLogger logger; Pinetime::Logging::DummyLogger logger; #endif -#include - static constexpr uint8_t pinSpiSck = 2; static constexpr uint8_t pinSpiMosi = 3; static constexpr uint8_t pinSpiMiso = 4; @@ -108,15 +107,59 @@ void ble_manager_set_ble_connection_callback(void (*connection)()); void ble_manager_set_ble_disconnection_callback(void (*disconnection)()); static constexpr uint8_t pinTouchIrq = 28; static constexpr uint8_t pinPowerPresentIrq = 19; -std::unique_ptr systemTask; Pinetime::Controllers::Settings settingsController {spiNorFlash}; Pinetime::Controllers::MotorController motorController {settingsController}; +Pinetime::Controllers::HeartRateController heartRateController; +Pinetime::Applications::HeartRateTask heartRateApp(heartRateSensor, heartRateController); + +Pinetime::Controllers::DateTime dateTimeController; +Pinetime::Drivers::Watchdog watchdog; +Pinetime::Drivers::WatchdogView watchdogView(watchdog); +Pinetime::Controllers::NotificationManager notificationManager; +Pinetime::Controllers::MotionController motionController; +Pinetime::Controllers::TimerController timerController; + +Pinetime::Applications::DisplayApp displayApp(lcd, + lvgl, + touchPanel, + batteryController, + bleController, + dateTimeController, + watchdogView, + notificationManager, + heartRateController, + settingsController, + motorController, + motionController, + timerController); + +Pinetime::System::SystemTask systemTask(spi, + lcd, + spiNorFlash, + twiMaster, + touchPanel, + lvgl, + batteryController, + bleController, + dateTimeController, + timerController, + watchdog, + notificationManager, + motorController, + heartRateSensor, + motionController, + motionSensor, + settingsController, + heartRateController, + displayApp, + heartRateApp); + void nrfx_gpiote_evt_handler(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t action) { if (pin == pinTouchIrq) { - systemTask->OnTouchEvent(); + systemTask.OnTouchEvent(); return; } @@ -141,12 +184,12 @@ void vApplicationIdleHook(void) { void DebounceTimerChargeCallback(TimerHandle_t xTimer) { xTimerStop(xTimer, 0); - systemTask->PushMessage(Pinetime::System::SystemTask::Messages::OnChargingEvent); + systemTask.PushMessage(Pinetime::System::Messages::OnChargingEvent); } void DebounceTimerCallback(TimerHandle_t xTimer) { xTimerStop(xTimer, 0); - systemTask->OnButtonPushed(); + systemTask.OnButtonPushed(); } void SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler(void) { @@ -264,19 +307,7 @@ int main(void) { debounceTimer = xTimerCreate("debounceTimer", 200, pdFALSE, (void*) 0, DebounceTimerCallback); debounceChargeTimer = xTimerCreate("debounceTimerCharge", 200, pdFALSE, (void*) 0, DebounceTimerChargeCallback); - systemTask = std::make_unique(spi, - lcd, - spiNorFlash, - twiMaster, - touchPanel, - lvgl, - batteryController, - bleController, - motorController, - heartRateSensor, - motionSensor, - settingsController); - systemTask->Start(); + systemTask.Start(); nimble_port_init(); vTaskStartScheduler(); diff --git a/src/systemtask/Messages.h b/src/systemtask/Messages.h new file mode 100644 index 00000000..3a195e2d --- /dev/null +++ b/src/systemtask/Messages.h @@ -0,0 +1,26 @@ +#pragma once + +namespace Pinetime { + namespace System { + enum class Messages { + GoToSleep, + GoToRunning, + TouchWakeUp, + OnNewTime, + OnNewNotification, + OnTimerDone, + OnNewCall, + BleConnected, + UpdateTimeOut, + BleFirmwareUpdateStarted, + BleFirmwareUpdateFinished, + OnTouchEvent, + OnButtonEvent, + OnDisplayTaskSleeping, + EnableSleeping, + DisableSleeping, + OnNewDay, + OnChargingEvent + }; + } +} diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index 58377764..be484bb4 100644 --- a/src/systemtask/SystemTask.cpp +++ b/src/systemtask/SystemTask.cpp @@ -42,10 +42,18 @@ SystemTask::SystemTask(Drivers::SpiMaster& spi, Components::LittleVgl& lvgl, Controllers::Battery& batteryController, Controllers::Ble& bleController, + Controllers::DateTime& dateTimeController, + Controllers::TimerController& timerController, + Drivers::Watchdog& watchdog, + Pinetime::Controllers::NotificationManager& notificationManager, Pinetime::Controllers::MotorController& motorController, Pinetime::Drivers::Hrs3300& heartRateSensor, + Pinetime::Controllers::MotionController& motionController, Pinetime::Drivers::Bma421& motionSensor, - Controllers::Settings& settingsController) + Controllers::Settings& settingsController, + Pinetime::Controllers::HeartRateController& heartRateController, + Pinetime::Applications::DisplayApp& displayApp, + Pinetime::Applications::HeartRateTask& heartRateApp) : spi {spi}, lcd {lcd}, spiNorFlash {spiNorFlash}, @@ -53,17 +61,20 @@ SystemTask::SystemTask(Drivers::SpiMaster& spi, touchPanel {touchPanel}, lvgl {lvgl}, batteryController {batteryController}, - heartRateController {*this}, bleController {bleController}, - dateTimeController {*this}, - timerController {*this}, - watchdog {}, - watchdogView {watchdog}, + dateTimeController {dateTimeController}, + timerController {timerController}, + watchdog {watchdog}, + notificationManager{notificationManager}, motorController {motorController}, heartRateSensor {heartRateSensor}, motionSensor {motionSensor}, settingsController {settingsController}, - nimbleController(*this, bleController, dateTimeController, notificationManager, batteryController, spiNorFlash, heartRateController) { + heartRateController{heartRateController}, + nimbleController(*this, bleController, dateTimeController, notificationManager, batteryController, spiNorFlash, heartRateController), + motionController{motionController}, + displayApp{displayApp}, + heartRateApp(heartRateApp) { systemTasksMsgQueue = xQueueCreate(10, 1); } @@ -96,9 +107,11 @@ void SystemTask::Work() { twiMaster.Init(); touchPanel.Init(); + dateTimeController.Register(this); batteryController.Init(); motorController.Init(); motionSensor.SoftReset(); + timerController.Register(this); timerController.Init(); // Reset the TWI device because the motion sensor chip most probably crashed it... @@ -108,28 +121,14 @@ void SystemTask::Work() { motionSensor.Init(); settingsController.Init(); - displayApp = std::make_unique(lcd, - lvgl, - touchPanel, - batteryController, - bleController, - dateTimeController, - watchdogView, - *this, - notificationManager, - heartRateController, - settingsController, - motorController, - motionController, - timerController); - displayApp->Start(); - - displayApp->PushMessage(Pinetime::Applications::Display::Messages::UpdateBatteryLevel); + displayApp.Register(this); + displayApp.Start(); + + displayApp.PushMessage(Pinetime::Applications::Display::Messages::UpdateBatteryLevel); heartRateSensor.Init(); heartRateSensor.Disable(); - heartRateApp = std::make_unique(heartRateSensor, heartRateController); - heartRateApp->Start(); + heartRateApp.Start(); nrf_gpio_cfg_sense_input(pinButton, (nrf_gpio_pin_pull_t) GPIO_PIN_CNF_PULL_Pulldown, (nrf_gpio_pin_sense_t) GPIO_PIN_CNF_SENSE_High); nrf_gpio_cfg_output(15); @@ -208,9 +207,9 @@ void SystemTask::Work() { spiNorFlash.Wakeup(); lcd.Wakeup(); - displayApp->PushMessage(Pinetime::Applications::Display::Messages::GoToRunning); - displayApp->PushMessage(Pinetime::Applications::Display::Messages::UpdateBatteryLevel); - heartRateApp->PushMessage(Pinetime::Applications::HeartRateTask::Messages::WakeUp); + displayApp.PushMessage(Pinetime::Applications::Display::Messages::GoToRunning); + displayApp.PushMessage(Pinetime::Applications::Display::Messages::UpdateBatteryLevel); + heartRateApp.PushMessage(Pinetime::Applications::HeartRateTask::Messages::WakeUp); isSleeping = false; isWakingUp = false; @@ -230,26 +229,26 @@ void SystemTask::Work() { isGoingToSleep = true; NRF_LOG_INFO("[systemtask] Going to sleep"); xTimerStop(idleTimer, 0); - displayApp->PushMessage(Pinetime::Applications::Display::Messages::GoToSleep); - heartRateApp->PushMessage(Pinetime::Applications::HeartRateTask::Messages::GoToSleep); + displayApp.PushMessage(Pinetime::Applications::Display::Messages::GoToSleep); + heartRateApp.PushMessage(Pinetime::Applications::HeartRateTask::Messages::GoToSleep); break; case Messages::OnNewTime: ReloadIdleTimer(); - displayApp->PushMessage(Pinetime::Applications::Display::Messages::UpdateDateTime); + displayApp.PushMessage(Pinetime::Applications::Display::Messages::UpdateDateTime); break; case Messages::OnNewNotification: if (isSleeping && !isWakingUp) { GoToRunning(); } motorController.SetDuration(35); - displayApp->PushMessage(Pinetime::Applications::Display::Messages::NewNotification); + displayApp.PushMessage(Pinetime::Applications::Display::Messages::NewNotification); break; case Messages::OnTimerDone: if (isSleeping && !isWakingUp) { GoToRunning(); } motorController.SetDuration(35); - displayApp->PushMessage(Pinetime::Applications::Display::Messages::TimerDone); + displayApp.PushMessage(Pinetime::Applications::Display::Messages::TimerDone); break; case Messages::BleConnected: ReloadIdleTimer(); @@ -260,7 +259,7 @@ void SystemTask::Work() { doNotGoToSleep = true; if (isSleeping && !isWakingUp) GoToRunning(); - displayApp->PushMessage(Pinetime::Applications::Display::Messages::BleFirmwareUpdateStarted); + displayApp.PushMessage(Pinetime::Applications::Display::Messages::BleFirmwareUpdateStarted); break; case Messages::BleFirmwareUpdateFinished: doNotGoToSleep = false; @@ -359,7 +358,7 @@ void SystemTask::OnButtonPushed() { if (!isSleeping) { NRF_LOG_INFO("[systemtask] Button pushed"); PushMessage(Messages::OnButtonEvent); - displayApp->PushMessage(Pinetime::Applications::Display::Messages::ButtonPushed); + displayApp.PushMessage(Pinetime::Applications::Display::Messages::ButtonPushed); } else { if (!isWakingUp) { NRF_LOG_INFO("[systemtask] Button pushed, waking up"); @@ -380,7 +379,7 @@ void SystemTask::OnTouchEvent() { return; if (!isSleeping) { PushMessage(Messages::OnTouchEvent); - displayApp->PushMessage(Pinetime::Applications::Display::Messages::TouchEvent); + displayApp.PushMessage(Pinetime::Applications::Display::Messages::TouchEvent); } else if (!isWakingUp) { if (settingsController.getWakeUpMode() == Pinetime::Controllers::Settings::WakeUpMode::None or settingsController.getWakeUpMode() == Pinetime::Controllers::Settings::WakeUpMode::RaiseWrist) @@ -389,7 +388,7 @@ void SystemTask::OnTouchEvent() { } } -void SystemTask::PushMessage(SystemTask::Messages msg) { +void SystemTask::PushMessage(System::Messages msg) { if (msg == Messages::GoToSleep) { isGoingToSleep = true; } diff --git a/src/systemtask/SystemTask.h b/src/systemtask/SystemTask.h index ea41a69d..fa6a949c 100644 --- a/src/systemtask/SystemTask.h +++ b/src/systemtask/SystemTask.h @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include @@ -27,6 +26,7 @@ #endif #include "drivers/Watchdog.h" +#include "Messages.h" namespace Pinetime { namespace Drivers { @@ -40,27 +40,6 @@ namespace Pinetime { namespace System { class SystemTask { public: - enum class Messages { - GoToSleep, - GoToRunning, - TouchWakeUp, - OnNewTime, - OnNewNotification, - OnTimerDone, - OnNewCall, - BleConnected, - UpdateTimeOut, - BleFirmwareUpdateStarted, - BleFirmwareUpdateFinished, - OnTouchEvent, - OnButtonEvent, - OnDisplayTaskSleeping, - EnableSleeping, - DisableSleeping, - OnNewDay, - OnChargingEvent - }; - SystemTask(Drivers::SpiMaster& spi, Drivers::St7789& lcd, Pinetime::Drivers::SpiNorFlash& spiNorFlash, @@ -69,10 +48,18 @@ namespace Pinetime { Components::LittleVgl& lvgl, Controllers::Battery& batteryController, Controllers::Ble& bleController, + Controllers::DateTime& dateTimeController, + Controllers::TimerController& timerController, + Drivers::Watchdog& watchdog, + Pinetime::Controllers::NotificationManager& notificationManager, Pinetime::Controllers::MotorController& motorController, Pinetime::Drivers::Hrs3300& heartRateSensor, + Pinetime::Controllers::MotionController& motionController, Pinetime::Drivers::Bma421& motionSensor, - Controllers::Settings& settingsController); + Controllers::Settings& settingsController, + Pinetime::Controllers::HeartRateController& heartRateController, + Pinetime::Applications::DisplayApp& displayApp, + Pinetime::Applications::HeartRateTask& heartRateApp); void Start(); void PushMessage(Messages msg); @@ -96,27 +83,29 @@ namespace Pinetime { Pinetime::Drivers::Cst816S& touchPanel; Pinetime::Components::LittleVgl& lvgl; Pinetime::Controllers::Battery& batteryController; - std::unique_ptr displayApp; - Pinetime::Controllers::HeartRateController heartRateController; - std::unique_ptr heartRateApp; + Pinetime::Controllers::Ble& bleController; - Pinetime::Controllers::DateTime dateTimeController; - Pinetime::Controllers::TimerController timerController; + Pinetime::Controllers::DateTime& dateTimeController; + Pinetime::Controllers::TimerController& timerController; QueueHandle_t systemTasksMsgQueue; std::atomic isSleeping {false}; std::atomic isGoingToSleep {false}; std::atomic isWakingUp {false}; - Pinetime::Drivers::Watchdog watchdog; - Pinetime::Drivers::WatchdogView watchdogView; - Pinetime::Controllers::NotificationManager notificationManager; + Pinetime::Drivers::Watchdog& watchdog; + Pinetime::Controllers::NotificationManager& notificationManager; Pinetime::Controllers::MotorController& motorController; Pinetime::Drivers::Hrs3300& heartRateSensor; Pinetime::Drivers::Bma421& motionSensor; Pinetime::Controllers::Settings& settingsController; + Pinetime::Controllers::HeartRateController& heartRateController; Pinetime::Controllers::NimbleController nimbleController; Controllers::BrightnessController brightnessController; - Pinetime::Controllers::MotionController motionController; + Pinetime::Controllers::MotionController& motionController; + + Pinetime::Applications::DisplayApp& displayApp; + Pinetime::Applications::HeartRateTask& heartRateApp; + static constexpr uint8_t pinSpiSck = 2; static constexpr uint8_t pinSpiMosi = 3; -- cgit v1.2.3-70-g09d2 From ff00873f974cb1400acf7721251167634e60107a Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Sun, 6 Jun 2021 20:20:55 +0200 Subject: Fix build for recovery firmware. --- src/displayapp/DisplayAppRecovery.cpp | 7 +++++-- src/displayapp/DisplayAppRecovery.h | 2 +- src/main.cpp | 1 - 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/displayapp/DisplayAppRecovery.cpp b/src/displayapp/DisplayAppRecovery.cpp index 856eafd8..b73d0a85 100644 --- a/src/displayapp/DisplayAppRecovery.cpp +++ b/src/displayapp/DisplayAppRecovery.cpp @@ -14,7 +14,6 @@ DisplayApp::DisplayApp(Drivers::St7789& lcd, Controllers::Ble& bleController, Controllers::DateTime& dateTimeController, Drivers::WatchdogView& watchdog, - System::SystemTask& systemTask, Pinetime::Controllers::NotificationManager& notificationManager, Pinetime::Controllers::HeartRateController& heartRateController, Controllers::Settings& settingsController, @@ -113,4 +112,8 @@ void DisplayApp::PushMessage(Display::Messages msg) { /* Actual macro used here is port specific. */ // TODO : should I do something here? } -} \ No newline at end of file +} + +void DisplayApp::Register(Pinetime::System::SystemTask* systemTask) { + +} diff --git a/src/displayapp/DisplayAppRecovery.h b/src/displayapp/DisplayAppRecovery.h index 2c5a36fb..638c0071 100644 --- a/src/displayapp/DisplayAppRecovery.h +++ b/src/displayapp/DisplayAppRecovery.h @@ -39,7 +39,6 @@ namespace Pinetime { Controllers::Ble& bleController, Controllers::DateTime& dateTimeController, Drivers::WatchdogView& watchdog, - System::SystemTask& systemTask, Pinetime::Controllers::NotificationManager& notificationManager, Pinetime::Controllers::HeartRateController& heartRateController, Controllers::Settings& settingsController, @@ -48,6 +47,7 @@ namespace Pinetime { Pinetime::Controllers::TimerController& timerController); void Start(); void PushMessage(Pinetime::Applications::Display::Messages msg); + void Register(Pinetime::System::SystemTask* systemTask); private: TaskHandle_t taskHandle; diff --git a/src/main.cpp b/src/main.cpp index 60ed058b..52ec9580 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -33,7 +33,6 @@ #include "components/ble/NotificationManager.h" #include "components/motor/MotorController.h" #include "components/datetime/DateTimeController.h" -#include "components/settings/Settings.h" #include "components/heartrate/HeartRateController.h" #include "drivers/Spi.h" #include "drivers/SpiMaster.h" -- cgit v1.2.3-70-g09d2 From caca6a5cff0025df80241a09baab28e49720ddf8 Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Thu, 10 Jun 2021 21:19:11 +0200 Subject: Fix stack corruption when exiting an app (the app was destroyed while it was executing the button handler). --- src/displayapp/DisplayApp.cpp | 8 +++++++- src/displayapp/DisplayApp.h | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index ba6dfbd2..99758c92 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -205,6 +205,11 @@ void DisplayApp::Refresh() { } } + if(nextApp != Apps::None) { + LoadApp(nextApp, nextDirection); + nextApp = Apps::None; + } + if (state != States::Idle && touchMode == TouchModes::Polling) { auto info = touchPanel.GetTouchInfo(); if (info.action == 2) { // 2 = contact @@ -223,7 +228,8 @@ void DisplayApp::RunningState() { } void DisplayApp::StartApp(Apps app, DisplayApp::FullRefreshDirections direction) { - LoadApp(app, direction); + nextApp = app; + nextDirection = direction; } void DisplayApp::ReturnApp(Apps app, DisplayApp::FullRefreshDirections direction, TouchEvents touchEvent) { diff --git a/src/displayapp/DisplayApp.h b/src/displayapp/DisplayApp.h index 65abd41a..73a7cc36 100644 --- a/src/displayapp/DisplayApp.h +++ b/src/displayapp/DisplayApp.h @@ -111,6 +111,9 @@ namespace Pinetime { void ReturnApp(Apps app, DisplayApp::FullRefreshDirections direction, TouchEvents touchEvent); void LoadApp(Apps app, DisplayApp::FullRefreshDirections direction); void PushMessageToSystemTask(Pinetime::System::Messages message); + + Apps nextApp = Apps::None; + DisplayApp::FullRefreshDirections nextDirection; }; } } -- cgit v1.2.3-70-g09d2 From b1925ff28638dd4b8400c4d0c49d796d8990b1af Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Thu, 10 Jun 2021 21:20:27 +0200 Subject: Minor improvements: use std::make_unique when creating unique_ptr, check the code is running from an IRQ before calling xQueueSendFromISR or xQueueSend) --- src/displayapp/DisplayApp.cpp | 21 +++++++++++++++------ src/displayapp/screens/SystemInfo.cpp | 10 +++++----- src/displayapp/screens/settings/Settings.cpp | 4 ++-- src/displayapp/screens/settings/Settings.h | 1 - src/drivers/SpiMaster.cpp | 8 ++++---- src/systemtask/SystemTask.cpp | 24 ++++++++++++++++++------ 6 files changed, 44 insertions(+), 24 deletions(-) diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index 99758c92..3bfaf2a2 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -45,6 +45,12 @@ using namespace Pinetime::Applications; using namespace Pinetime::Applications::Display; +namespace { + static inline bool in_isr(void) { + return (SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) != 0; + } +} + DisplayApp::DisplayApp(Drivers::St7789& lcd, Components::LittleVgl& lvgl, Drivers::Cst816S& touchPanel, @@ -364,12 +370,15 @@ void DisplayApp::IdleState() { } void DisplayApp::PushMessage(Messages msg) { - BaseType_t xHigherPriorityTaskWoken; - xHigherPriorityTaskWoken = pdFALSE; - xQueueSendFromISR(msgQueue, &msg, &xHigherPriorityTaskWoken); - if (xHigherPriorityTaskWoken) { - /* Actual macro used here is port specific. */ - // TODO : should I do something here? + if(in_isr()) { + BaseType_t xHigherPriorityTaskWoken; + xHigherPriorityTaskWoken = pdFALSE; + xQueueSendFromISR(msgQueue, &msg, &xHigherPriorityTaskWoken); + if (xHigherPriorityTaskWoken) { + portYIELD_FROM_ISR(xHigherPriorityTaskWoken); + } + } else { + xQueueSend(msgQueue, &msg, portMAX_DELAY); } } diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp index f61d2ff1..a7387dac 100644 --- a/src/displayapp/screens/SystemInfo.cpp +++ b/src/displayapp/screens/SystemInfo.cpp @@ -81,7 +81,7 @@ std::unique_ptr SystemInfo::CreateScreen1() { __TIME__); lv_label_set_align(label, LV_LABEL_ALIGN_CENTER); lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0); - return std::unique_ptr(new Screens::Label(0, 5, app, label)); + return std::make_unique(0, 5, app, label); } std::unique_ptr SystemInfo::CreateScreen2() { @@ -161,7 +161,7 @@ std::unique_ptr SystemInfo::CreateScreen2() { brightnessController.ToString(), resetReason); lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0); - return std::unique_ptr(new Screens::Label(1, 4, app, label)); + return std::make_unique(1, 4, app, label); } std::unique_ptr SystemInfo::CreateScreen3() { @@ -195,7 +195,7 @@ std::unique_ptr SystemInfo::CreateScreen3() { (int) mon.free_biggest_size, 0); lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0); - return std::unique_ptr(new Screens::Label(2, 5, app, label)); + return std::make_unique(2, 5, app, label); } bool sortById(const TaskStatus_t& lhs, const TaskStatus_t& rhs) { @@ -229,7 +229,7 @@ std::unique_ptr SystemInfo::CreateScreen4() { lv_table_set_cell_value(infoTask, i + 1, 2, std::to_string(tasksStatus[i].usStackHighWaterMark).c_str()); } } - return std::unique_ptr(new Screens::Label(3, 5, app, infoTask)); + return std::make_unique(3, 5, app, infoTask); } std::unique_ptr SystemInfo::CreateScreen5() { @@ -245,5 +245,5 @@ std::unique_ptr SystemInfo::CreateScreen5() { "#FFFF00 JF002/InfiniTime#"); lv_label_set_align(label, LV_LABEL_ALIGN_CENTER); lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0); - return std::unique_ptr(new Screens::Label(4, 5, app, label)); + return std::make_unique(4, 5, app, label); } diff --git a/src/displayapp/screens/settings/Settings.cpp b/src/displayapp/screens/settings/Settings.cpp index 2c72c832..e63a3584 100644 --- a/src/displayapp/screens/settings/Settings.cpp +++ b/src/displayapp/screens/settings/Settings.cpp @@ -46,7 +46,7 @@ std::unique_ptr Settings::CreateScreen1() { {Symbols::clock, "Watch face", Apps::SettingWatchFace}, }}; - return std::unique_ptr(new Screens::List(0, 2, app, settingsController, applications)); + return std::make_unique(0, 2, app, settingsController, applications); } std::unique_ptr Settings::CreateScreen2() { @@ -58,5 +58,5 @@ std::unique_ptr Settings::CreateScreen2() { {Symbols::list, "About", Apps::SysInfo}, }}; - return std::unique_ptr(new Screens::List(1, 2, app, settingsController, applications)); + return std::make_unique(1, 2, app, settingsController, applications); } diff --git a/src/displayapp/screens/settings/Settings.h b/src/displayapp/screens/settings/Settings.h index 7e332dfe..711a6be6 100644 --- a/src/displayapp/screens/settings/Settings.h +++ b/src/displayapp/screens/settings/Settings.h @@ -16,7 +16,6 @@ namespace Pinetime { bool Refresh() override; - void OnButtonEvent(lv_obj_t* object, lv_event_t event); bool OnTouchEvent(Pinetime::Applications::TouchEvents event) override; private: diff --git a/src/drivers/SpiMaster.cpp b/src/drivers/SpiMaster.cpp index 34fcc08a..e2be5027 100644 --- a/src/drivers/SpiMaster.cpp +++ b/src/drivers/SpiMaster.cpp @@ -132,17 +132,17 @@ void SpiMaster::OnEndEvent() { spiBaseAddress->TASKS_START = 1; } else { + BaseType_t xHigherPriorityTaskWoken = pdFALSE; if (taskToNotify != nullptr) { - BaseType_t xHigherPriorityTaskWoken = pdFALSE; vTaskNotifyGiveFromISR(taskToNotify, &xHigherPriorityTaskWoken); portYIELD_FROM_ISR(xHigherPriorityTaskWoken); } nrf_gpio_pin_set(this->pinCsn); currentBufferAddr = 0; - BaseType_t xHigherPriorityTaskWoken = pdFALSE; - xSemaphoreGiveFromISR(mutex, &xHigherPriorityTaskWoken); - portYIELD_FROM_ISR(xHigherPriorityTaskWoken); + BaseType_t xHigherPriorityTaskWoken2 = pdFALSE; + xSemaphoreGiveFromISR(mutex, &xHigherPriorityTaskWoken2); + portYIELD_FROM_ISR(xHigherPriorityTaskWoken | xHigherPriorityTaskWoken2); } } diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index be484bb4..4799624a 100644 --- a/src/systemtask/SystemTask.cpp +++ b/src/systemtask/SystemTask.cpp @@ -27,6 +27,12 @@ using namespace Pinetime::System; +namespace { + static inline bool in_isr(void) { + return (SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) != 0; + } +} + void IdleTimerCallback(TimerHandle_t xTimer) { NRF_LOG_INFO("IdleTimerCallback"); @@ -392,12 +398,18 @@ void SystemTask::PushMessage(System::Messages msg) { if (msg == Messages::GoToSleep) { isGoingToSleep = true; } - BaseType_t xHigherPriorityTaskWoken; - xHigherPriorityTaskWoken = pdFALSE; - xQueueSendFromISR(systemTasksMsgQueue, &msg, &xHigherPriorityTaskWoken); - if (xHigherPriorityTaskWoken) { - /* Actual macro used here is port specific. */ - // TODO: should I do something here? + + if(in_isr()) { + BaseType_t xHigherPriorityTaskWoken; + xHigherPriorityTaskWoken = pdFALSE; + xQueueSendFromISR(systemTasksMsgQueue, &msg, &xHigherPriorityTaskWoken); + if (xHigherPriorityTaskWoken) { + /* Actual macro used here is port specific. */ + portYIELD_FROM_ISR(xHigherPriorityTaskWoken); + + } + } else { + xQueueSend(systemTasksMsgQueue, &msg, portMAX_DELAY); } } -- cgit v1.2.3-70-g09d2 From 049174bd3535d980a2744cbf035e1e33d33b5e39 Mon Sep 17 00:00:00 2001 From: Florian Date: Fri, 11 Jun 2021 01:15:32 +0200 Subject: replace ScreenList with a single screen in Clock. This removes the tap to switch feature --- src/displayapp/screens/Clock.cpp | 39 +++++++++++++++++++++------------------ src/displayapp/screens/Clock.h | 4 ++-- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/src/displayapp/screens/Clock.cpp b/src/displayapp/screens/Clock.cpp index 14299840..9962a9f4 100644 --- a/src/displayapp/screens/Clock.cpp +++ b/src/displayapp/screens/Clock.cpp @@ -32,22 +32,25 @@ Clock::Clock(DisplayApp* app, notificatioManager {notificatioManager}, settingsController {settingsController}, heartRateController {heartRateController}, - motionController {motionController}, - screens {app, - settingsController.GetClockFace(), - { - [this]() -> std::unique_ptr { - return WatchFaceDigitalScreen(); - }, - [this]() -> std::unique_ptr { - return WatchFaceAnalogScreen(); - }, - // Examples for more watch faces - //[this]() -> std::unique_ptr { return WatchFaceMinimalScreen(); }, - //[this]() -> std::unique_ptr { return WatchFaceCustomScreen(); } - }, - Screens::ScreenListModes::LongPress} { - + motionController {motionController} { + + switch (settingsController.GetClockFace()) { + case 0: + screen = WatchFaceDigitalScreen(); + break; + case 1: + screen = WatchFaceAnalogScreen(); + break; + /* + // Examples for more watch faces + case 2: + screen = WatchFaceMinimalScreen(); + break; + case 3: + screen = WatchFaceCustomScreen(); + break; + */ + } settingsController.SetAppMenu(0); } @@ -56,12 +59,12 @@ Clock::~Clock() { } bool Clock::Refresh() { - screens.Refresh(); + screen->Refresh(); return running; } bool Clock::OnTouchEvent(Pinetime::Applications::TouchEvents event) { - return screens.OnTouchEvent(event); + return screen->OnTouchEvent(event); } std::unique_ptr Clock::WatchFaceDigitalScreen() { diff --git a/src/displayapp/screens/Clock.h b/src/displayapp/screens/Clock.h index 9879985f..174c73b7 100644 --- a/src/displayapp/screens/Clock.h +++ b/src/displayapp/screens/Clock.h @@ -4,8 +4,8 @@ #include #include #include +#include #include "Screen.h" -#include "ScreenList.h" #include "components/datetime/DateTimeController.h" namespace Pinetime { @@ -47,7 +47,7 @@ namespace Pinetime { Controllers::HeartRateController& heartRateController; Controllers::MotionController& motionController; - ScreenList<2> screens; + std::unique_ptr screen; std::unique_ptr WatchFaceDigitalScreen(); std::unique_ptr WatchFaceAnalogScreen(); -- cgit v1.2.3-70-g09d2 From 123c6f19176c5e86ff040eb4b059cbe1b4876ba5 Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Fri, 11 Jun 2021 13:26:28 +0300 Subject: Fix touchevent tap --- src/displayapp/DisplayApp.cpp | 11 +++++------ src/displayapp/DisplayApp.h | 2 +- src/displayapp/screens/settings/QuickSettings.cpp | 9 +-------- 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index 7b03d569..c8e5d2e8 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -162,7 +162,8 @@ void DisplayApp::Refresh() { case Messages::TouchEvent: { if (state != States::Running) break; - auto gesture = OnTouchEvent(); + auto info = touchPanel.GetTouchInfo(); + auto gesture = OnTouchEvent(info); if (!currentScreen->OnTouchEvent(gesture)) { if (currentApp == Apps::Clock) { switch (gesture) { @@ -183,6 +184,8 @@ void DisplayApp::Refresh() { } } else if (returnTouchEvent == gesture) { LoadApp(returnToApp, returnDirection); + } else if (touchMode == TouchModes::Gestures) { + lvgl.SetNewTapEvent(info.x, info.y); } } } break; @@ -368,14 +371,10 @@ void DisplayApp::PushMessage(Messages msg) { } } -TouchEvents DisplayApp::OnTouchEvent() { - auto info = touchPanel.GetTouchInfo(); +TouchEvents DisplayApp::OnTouchEvent(Pinetime::Drivers::Cst816S::TouchInfos info) { if (info.isTouch) { switch (info.gesture) { case Pinetime::Drivers::Cst816S::Gestures::SingleTap: - if (touchMode == TouchModes::Gestures) { - lvgl.SetNewTapEvent(info.x, info.y); - } return TouchEvents::Tap; case Pinetime::Drivers::Cst816S::Gestures::LongPress: return TouchEvents::LongTap; diff --git a/src/displayapp/DisplayApp.h b/src/displayapp/DisplayApp.h index 0c7bd216..14cd7ad5 100644 --- a/src/displayapp/DisplayApp.h +++ b/src/displayapp/DisplayApp.h @@ -100,7 +100,7 @@ namespace Pinetime { TouchModes touchMode = TouchModes::Gestures; - TouchEvents OnTouchEvent(); + TouchEvents OnTouchEvent(Pinetime::Drivers::Cst816S::TouchInfos); void RunningState(); void IdleState(); static void Process(void* instance); diff --git a/src/displayapp/screens/settings/QuickSettings.cpp b/src/displayapp/screens/settings/QuickSettings.cpp index 3994794d..20d2cd22 100644 --- a/src/displayapp/screens/settings/QuickSettings.cpp +++ b/src/displayapp/screens/settings/QuickSettings.cpp @@ -155,14 +155,7 @@ void QuickSettings::OnButtonEvent(lv_obj_t* object, lv_event_t event) { } bool QuickSettings::OnTouchEvent(Pinetime::Applications::TouchEvents event) { - switch (event) { - case Pinetime::Applications::TouchEvents::SwipeLeft: - running = false; - return false; - - default: - return true; - } + return false; } bool QuickSettings::Refresh() { -- cgit v1.2.3-70-g09d2 From 21b6f85140f0424b9e6c8371db7e190dd0303182 Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Fri, 11 Jun 2021 14:46:03 +0300 Subject: Fix regression --- src/displayapp/DisplayApp.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index c8e5d2e8..b45822de 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -185,7 +185,9 @@ void DisplayApp::Refresh() { } else if (returnTouchEvent == gesture) { LoadApp(returnToApp, returnDirection); } else if (touchMode == TouchModes::Gestures) { - lvgl.SetNewTapEvent(info.x, info.y); + if (gesture == TouchEvents::Tap) { + lvgl.SetNewTapEvent(info.x, info.y); + } } } } break; -- cgit v1.2.3-70-g09d2 From 239b5547eae64d05f5d7544f0e11bfb877a75a02 Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Fri, 11 Jun 2021 14:55:37 +0300 Subject: Fix another regression --- src/displayapp/screens/FlashLight.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/displayapp/screens/FlashLight.cpp b/src/displayapp/screens/FlashLight.cpp index 4568db40..8d647a36 100644 --- a/src/displayapp/screens/FlashLight.cpp +++ b/src/displayapp/screens/FlashLight.cpp @@ -70,5 +70,5 @@ bool FlashLight::Refresh() { } bool FlashLight::OnTouchEvent(Pinetime::Applications::TouchEvents event) { - return true; + return false; } -- cgit v1.2.3-70-g09d2 From 6d524ebea2c97e309633d5e01c3a1e37c182f27d Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Sat, 12 Jun 2021 10:58:28 +0200 Subject: Move most of the code from the constructor of the objects statically initialized in main() into Start()/Init() functions to avoid Static Initialization Order Fiasco (https://en.cppreference.com/w/cpp/language/siof). See https://github.com/JF002/InfiniTime/pull/415#issuecomment-859004238. --- src/displayapp/DisplayApp.cpp | 6 ++++-- src/displayapp/DisplayAppRecovery.cpp | 3 ++- src/displayapp/LittleVgl.cpp | 4 ++++ src/displayapp/LittleVgl.h | 2 ++ src/drivers/SpiMaster.cpp | 7 +++++-- src/drivers/SpiMaster.h | 2 +- src/drivers/TwiMaster.cpp | 4 +++- src/drivers/TwiMaster.h | 2 +- src/heartratetask/HeartRateTask.cpp | 5 +++-- src/main.cpp | 2 ++ src/systemtask/SystemTask.cpp | 3 ++- 11 files changed, 29 insertions(+), 11 deletions(-) diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index 3bfaf2a2..05f171be 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -77,12 +77,14 @@ DisplayApp::DisplayApp(Drivers::St7789& lcd, motorController {motorController}, motionController {motionController}, timerController {timerController} { +} + +void DisplayApp::Start() { msgQueue = xQueueCreate(queueSize, itemSize); + // Start clock when smartwatch boots LoadApp(Apps::Clock, DisplayApp::FullRefreshDirections::None); -} -void DisplayApp::Start() { if (pdPASS != xTaskCreate(DisplayApp::Process, "displayapp", 800, this, 0, &taskHandle)) { APP_ERROR_HANDLER(NRF_ERROR_NO_MEM); } diff --git a/src/displayapp/DisplayAppRecovery.cpp b/src/displayapp/DisplayAppRecovery.cpp index b73d0a85..fd517b11 100644 --- a/src/displayapp/DisplayAppRecovery.cpp +++ b/src/displayapp/DisplayAppRecovery.cpp @@ -21,10 +21,11 @@ DisplayApp::DisplayApp(Drivers::St7789& lcd, Pinetime::Controllers::MotionController& motionController, Pinetime::Controllers::TimerController& timerController) : lcd {lcd}, bleController {bleController} { - msgQueue = xQueueCreate(queueSize, itemSize); + } void DisplayApp::Start() { + msgQueue = xQueueCreate(queueSize, itemSize); if (pdPASS != xTaskCreate(DisplayApp::Process, "displayapp", 512, this, 0, &taskHandle)) APP_ERROR_HANDLER(NRF_ERROR_NO_MEM); } diff --git a/src/displayapp/LittleVgl.cpp b/src/displayapp/LittleVgl.cpp index 36df51b4..c069afa2 100644 --- a/src/displayapp/LittleVgl.cpp +++ b/src/displayapp/LittleVgl.cpp @@ -23,6 +23,10 @@ bool touchpad_read(lv_indev_drv_t* indev_drv, lv_indev_data_t* data) { LittleVgl::LittleVgl(Pinetime::Drivers::St7789& lcd, Pinetime::Drivers::Cst816S& touchPanel) : lcd {lcd}, touchPanel {touchPanel}, previousClick {0, 0} { + +} + +void LittleVgl::Init() { lv_init(); InitTheme(); InitDisplay(); diff --git a/src/displayapp/LittleVgl.h b/src/displayapp/LittleVgl.h index 7f7b76e0..41f934a7 100644 --- a/src/displayapp/LittleVgl.h +++ b/src/displayapp/LittleVgl.h @@ -19,6 +19,8 @@ namespace Pinetime { LittleVgl(LittleVgl&&) = delete; LittleVgl& operator=(LittleVgl&&) = delete; + void Init(); + void FlushDisplay(const lv_area_t* area, lv_color_t* color_p); bool GetTouchPadInfo(lv_indev_data_t* ptr); void SetFullRefresh(FullRefreshDirections direction); diff --git a/src/drivers/SpiMaster.cpp b/src/drivers/SpiMaster.cpp index e2be5027..0d5bb83c 100644 --- a/src/drivers/SpiMaster.cpp +++ b/src/drivers/SpiMaster.cpp @@ -7,11 +7,14 @@ using namespace Pinetime::Drivers; SpiMaster::SpiMaster(const SpiMaster::SpiModule spi, const SpiMaster::Parameters& params) : spi {spi}, params {params} { - mutex = xSemaphoreCreateBinary(); - ASSERT(mutex != NULL); } bool SpiMaster::Init() { + if(mutex == nullptr) { + mutex = xSemaphoreCreateBinary(); + ASSERT(mutex != nullptr); + } + /* Configure GPIO pins used for pselsck, pselmosi, pselmiso and pselss for SPI0 */ nrf_gpio_pin_set(params.pinSCK); nrf_gpio_cfg_output(params.pinSCK); diff --git a/src/drivers/SpiMaster.h b/src/drivers/SpiMaster.h index 5045369a..5ea624f2 100644 --- a/src/drivers/SpiMaster.h +++ b/src/drivers/SpiMaster.h @@ -59,7 +59,7 @@ namespace Pinetime { volatile uint32_t currentBufferAddr = 0; volatile size_t currentBufferSize = 0; volatile TaskHandle_t taskToNotify; - SemaphoreHandle_t mutex; + SemaphoreHandle_t mutex = nullptr; }; } } diff --git a/src/drivers/TwiMaster.cpp b/src/drivers/TwiMaster.cpp index 7b6582dd..fc9edf81 100644 --- a/src/drivers/TwiMaster.cpp +++ b/src/drivers/TwiMaster.cpp @@ -9,10 +9,12 @@ using namespace Pinetime::Drivers; // TODO use DMA/IRQ TwiMaster::TwiMaster(const Modules module, const Parameters& params) : module {module}, params {params} { - mutex = xSemaphoreCreateBinary(); } void TwiMaster::Init() { + if(mutex == nullptr) + mutex = xSemaphoreCreateBinary(); + NRF_GPIO->PIN_CNF[params.pinScl] = ((uint32_t) GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos) | ((uint32_t) GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) | ((uint32_t) GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos) | ((uint32_t) GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) | diff --git a/src/drivers/TwiMaster.h b/src/drivers/TwiMaster.h index 1c0648a2..6175b99b 100644 --- a/src/drivers/TwiMaster.h +++ b/src/drivers/TwiMaster.h @@ -31,7 +31,7 @@ namespace Pinetime { ErrorCodes Write(uint8_t deviceAddress, const uint8_t* data, size_t size, bool stop); void FixHwFreezed(); NRF_TWIM_Type* twiBaseAddress; - SemaphoreHandle_t mutex; + SemaphoreHandle_t mutex = nullptr; const Modules module; const Parameters params; static constexpr uint8_t maxDataSize {16}; diff --git a/src/heartratetask/HeartRateTask.cpp b/src/heartratetask/HeartRateTask.cpp index 1c21db71..fddc05d7 100644 --- a/src/heartratetask/HeartRateTask.cpp +++ b/src/heartratetask/HeartRateTask.cpp @@ -7,11 +7,12 @@ using namespace Pinetime::Applications; HeartRateTask::HeartRateTask(Drivers::Hrs3300& heartRateSensor, Controllers::HeartRateController& controller) : heartRateSensor {heartRateSensor}, controller {controller}, ppg{} { - messageQueue = xQueueCreate(10, 1); - controller.SetHeartRateTask(this); } void HeartRateTask::Start() { + messageQueue = xQueueCreate(10, 1); + controller.SetHeartRateTask(this); + if (pdPASS != xTaskCreate(HeartRateTask::Process, "Heartrate", 500, this, 0, &taskHandle)) APP_ERROR_HANDLER(NRF_ERROR_NO_MEM); } diff --git a/src/main.cpp b/src/main.cpp index 52ec9580..4c2c5de8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -306,6 +306,8 @@ int main(void) { debounceTimer = xTimerCreate("debounceTimer", 200, pdFALSE, (void*) 0, DebounceTimerCallback); debounceChargeTimer = xTimerCreate("debounceTimerCharge", 200, pdFALSE, (void*) 0, DebounceTimerChargeCallback); + lvgl.Init(); + systemTask.Start(); nimble_port_init(); diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index 4799624a..38e9793c 100644 --- a/src/systemtask/SystemTask.cpp +++ b/src/systemtask/SystemTask.cpp @@ -81,10 +81,11 @@ SystemTask::SystemTask(Drivers::SpiMaster& spi, motionController{motionController}, displayApp{displayApp}, heartRateApp(heartRateApp) { - systemTasksMsgQueue = xQueueCreate(10, 1); + } void SystemTask::Start() { + systemTasksMsgQueue = xQueueCreate(10, 1); if (pdPASS != xTaskCreate(SystemTask::Process, "MAIN", 350, this, 0, &taskHandle)) APP_ERROR_HANDLER(NRF_ERROR_NO_MEM); } -- cgit v1.2.3-70-g09d2 From 346d20db52823eeed01d81cee4f413b753fbec9e Mon Sep 17 00:00:00 2001 From: JF002 Date: Sat, 12 Jun 2021 11:02:54 +0200 Subject: Rewrite MemoryAnalysis.md with up to date information. (#411) Rewrite MemoryAnalysis.md with up to date information. --- doc/MemoryAnalysis.md | 299 ++++++++++++++++++++++++---- doc/memoryAnalysis/linkermapviz.png | Bin 0 -> 55661 bytes doc/memoryAnalysis/mapfile.png | Bin 0 -> 111302 bytes doc/memoryAnalysis/puncover-all-symbols.png | Bin 0 -> 78193 bytes doc/memoryAnalysis/puncover.png | Bin 0 -> 217193 bytes 5 files changed, 255 insertions(+), 44 deletions(-) create mode 100644 doc/memoryAnalysis/linkermapviz.png create mode 100644 doc/memoryAnalysis/mapfile.png create mode 100644 doc/memoryAnalysis/puncover-all-symbols.png create mode 100644 doc/memoryAnalysis/puncover.png diff --git a/doc/MemoryAnalysis.md b/doc/MemoryAnalysis.md index 95bd611c..3251c98d 100644 --- a/doc/MemoryAnalysis.md +++ b/doc/MemoryAnalysis.md @@ -1,78 +1,289 @@ # Memory analysis -## FreeRTOS heap and task stack -FreeRTOS statically allocate its own heap buffer in a global variable named `ucHeap`. This is an array of *uint8_t*. Its size is specified by the definition `configTOTAL_HEAP_SIZE` in *FreeRTOSConfig.h* -FreeRTOS uses this buffer to allocate memory for tasks stack and all the RTOS object created during runtime (timers, mutexes,...). +The PineTime is equipped with the following memories: + - The internal RAM : **64KB** + - The internal Flash : **512KB** + - The external (SPI) Flash : **4MB** -The function `xPortGetFreeHeapSize()` returns the amount of memory available in this *ucHeap* buffer. If this value reaches 0, FreeRTOS runs out of memory. +Note that the NRF52832 cannot execute code stored in the external flash : we need to store the whole firmware in the internal flash memory, and use the external one to store graphicals assets, fonts... + +This document describes how the RAM and Flash memories are used in InfiniTime and how to analyze and monitor their usage. It was written in the context of [this memory analysis effort](https://github.com/JF002/InfiniTime/issues/313). + +## Code sections +A binary is composed of multiple sections. Most of the time, these sections are : .text, .rodata, .data and .bss but more sections can be defined in the linker script. + +Here is a small description of these sections and where they end up in memory: + + - **TEXT** = code (FLASH) + - **RODATA** = constants (FLASH) + - **DATA** = initialized variables (FLASH + RAM) + - **BSS** = uninitialized variables (RAM) + + +## Internal FLASH +The internal flash memory stores the whole firmware: code, variable that are not default-initialized, constants... + +The content of the flash memory can be easily analyzed thanks to the MAP file generated by the compiler. This file lists all the symbols from the program along with their size and location (section and addresses) in RAM and FLASH. + +![Map file](./memoryAnalysis/mapfile.png) + +As you can see on the picture above, this file contains a lot of information and is not easily readable by a human being. Fortunately, you can easily find tools that parse and display the content of the MAP file in a more understandable way. + +In this analysis, I used [Linkermapviz](https://github.com/PromyLOPh/linkermapviz). + +### Linkermapviz + +[Linkermapviz](https://github.com/PromyLOPh/linkermapviz) parses the MAP file and displays its content in a graphical way into an HTML page: + +![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,... + +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/JF002/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... + +### 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... +![Puncover](./memoryAnalysis/puncover.png) + +Puncover is really easy to install: + - clone the repo and cd into the cloned directory + - setup a venv + - `python -m virtualenv venv` + - `source venv/bin/activate` + - Install : `pip install .` + - Run : `puncover --gcc_tools_base=/path/to/gcc-arm-none-eabi-9-2020-q2-update/bin/arm-none-eabi- --elf_file /path/to/build/directory/src/pinetime-app-1.1.0.out --src_root /path/to/sources --build_dir /path/to/build/directory` + - Replace + * `/path/to/gcc-arm-none-eabi-9-2020-q2-update/bin` with the path to your gcc-arm-none-eabi toolchain + * `/path/to/build/directory/src/pinetime-app-1.1.0.out` with the path to the binary generated by GCC (.out file) + * `/path/to/sources` with the path to the root folder of the sources (checkout directory) + * `/path/to/build/directory` with the path to the build directory + - 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. + +![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. + +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/JF002/InfiniTime/issues/313#issuecomment-842338620 + - Analysis with Puncover : https://github.com/JF002/InfiniTime/issues/313#issuecomment-847311392 + +## RAM +RAM memory contains all the data that can be modified at run-time: variables, stack, heap... + +### Data +RAM memory can be *statically* allocated, meaning that the size and position of the data are known at compile-time: + +You can easily analyze the memory used by variables declared in the global scope using the MAP. You'll find them in the .BSS or .DATA sections. Linkermapviz and Puncover can be used to analyze their memory usage. + +Variables declared in the scope of a function will be allocated on the stack. It means that the stack usage will vary according to the state of the program, and cannot be easily analyzed at compile time. ``` -NRF_LOG_INFO("Free heap : %d", xPortGetFreeHeapSize()); +uint8_t buffer[1024] + +int main() { + int a; +} ``` +#### Analysis +In Infinitime 1.1, the biggest buffers are the buffers allocated for LVGL (14KB) and the one for FreeRTOS (16KB). Nimble also allocated 9KB of RAM. -The function `uxTaskGetSystemState()` fetches some information about the running tasks like its name and the minimum amount of stack space that has remained for the task since the task was created: +### Stack +The stack will be used for everything except tasks, which have their own stack allocated by FreeRTOS. The stack is 8192B and is allocated in the [linker script](https://github.com/JF002/InfiniTime/blob/develop/nrf_common.ld#L148). +An easy way to monitor its usage is by filling the section with a known pattern at boot time, then use the firmware and dump the memory. You can then check the maximum stack usage by checking the address from the beginning of the stack that were overwritten. + +#### Fill the stack section by a known pattern: +Edit /modules/nrfx/mdk/gcc_startup_nrf52.S and add the following code after the copy of the data from read only memory to RAM at around line 243: ``` -TaskStatus_t tasksStatus[10] -auto nb = uxTaskGetSystemState(tasksStatus, 10, NULL); -for (int i = 0; i < nb; i++) { - NRF_LOG_INFO("Task [%s] - %d", tasksStatus[i].pcTaskName, tasksStatus[i].usStackHighWaterMark); -``` +/* Loop to copy data from read only memory to RAM. + * The ranges of copy from/to are specified by following symbols: + * __etext: LMA of start of the section to copy from. Usually end of text + * __data_start__: VMA of start of the section to copy to. + * __bss_start__: VMA of end of the section to copy to. Normally __data_end__ is used, but by using __bss_start__ + * the user can add their own initialized data section before BSS section with the INTERT AFTER command. + * + * All addresses must be aligned to 4 bytes boundary. + */ + ldr r1, =__etext + ldr r2, =__data_start__ + ldr r3, =__bss_start__ + + subs r3, r3, r2 + ble .L_loop1_done +.L_loop1: + subs r3, r3, #4 + ldr r0, [r1,r3] + str r0, [r2,r3] + bgt .L_loop1 -## Global heap -Heap is used for **dynamic memory allocation (malloc() / new)**. NRF SDK defaults the heap size to 8KB. The size of the heap can be specified by defining `__HEAP_SIZE=8192` in *src/CMakeLists.txt*: +.L_loop1_done: + +/* Add this code to fill the stack section with 0xFFEEDDBB */ +ldr r0, =__StackLimit + ldr r1, =8192 +ldr r2, =0xFFEEDDBB +.L_fill: +str r2, [r0] +adds r0, 4 +subs r1, 4 +bne .L_fill +/* -- */ +``` + +#### Dump RAM memory and check usage +Dumping the content of the ram is easy using JLink debugger and `nrfjprog`: + +``` +nrfjprog --readram ram.bin ``` -add_definitions(-D__HEAP_SIZE=8192) -``` -You can trace the dynamic memory allocation by using the flag `--wrap` of the linker. When this flag is enabled, the linker will replace the calls to a specific function by a call to __wrap_the_function(). For example, if you specify `-Wl,-wrap,malloc` in the linker flags, the linker will replace all calls to `void* malloc(size_t)` by calls to `void* __wrap_malloc(size_t)`. This is a function you'll have to define in your code. In this function, you can call `__real_malloc()` to call the actual `malloc()' function. +You can then display the file using objdump: -This technic allows you to wrap all calls to malloc() with you own code. +``` +hexdump ram.bin -v | less +``` -In *src/CMakeLists.txt*: +The stack is positionned at the end of the RAM -> 0xFFFF. Its size is 8192 bytes, so the end of the stack is at 0xE000. +On the following dump, the maximum stack usage is 520 bytes (0xFFFF - 0xFDF8): ``` -set_target_properties(${EXECUTABLE_NAME} PROPERTIES - ... - LINK_FLAGS "-Wl,-wrap,malloc ..." - ... - ) +000fdb0 ddbb ffee ddbb ffee ddbb ffee ddbb ffee +000fdc0 ddbb ffee ddbb ffee ddbb ffee ddbb ffee +000fdd0 ddbb ffee ddbb ffee ddbb ffee ddbb ffee +000fde0 ddbb ffee ddbb ffee ddbb ffee ddbb ffee +000fdf0 ddbb ffee ddbb ffee ffff ffff c24b 0003 +000fe00 ffff ffff ffff ffff ffff ffff 0000 0000 +000fe10 0018 0000 0000 0000 0000 0000 fe58 2000 +000fe20 0000 0000 0000 00ff ddbb 00ff 0018 0000 +000fe30 929c 2000 0000 0000 0018 0000 0000 0000 +000fe40 92c4 2000 0458 2000 0000 0000 80e7 0003 +000fe50 0000 0000 8cd9 0003 ddbb ffee ddbb ffee +000fe60 00dc 2000 92c4 2000 0005 0000 929c 2000 +000fe70 007f 0000 feb0 2000 92c4 2000 feb8 2000 +000fe80 ddbb ffee 0005 0000 929c 2000 0000 0000 +000fe90 aca0 2000 0000 0000 0028 0000 418b 0005 +000fea0 02f4 2000 001f 0000 0000 0000 0013 0000 +000feb0 b5a8 2000 2199 0005 b5a8 2000 2201 0005 +000fec0 b5a8 2000 001e 0000 0000 0000 0013 0000 +000fed0 b5b0 2000 0fe0 0006 b5a8 2000 0000 0000 +000fee0 0013 0000 2319 0005 0013 0000 0000 0000 +000fef0 0000 0000 3b1c 2000 3b1c 2000 d0e3 0000 +000ff00 4b70 2000 54ac 2000 4b70 2000 ffff ffff +000ff10 0000 0000 1379 0003 6578 2000 0d75 0003 +000ff20 6578 2000 ffff ffff 0000 0000 1379 0003 +000ff30 000c 0000 cfeb 0002 39a1 2000 a824 2000 +000ff40 0015 0000 cfeb 0002 39a1 2000 a824 2000 +000ff50 39a1 2000 0015 0000 001b 0000 b4b9 0002 +000ff60 0000 0000 a9f4 2000 4b70 2000 0d75 0003 +000ff70 4b70 2000 ffff ffff 0000 0000 1379 0003 +000ff80 ed00 e000 a820 2000 1000 4001 7fc0 2000 +000ff90 7f64 2000 75a7 0001 a884 2000 7b04 2000 +000ffa0 a8c0 2000 0000 0000 0000 0000 0000 0000 +000ffb0 7fc0 2000 7f64 2000 8024 2000 a5a5 a5a5 +000ffc0 ed00 e000 3fd5 0001 0000 0000 72c0 2000 +000ffd0 0000 0000 72e4 2000 3f65 0001 7f64 2000 +000ffe0 0000 2001 0000 0000 ef30 e000 0010 0000 +000fff0 7fc0 2000 4217 0001 3f0a 0001 0000 6100 +``` + +#### Analysis +According to my experimentations, we don't use the stack that much, and 8192 bytes is probably way too big for InfiniTime! + +#### Links + - https://github.com/JF002/InfiniTime/issues/313#issuecomment-851035070 +### Heap +The heap is declared in the [linker script](https://github.com/JF002/InfiniTime/blob/develop/nrf_common.ld#L136) and its current size is 8192 bytes. The heap is used for dynamic memory allocation(`malloc()`, `new`...). + +Heap monitoring is not easy, but it seems that we can use the following code to know the current usage of the heap: + +``` +auto m = mallinfo(); +NRF_LOG_INFO("heap : %d", m.uordblks); ``` -In *main.cpp*: +#### 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. + +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: + +- Add ` -Wl,-wrap,malloc` to the cmake variable `LINK_FLAGS` of the target you want to debug (pinetime-app, most probably) +- Add the following code in `main.cpp` ``` -uint32_t totalMalloc = 0; extern "C" { - extern void* __real_malloc(size_t s); - void *__wrap_malloc(size_t s) { - totalMalloc += s; - return __real_malloc(s); - } +void *__real_malloc (size_t); +void* __wrap_malloc(size_t size) { + return __real_malloc(size); } +} +``` +Now, your function `__wrap_malloc()` will be called instead of `malloc()`. You can call the actual malloc from the stdlib by calling `__real_malloc()`. + +Using this technique, I was able to trace all malloc calls at boot (boot -> digital watchface): + +- system task = 3464 bytes (SystemTask could potentially be declared as a global variable to avoid heap allocation here) +- string music = 31 (maybe we should not use std::string when not needed, as it does heap allocation) +- ble_att_svr_start = 1720 +- ble gatts start = 40 + 88 +- ble ll task = 24 +- display app = 104 +- digital clock = 96 + 152 +- hr task = 304 + +#### Links + - https://github.com/JF002/InfiniTime/issues/313#issuecomment-851035625 + - https://www.embedded.com/mastering-stack-and-heap-for-system-reliability-part-1-calculating-stack-size/ + - https://www.embedded.com/mastering-stack-and-heap-for-system-reliability-part-2-properly-allocating-stacks/ + - 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). +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 : + ``` -This function sums all the memory that is allocated during the runtime. You can monitor or log this value. You can also place breakpoints in this function to determine where the dynamic memory allocation occurs in your code. +lv_mem_monitor_t mon; +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. +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. + +I tried to monitor this max value while going through all the apps of InfiniTime 1.1 : the max value I've seen is **5660 bytes**. It means that we could probably **reduce the size of the buffer from 14KB to 6 - 10 KB** (we have to take the fragmentation of the memory into account). +### Links + - https://github.com/JF002/InfiniTime/issues/313#issuecomment-850890064 + + +## FreeRTOS heap and task stack +FreeRTOS statically allocate its own heap buffer in a global variable named `ucHeap`. This is an array of *uint8_t*. Its size is specified by the definition `configTOTAL_HEAP_SIZE` in *FreeRTOSConfig.h* +FreeRTOS uses this buffer to allocate memory for tasks stack and all the RTOS object created during runtime (timers, mutexes...). +The function `xPortGetFreeHeapSize()` returns the amount of memory available in this *ucHeap* buffer. If this value reaches 0, FreeRTOS runs out of memory. -# Global stack -The stack is used to allocate memory used by functions : **parameters and local variables**. NRF SDK defaults the heap size to 8KB. The size of the heap can be specified by defining `__STACK_SIZE=8192` in *src/CMakeLists.txt*: - ``` -add_definitions(-D__STACK_SIZE=8192) -``` +NRF_LOG_INFO("Free heap : %d", xPortGetFreeHeapSize()); +``` -*NOTE*: FreeRTOS uses its own stack buffer. Thus, the global stack is only used for main() and IRQ handlers. It should be possible to reduce its size to a much lower value. -**NOTE**: [?] How to track the global stack usage? +The function `uxTaskGetSystemState()` fetches some information about the running tasks like its name and the minimum amount of stack space that has remained for the task since the task was created: -#LittleVGL buffer -*TODO* +``` +TaskStatus_t tasksStatus[10] +auto nb = uxTaskGetSystemState(tasksStatus, 10, NULL); +for (int i = 0; i < nb; i++) { + NRF_LOG_INFO("Task [%s] - %d", tasksStatus[i].pcTaskName, tasksStatus[i].usStackHighWaterMark); +``` -#NimBLE buffers -*TODO* -#Tools - - https://github.com/eliotstock/memory : display the memory usage (FLASH/RAM) using the .map file from GCC. diff --git a/doc/memoryAnalysis/linkermapviz.png b/doc/memoryAnalysis/linkermapviz.png new file mode 100644 index 00000000..8edfc8f9 Binary files /dev/null and b/doc/memoryAnalysis/linkermapviz.png differ diff --git a/doc/memoryAnalysis/mapfile.png b/doc/memoryAnalysis/mapfile.png new file mode 100644 index 00000000..0badd104 Binary files /dev/null and b/doc/memoryAnalysis/mapfile.png differ diff --git a/doc/memoryAnalysis/puncover-all-symbols.png b/doc/memoryAnalysis/puncover-all-symbols.png new file mode 100644 index 00000000..6a984248 Binary files /dev/null and b/doc/memoryAnalysis/puncover-all-symbols.png differ diff --git a/doc/memoryAnalysis/puncover.png b/doc/memoryAnalysis/puncover.png new file mode 100644 index 00000000..b32e1784 Binary files /dev/null and b/doc/memoryAnalysis/puncover.png differ -- cgit v1.2.3-70-g09d2 From 8fb543f4c3174372f2f373b342a20d394cb58597 Mon Sep 17 00:00:00 2001 From: Joel Bradshaw Date: Sat, 12 Jun 2021 02:05:57 -0700 Subject: Add note about getting GadgetBridge from F-Droid (#358) * Add note about getting GadgetBridge from F-Droid Hopefully this is useful and will save folks some frustration * Add note that GadgetBridge should be downloaded via F-Droid There's an "unofficial" version on the Play Store that is outdated and doesn't have PineTime support * Fix typo * Add starting version, reword a bit Initial support version is a little fuzzy, 0.47 states it's "not yet usable" but changelog doesn't specify when we've crossed the "usable" threshold. --- README.md | 2 +- doc/companionapps/Gadgetbridge.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 396d7462..755f1905 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ As of now, here is the list of achievements of this project: * Firmware validation * System information - Supported by 3 companion apps (development is in progress): - * [Gadgetbridge](https://codeberg.org/Freeyourgadget/Gadgetbridge/) (on Android) + * [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) diff --git a/doc/companionapps/Gadgetbridge.md b/doc/companionapps/Gadgetbridge.md index 1a25069c..974e2828 100644 --- a/doc/companionapps/Gadgetbridge.md +++ b/doc/companionapps/Gadgetbridge.md @@ -1,7 +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/). +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. ## Features The following features are implemented: -- cgit v1.2.3-70-g09d2 From 2c7ad783fc0d37c534050321a13759a28f9b83f0 Mon Sep 17 00:00:00 2001 From: Itai Nelken <70802936+Itai-Nelken@users.noreply.github.com> Date: Sat, 12 Jun 2021 12:06:46 +0300 Subject: Improvements to /doc/filesInReleaseNotes.md (#357) * Update filesInReleaseNotes.md --- doc/filesInReleaseNotes.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/filesInReleaseNotes.md b/doc/filesInReleaseNotes.md index f48a0c10..78c20b51 100644 --- a/doc/filesInReleaseNotes.md +++ b/doc/filesInReleaseNotes.md @@ -1,16 +1,16 @@ # Using the releases -For each new *stable* version of Pinetime, a [release note](https://github.com/JF002/InfiniTime/releases) is created. It contains a description of the main changes in the release and some files you can use to flash the firmware in your Pinetime. +For each new *stable* version of IniniTime, a [release note](https://github.com/JF002/InfiniTime/releases) is created. It contains a description of the main changes in the release and some files you can use to flash the firmware to your Pinetime. This page describes the files from the release notes and how to use them. -**NOTE :** the files included in different could be different. This page describes the release note of [version 0.7.1](https://github.com/JF002/InfiniTime/releases/tag/0.7.1), which is the version that'll probably be pre-programmed at the factory for the next batch of Pinetime devkits. +**NOTE :** the files included in different Releases could be different. This page describes the release notes of [version 0.7.1](https://github.com/JF002/InfiniTime/releases/tag/0.7.1), which is the version that is pre-programmed for the last batches of pinetimes but will be replaced with [1.0.0](https://github.com/jF002/infiniTime/releases/tag/1.0.0) around june 2021. -## Files included in the release note +## Files included in the release notes ### Standalone firmware -This firmware is standalone, meaning that it does not need a bootloader to actually run. It is intended to be flash at offset 0, meaning it will erase any bootloader that might be present in memory. +This firmware is standalone, meaning that it does not need a bootloader to actually run. It is intended to be flashed at offset 0, meaning it will erase any bootloader that might be present in memory. - - **pinetime-app.out** : Output file of GCC containing debug symbols, useful is you want to debug the firmware using GDB. + - **pinetime-app.out** : Output file of GCC containing debug symbols, useful if you want to debug the firmware using GDB. - **pinetime-app.hex** : Firmware in Intel HEX file format. Easier to use because it contains the offset in memory where it must be flashed, you don't need to specify it. - **pintime-app.bin** : Firmware in binary format. When programming it, you have to specify the offset (0x00) in memory where it must be flashed. - **pinetime-app.map** : Map file containing all the symbols, addresses in memory,... @@ -38,7 +38,7 @@ This firmware is a small utility firmware that writes the boot graphic in the ex ### Firmware with bootloader This firmware is intended to be used with our [MCUBoot-based bootloader](../bootloader/README.md). - - **pinetime-mcuboot-app-image.hex** : Firmware wrapped into an MCUBoot image. This is **the** file that must be flashed **@ 0x8000** into flash memory. If the [bootloader](../bootloader/README.md) has been successfully programmed, it should run this firmware after the next reset. + - **pinetime-mcuboot-app-image.hex**: Firmware wrapped into an MCUBoot image. This is **the** file that must be flashed at **0x8000** into the flash memory. If the [bootloader](../bootloader/README.md) has been successfully programmed, it should run this firmware after the next reset. The following files are not directly usable by the bootloader: -- cgit v1.2.3-70-g09d2 From 4d1626e3b6133e1b07c67749ac5037905e72270b Mon Sep 17 00:00:00 2001 From: Jonathan Vander Mey Date: Sat, 12 Jun 2021 05:07:23 -0400 Subject: Fix fallthrough on case statement (#403) --- src/drivers/SpiMaster.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/drivers/SpiMaster.cpp b/src/drivers/SpiMaster.cpp index 0d5bb83c..c45e1294 100644 --- a/src/drivers/SpiMaster.cpp +++ b/src/drivers/SpiMaster.cpp @@ -56,6 +56,7 @@ bool SpiMaster::Init() { break; case BitOrder::Lsb_Msb: regConfig = 1; + break; default: return false; } -- cgit v1.2.3-70-g09d2 -- cgit v1.2.3-70-g09d2 From bf906bd573b37e0bb592221dae6b5f156836a6b6 Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Sat, 12 Jun 2021 12:12:39 +0300 Subject: Fix scrollbar (#382) --- src/displayapp/screens/SystemInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp index a7387dac..a0b626e9 100644 --- a/src/displayapp/screens/SystemInfo.cpp +++ b/src/displayapp/screens/SystemInfo.cpp @@ -161,7 +161,7 @@ std::unique_ptr SystemInfo::CreateScreen2() { brightnessController.ToString(), resetReason); lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0); - return std::make_unique(1, 4, app, label); + return std::make_unique(1, 5, app, label); } std::unique_ptr SystemInfo::CreateScreen3() { -- cgit v1.2.3-70-g09d2 From 44d7c6d00f3ec919c6f70d32d084c26539aa58aa Mon Sep 17 00:00:00 2001 From: Roxxor91 Date: Sat, 12 Jun 2021 11:15:39 +0200 Subject: Update Amazfish.md (#386) Add Navigation feature. --- doc/companionapps/Amazfish.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/companionapps/Amazfish.md b/doc/companionapps/Amazfish.md index eb9daa04..90ad20c2 100644 --- a/doc/companionapps/Amazfish.md +++ b/doc/companionapps/Amazfish.md @@ -8,8 +8,9 @@ The following features are implemented: - 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. - \ No newline at end of file + -- cgit v1.2.3-70-g09d2 From d4f4ed014cecb600a5fb8541cff1f01bf2c46d54 Mon Sep 17 00:00:00 2001 From: Pekka <85409219+pekkakr@users.noreply.github.com> Date: Sat, 12 Jun 2021 12:16:54 +0300 Subject: Update buildWithDocker.md (#416) Added a link to instructions for cloning the repo. The purpose was mainly to remind of the git submodule update. --- doc/buildWithDocker.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/buildWithDocker.md b/doc/buildWithDocker.md index 7a2f3727..17fb53d9 100644 --- a/doc/buildWithDocker.md +++ b/doc/buildWithDocker.md @@ -13,7 +13,7 @@ Based on Ubuntu 18.04 with the following build dependencies: The `infinitime-build` image contains all the dependencies you need. The default `CMD` will compile sources found in `/sources`, so you need only mount your code. -This example will build the firmware, generate the MCUBoot image and generate the DFU file. Outputs will be written to **/build/output**: +This example will build the firmware, generate the MCUBoot image and generate the DFU file. For cloning the repo, see [these instructions](../doc/buildAndProgram.md#clone-the-repo). Outputs will be written to **/build/output**: ```bash cd # e.g. cd ./work/Pinetime -- cgit v1.2.3-70-g09d2 From 314a8ebba070bd935c795cea2955d494f002797f Mon Sep 17 00:00:00 2001 From: Avamander Date: Sat, 12 Jun 2021 12:18:19 +0300 Subject: Changed the namespace of SystemInfo::sortById to avoid a name conflict (#360) --- src/displayapp/DisplayApp.cpp | 2 -- src/displayapp/screens/SystemInfo.cpp | 2 +- src/displayapp/screens/SystemInfo.h | 3 +++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index 05f171be..01e26e22 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -331,8 +331,6 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction) std::make_unique(this, dateTimeController, batteryController, brightnessController, bleController, watchdog); ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown); break; - // - case Apps::FlashLight: currentScreen = std::make_unique(this, *systemTask, brightnessController); ReturnApp(Apps::Clock, FullRefreshDirections::Down, TouchEvents::None); diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp index a0b626e9..9ff28288 100644 --- a/src/displayapp/screens/SystemInfo.cpp +++ b/src/displayapp/screens/SystemInfo.cpp @@ -198,7 +198,7 @@ std::unique_ptr SystemInfo::CreateScreen3() { return std::make_unique(2, 5, app, label); } -bool sortById(const TaskStatus_t& lhs, const TaskStatus_t& rhs) { +bool SystemInfo::sortById(const TaskStatus_t& lhs, const TaskStatus_t& rhs) { return lhs.xTaskNumber < rhs.xTaskNumber; } diff --git a/src/displayapp/screens/SystemInfo.h b/src/displayapp/screens/SystemInfo.h index c0c65554..c61a07a2 100644 --- a/src/displayapp/screens/SystemInfo.h +++ b/src/displayapp/screens/SystemInfo.h @@ -43,6 +43,9 @@ namespace Pinetime { Pinetime::Drivers::WatchdogView& watchdog; ScreenList<5> screens; + + static bool sortById(const TaskStatus_t& lhs, const TaskStatus_t& rhs); + std::unique_ptr CreateScreen1(); std::unique_ptr CreateScreen2(); std::unique_ptr CreateScreen3(); -- cgit v1.2.3-70-g09d2 From d7962617e47c221b6274af53b9488e5280c8d2d8 Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Sat, 12 Jun 2021 14:21:29 +0200 Subject: Clock : initialize the actual clockface in initialization list instead of in the core of the ctro(). --- src/displayapp/screens/Clock.cpp | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/src/displayapp/screens/Clock.cpp b/src/displayapp/screens/Clock.cpp index 9962a9f4..05e47a39 100644 --- a/src/displayapp/screens/Clock.cpp +++ b/src/displayapp/screens/Clock.cpp @@ -32,25 +32,18 @@ Clock::Clock(DisplayApp* app, notificatioManager {notificatioManager}, settingsController {settingsController}, heartRateController {heartRateController}, - motionController {motionController} { - - switch (settingsController.GetClockFace()) { - case 0: - screen = WatchFaceDigitalScreen(); - break; - case 1: - screen = WatchFaceAnalogScreen(); - break; - /* - // Examples for more watch faces - case 2: - screen = WatchFaceMinimalScreen(); - break; - case 3: - screen = WatchFaceCustomScreen(); - break; - */ - } + motionController {motionController}, + screen {[this, &settingsController]() { + switch (settingsController.GetClockFace()) { + case 0: + return WatchFaceDigitalScreen(); + break; + case 1: + return WatchFaceAnalogScreen(); + break; + } + return WatchFaceDigitalScreen(); + }()} { settingsController.SetAppMenu(0); } -- cgit v1.2.3-70-g09d2 From c575754b4283ab1e8a2b1320a97992db6712ac58 Mon Sep 17 00:00:00 2001 From: Bryton Hall Date: Sat, 12 Jun 2021 09:06:58 -0400 Subject: add basic metronome app (#409) * add basic metronome app * add bpb, tap to bpm, update widgets * use event pressed for bpm tap * move case statement break to the right place * narrow bpm selection range, override touch events * fix arc knob style * re-enable sleeping in destructor --- src/CMakeLists.txt | 2 + src/displayapp/Apps.h | 1 + src/displayapp/DisplayApp.cpp | 8 +- src/displayapp/lv_pinetime_theme.c | 13 +++ src/displayapp/screens/ApplicationList.cpp | 2 +- src/displayapp/screens/Metronome.cpp | 169 +++++++++++++++++++++++++++++ src/displayapp/screens/Metronome.h | 34 ++++++ 7 files changed, 226 insertions(+), 3 deletions(-) create mode 100644 src/displayapp/screens/Metronome.cpp create mode 100644 src/displayapp/screens/Metronome.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c72f7c9c..71909d7d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -396,6 +396,7 @@ list(APPEND SOURCE_FILES displayapp/screens/FirmwareUpdate.cpp displayapp/screens/Music.cpp displayapp/screens/Navigation.cpp + displayapp/screens/Metronome.cpp displayapp/screens/Motion.cpp displayapp/screens/FirmwareValidation.cpp displayapp/screens/ApplicationList.cpp @@ -592,6 +593,7 @@ set(INCLUDE_FILES displayapp/Apps.h displayapp/screens/Notifications.h displayapp/screens/HeartRate.h + displayapp/screens/Metronome.h displayapp/screens/Motion.h displayapp/screens/Timer.h drivers/St7789.h diff --git a/src/displayapp/Apps.h b/src/displayapp/Apps.h index 2df517f8..684e3a46 100644 --- a/src/displayapp/Apps.h +++ b/src/displayapp/Apps.h @@ -21,6 +21,7 @@ namespace Pinetime { HeartRate, Navigation, StopWatch, + Metronome, Motion, Steps, QuickSettings, diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index 01e26e22..cd25c979 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -18,6 +18,7 @@ #include "displayapp/screens/Paddle.h" #include "displayapp/screens/StopWatch.h" #include "displayapp/screens/Meter.h" +#include "displayapp/screens/Metronome.h" #include "displayapp/screens/Music.h" #include "displayapp/screens/Navigation.h" #include "displayapp/screens/Notifications.h" @@ -318,7 +319,7 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction) currentScreen = std::make_unique(this, settingsController); ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown); break; - case Apps::SettingSteps: + case Apps::SettingSteps: currentScreen = std::make_unique(this, settingsController); ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown); break; @@ -356,10 +357,13 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction) case Apps::HeartRate: currentScreen = std::make_unique(this, heartRateController, *systemTask); break; + case Apps::Metronome: + currentScreen = std::make_unique(this, motorController, systemTask); + break; case Apps::Motion: currentScreen = std::make_unique(this, motionController); break; - case Apps::Steps: + case Apps::Steps: currentScreen = std::make_unique(this, motionController, settingsController); break; } diff --git a/src/displayapp/lv_pinetime_theme.c b/src/displayapp/lv_pinetime_theme.c index b003a411..1b8b1980 100644 --- a/src/displayapp/lv_pinetime_theme.c +++ b/src/displayapp/lv_pinetime_theme.c @@ -48,6 +48,7 @@ static lv_style_t style_sw_bg; static lv_style_t style_sw_indic; static lv_style_t style_sw_knob; static lv_style_t style_arc_bg; +static lv_style_t style_arc_knob; static lv_style_t style_arc_indic; static lv_style_t style_table_cell; static lv_style_t style_pad_small; @@ -191,6 +192,7 @@ static void basic_init(void) { lv_style_set_text_line_space(&style_ddlist_list, LV_STATE_DEFAULT, LV_VER_RES / 25); lv_style_set_shadow_width(&style_ddlist_list, LV_STATE_DEFAULT, LV_VER_RES / 20); lv_style_set_shadow_color(&style_ddlist_list, LV_STATE_DEFAULT, LV_PINETIME_GRAY); + lv_style_set_bg_color(&style_ddlist_list, LV_STATE_DEFAULT, LV_PINETIME_GRAY); style_init_reset(&style_ddlist_selected); lv_style_set_bg_opa(&style_ddlist_selected, LV_STATE_DEFAULT, LV_OPA_COVER); @@ -239,6 +241,13 @@ static void basic_init(void) { lv_style_set_line_color(&style_arc_bg, LV_STATE_DEFAULT, LV_PINETIME_GRAY); lv_style_set_line_width(&style_arc_bg, LV_STATE_DEFAULT, LV_DPX(25)); lv_style_set_line_rounded(&style_arc_bg, LV_STATE_DEFAULT, true); + lv_style_set_pad_all(&style_arc_bg, LV_STATE_DEFAULT, LV_DPX(5)); + + lv_style_reset(&style_arc_knob); + lv_style_set_radius(&style_arc_knob, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE); + lv_style_set_bg_opa(&style_arc_knob, LV_STATE_DEFAULT, LV_OPA_COVER); + lv_style_set_bg_color(&style_arc_knob, LV_STATE_DEFAULT, LV_PINETIME_LIGHT_GRAY); + lv_style_set_pad_all(&style_arc_knob, LV_STATE_DEFAULT, LV_DPX(5)); style_init_reset(&style_table_cell); lv_style_set_border_color(&style_table_cell, LV_STATE_DEFAULT, LV_PINETIME_GRAY); @@ -447,6 +456,10 @@ static void theme_apply(lv_obj_t* obj, lv_theme_style_t name) { lv_obj_clean_style_list(obj, LV_ARC_PART_INDIC); list = lv_obj_get_style_list(obj, LV_ARC_PART_INDIC); _lv_style_list_add_style(list, &style_arc_indic); + + lv_obj_clean_style_list(obj, LV_ARC_PART_KNOB); + list = lv_obj_get_style_list(obj, LV_ARC_PART_KNOB); + _lv_style_list_add_style(list, &style_arc_knob); break; case LV_THEME_SWITCH: diff --git a/src/displayapp/screens/ApplicationList.cpp b/src/displayapp/screens/ApplicationList.cpp index d599f5cc..d434c177 100644 --- a/src/displayapp/screens/ApplicationList.cpp +++ b/src/displayapp/screens/ApplicationList.cpp @@ -63,7 +63,7 @@ std::unique_ptr ApplicationList::CreateScreen2() { {Symbols::paddle, Apps::Paddle}, {"2", Apps::Twos}, {"M", Apps::Motion}, - {"", Apps::None}, + {"b", Apps::Metronome}, {"", Apps::None}, }}; diff --git a/src/displayapp/screens/Metronome.cpp b/src/displayapp/screens/Metronome.cpp new file mode 100644 index 00000000..c536e301 --- /dev/null +++ b/src/displayapp/screens/Metronome.cpp @@ -0,0 +1,169 @@ +#include "Metronome.h" + +#include "Screen.h" +#include "Symbols.h" +#include "lvgl/lvgl.h" +#include "FreeRTOSConfig.h" +#include "task.h" + +#include +#include + +using namespace Pinetime::Applications::Screens; + +namespace { + float calculateDelta(const TickType_t startTime, const TickType_t currentTime) { + TickType_t delta = 0; + // Take care of overflow + if (startTime > currentTime) { + delta = 0xffffffff - startTime; + delta += (currentTime + 1); + } else { + delta = currentTime - startTime; + } + return static_cast(delta) / static_cast(configTICK_RATE_HZ); + } + + static void eventHandler(lv_obj_t* obj, lv_event_t event) { + Metronome* screen = static_cast(obj->user_data); + screen->OnEvent(obj, event); + } + + lv_obj_t* createLabel(const char* name, lv_obj_t* reference, lv_align_t align, lv_font_t* font, uint8_t x = 0, uint8_t y = 0) { + lv_obj_t* label = lv_label_create(lv_scr_act(), nullptr); + lv_obj_set_style_local_text_font(label, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, font); + lv_obj_set_style_local_text_color(label, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GRAY); + lv_label_set_text(label, name); + lv_obj_align(label, reference, align, x, y); + + return label; + } +} + +Metronome::Metronome(DisplayApp* app, Controllers::MotorController& motorController, System::SystemTask& systemTask) + : Screen(app), running {true}, currentState {States::Stopped}, startTime {}, motorController {motorController}, systemTask {systemTask} { + + bpmArc = lv_arc_create(lv_scr_act(), nullptr); + bpmArc->user_data = this; + lv_obj_set_event_cb(bpmArc, eventHandler); + lv_arc_set_bg_angles(bpmArc, 0, 270); + lv_arc_set_rotation(bpmArc, 135); + lv_arc_set_range(bpmArc, 40, 220); + lv_arc_set_value(bpmArc, bpm); + lv_obj_set_size(bpmArc, 210, 210); + lv_arc_set_adjustable(bpmArc, true); + lv_obj_align(bpmArc, lv_scr_act(), LV_ALIGN_IN_TOP_MID, 0, 7); + + bpmValue = createLabel(std::to_string(lv_arc_get_value(bpmArc)).c_str(), bpmArc, LV_ALIGN_IN_TOP_MID, &jetbrains_mono_76, 0, 55); + bpmLegend = createLabel("bpm", bpmValue, LV_ALIGN_OUT_BOTTOM_MID, &jetbrains_mono_bold_20, 0, 0); + + bpmTap = lv_btn_create(lv_scr_act(), nullptr); + bpmTap->user_data = this; + lv_obj_set_event_cb(bpmTap, eventHandler); + lv_obj_set_style_local_bg_opa(bpmTap, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_TRANSP); + lv_obj_set_height(bpmTap, 80); + lv_obj_align(bpmTap, bpmValue, LV_ALIGN_IN_TOP_MID, 0, 0); + + bpbDropdown = lv_dropdown_create(lv_scr_act(), nullptr); + bpbDropdown->user_data = this; + lv_obj_set_event_cb(bpbDropdown, eventHandler); + lv_obj_set_style_local_pad_left(bpbDropdown, LV_DROPDOWN_PART_MAIN, LV_STATE_DEFAULT, 20); + lv_obj_set_style_local_pad_left(bpbDropdown, LV_DROPDOWN_PART_LIST, LV_STATE_DEFAULT, 20); + lv_obj_align(bpbDropdown, lv_scr_act(), LV_ALIGN_IN_BOTTOM_LEFT, 15, -4); + lv_dropdown_set_options(bpbDropdown, "1\n2\n3\n4\n5\n6\n7\n8\n9"); + lv_dropdown_set_selected(bpbDropdown, bpb - 1); + bpbLegend = lv_label_create(bpbDropdown, nullptr); + lv_label_set_text(bpbLegend, "bpb"); + lv_obj_align(bpbLegend, bpbDropdown, LV_ALIGN_IN_RIGHT_MID, -15, 0); + + playPause = lv_btn_create(lv_scr_act(), nullptr); + playPause->user_data = this; + lv_obj_set_event_cb(playPause, eventHandler); + lv_obj_align(playPause, lv_scr_act(), LV_ALIGN_IN_BOTTOM_RIGHT, -15, -10); + lv_obj_set_height(playPause, 39); + playPauseLabel = lv_label_create(playPause, nullptr); + lv_label_set_text(playPauseLabel, Symbols::play); + + app->SetTouchMode(DisplayApp::TouchModes::Polling); +} + +Metronome::~Metronome() { + app->SetTouchMode(DisplayApp::TouchModes::Gestures); + systemTask.PushMessage(Pinetime::System::SystemTask::Messages::EnableSleeping); + lv_obj_clean(lv_scr_act()); +} + +bool Metronome::OnTouchEvent(Pinetime::Applications::TouchEvents event) { + return true; +} + +bool Metronome::Refresh() { + switch (currentState) { + case States::Stopped: { + break; + } + case States::Running: { + if (calculateDelta(startTime, xTaskGetTickCount()) >= (60.0 / bpm)) { + counter--; + startTime -= 60.0 / bpm; + startTime = xTaskGetTickCount(); + if (counter == 0) { + counter = bpb; + motorController.SetDuration(90); + } else { + motorController.SetDuration(30); + } + } + break; + } + } + return running; +} + +void Metronome::OnEvent(lv_obj_t* obj, lv_event_t event) { + switch (event) { + case LV_EVENT_VALUE_CHANGED: { + if (obj == bpmArc) { + bpm = lv_arc_get_value(bpmArc); + lv_label_set_text_fmt(bpmValue, "%03d", bpm); + } else if (obj == bpbDropdown) { + bpb = lv_dropdown_get_selected(obj) + 1; + } + break; + } + case LV_EVENT_PRESSED: { + if (obj == bpmTap) { + float timeDelta = calculateDelta(tappedTime, xTaskGetTickCount()); + if (tappedTime == 0 || timeDelta > 3) { + tappedTime = xTaskGetTickCount(); + } else { + bpm = ceil(60.0 / timeDelta); + lv_arc_set_value(bpmArc, bpm); + lv_label_set_text_fmt(bpmValue, "%03d", bpm); + tappedTime = xTaskGetTickCount(); + } + } + break; + } + case LV_EVENT_CLICKED: { + if (obj == playPause) { + currentState = (currentState == States::Stopped ? States::Running : States::Stopped); + switch (currentState) { + case States::Stopped: { + lv_label_set_text(playPauseLabel, Symbols::play); + systemTask.PushMessage(Pinetime::System::SystemTask::Messages::EnableSleeping); + break; + } + case States::Running: { + lv_label_set_text(playPauseLabel, Symbols::pause); + systemTask.PushMessage(Pinetime::System::SystemTask::Messages::DisableSleeping); + startTime = xTaskGetTickCount(); + counter = 1; + break; + } + } + } + break; + } + } +} diff --git a/src/displayapp/screens/Metronome.h b/src/displayapp/screens/Metronome.h new file mode 100644 index 00000000..3a1f1084 --- /dev/null +++ b/src/displayapp/screens/Metronome.h @@ -0,0 +1,34 @@ +#pragma once + +#include "systemtask/SystemTask.h" +#include "components/motor/MotorController.h" + +#include + +namespace Pinetime::Applications::Screens { + + class Metronome : public Screen { + public: + Metronome(DisplayApp* app, Controllers::MotorController& motorController, System::SystemTask& systemTask); + ~Metronome() override; + bool Refresh() override; + bool OnTouchEvent(TouchEvents event) override; + void OnEvent(lv_obj_t* obj, lv_event_t event); + enum class States { Running, Stopped }; + + private: + bool running; + States currentState; + TickType_t startTime; + TickType_t tappedTime = 0; + Controllers::MotorController& motorController; + System::SystemTask& systemTask; + uint16_t bpm = 120; + uint8_t bpb = 4; + uint8_t counter = 1; + + lv_obj_t *bpmArc, *bpmTap, *bpmValue, *bpmLegend; + lv_obj_t *bpbDropdown, *bpbLegend; + lv_obj_t *playPause, *playPauseLabel; + }; +} -- cgit v1.2.3-70-g09d2 From d6fcbe960e595e53e3f24cbaae0cbb0505ad6dc2 Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Sat, 12 Jun 2021 15:14:14 +0200 Subject: Fix build issues since Metronome app has been merged. --- src/displayapp/DisplayApp.cpp | 2 +- src/displayapp/screens/Metronome.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index cd25c979..ab73969d 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -358,7 +358,7 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction) currentScreen = std::make_unique(this, heartRateController, *systemTask); break; case Apps::Metronome: - currentScreen = std::make_unique(this, motorController, systemTask); + currentScreen = std::make_unique(this, motorController, *systemTask); break; case Apps::Motion: currentScreen = std::make_unique(this, motionController); diff --git a/src/displayapp/screens/Metronome.cpp b/src/displayapp/screens/Metronome.cpp index c536e301..7bfbccb7 100644 --- a/src/displayapp/screens/Metronome.cpp +++ b/src/displayapp/screens/Metronome.cpp @@ -89,7 +89,7 @@ Metronome::Metronome(DisplayApp* app, Controllers::MotorController& motorControl Metronome::~Metronome() { app->SetTouchMode(DisplayApp::TouchModes::Gestures); - systemTask.PushMessage(Pinetime::System::SystemTask::Messages::EnableSleeping); + systemTask.PushMessage(System::Messages::EnableSleeping); lv_obj_clean(lv_scr_act()); } @@ -151,12 +151,12 @@ void Metronome::OnEvent(lv_obj_t* obj, lv_event_t event) { switch (currentState) { case States::Stopped: { lv_label_set_text(playPauseLabel, Symbols::play); - systemTask.PushMessage(Pinetime::System::SystemTask::Messages::EnableSleeping); + systemTask.PushMessage(System::Messages::EnableSleeping); break; } case States::Running: { lv_label_set_text(playPauseLabel, Symbols::pause); - systemTask.PushMessage(Pinetime::System::SystemTask::Messages::DisableSleeping); + systemTask.PushMessage(System::Messages::DisableSleeping); startTime = xTaskGetTickCount(); counter = 1; break; -- cgit v1.2.3-70-g09d2 From dbc2d234058226c42b79e35cb8f6576ac3bf709f Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Sat, 12 Jun 2021 18:00:42 +0200 Subject: Add Init() in DummyuLittleVgl to fix recovery firmware --- src/displayapp/DummyLittleVgl.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/displayapp/DummyLittleVgl.h b/src/displayapp/DummyLittleVgl.h index 96cf153f..016165b8 100644 --- a/src/displayapp/DummyLittleVgl.h +++ b/src/displayapp/DummyLittleVgl.h @@ -19,6 +19,10 @@ namespace Pinetime { LittleVgl(LittleVgl&&) = delete; LittleVgl& operator=(LittleVgl&&) = delete; + void Init() { + + } + void FlushDisplay(const lv_area_t* area, lv_color_t* color_p) { } bool GetTouchPadInfo(lv_indev_data_t* ptr) { -- cgit v1.2.3-70-g09d2 From 006771699fc5c1a0906920fd16998ec5295227ac Mon Sep 17 00:00:00 2001 From: Jonathan Vander Mey Date: Mon, 24 May 2021 18:16:30 -0400 Subject: Remove infinitime-nb.c from source list Was causing compiler warning for unused constant variable when being compiled. This feel is directly included where it's needed so it doesn't need to be separately compiled anyways. --- src/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 71909d7d..7721d6b8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -532,7 +532,6 @@ list(APPEND RECOVERY_SOURCE_FILES systemtask/SystemTask.cpp drivers/TwiMaster.cpp components/gfx/Gfx.cpp - displayapp/icons/infinitime/infinitime-nb.c components/rle/RleDecoder.cpp components/heartrate/HeartRateController.cpp heartratetask/HeartRateTask.cpp @@ -559,7 +558,6 @@ list(APPEND RECOVERYLOADER_SOURCE_FILES drivers/St7789.cpp components/brightness/BrightnessController.cpp - displayapp/icons/infinitime/infinitime-nb.c recoveryLoader.cpp ) -- cgit v1.2.3-70-g09d2 From e90e8c7426f9a44e696b208a5b393a60476a3d43 Mon Sep 17 00:00:00 2001 From: Jonathan Vander Mey Date: Mon, 24 May 2021 18:17:56 -0400 Subject: Fix signed/unsigned comparison warning Changed type of encodedBufferIndex to size_t to eliminate warning. It is fine as a size_t as its only ever compared to another size_t and used as an array index. --- src/components/rle/RleDecoder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/rle/RleDecoder.h b/src/components/rle/RleDecoder.h index 0f607fb8..31c1ed10 100644 --- a/src/components/rle/RleDecoder.h +++ b/src/components/rle/RleDecoder.h @@ -21,7 +21,7 @@ namespace Pinetime { const uint8_t* buffer; size_t size; - int encodedBufferIndex = 0; + size_t encodedBufferIndex = 0; int y = 0; uint16_t bp = 0; uint16_t foregroundColor = 0xffff; -- cgit v1.2.3-70-g09d2 From c6dca25b9fa30af989baf748f6c32b38eaa95bac Mon Sep 17 00:00:00 2001 From: JF002 Date: Sat, 19 Jun 2021 20:27:59 +0200 Subject: Add support for BMA425 acceleration sensor. (#440) * Add support for BMA425 acceleration sensor. --- src/components/motion/MotionController.cpp | 7 + src/components/motion/MotionController.h | 14 + src/displayapp/DisplayApp.cpp | 2 +- src/displayapp/screens/SystemInfo.cpp | 27 +- src/displayapp/screens/SystemInfo.h | 4 +- src/drivers/Bma421.cpp | 9 + src/drivers/Bma421.h | 7 + src/drivers/Bma421_C/bma423.c | 560 +++++++++++++++++++++++++++-- src/drivers/Bma421_C/bma423.h | 1 + src/systemtask/SystemTask.cpp | 1 + 10 files changed, 603 insertions(+), 29 deletions(-) diff --git a/src/components/motion/MotionController.cpp b/src/components/motion/MotionController.cpp index e9ee314b..b0dbada4 100644 --- a/src/components/motion/MotionController.cpp +++ b/src/components/motion/MotionController.cpp @@ -34,3 +34,10 @@ bool MotionController::ShouldWakeUp(bool isSleeping) { void MotionController::IsSensorOk(bool isOk) { isSensorOk = isOk; } +void MotionController::Init(Pinetime::Drivers::Bma421::DeviceTypes types) { + switch(types){ + case Drivers::Bma421::DeviceTypes::BMA421: this->deviceType = DeviceTypes::BMA421; break; + case Drivers::Bma421::DeviceTypes::BMA425: this->deviceType = DeviceTypes::BMA425; break; + default: this->deviceType = DeviceTypes::Unknown; break; + } +} diff --git a/src/components/motion/MotionController.h b/src/components/motion/MotionController.h index 3a238262..ff715093 100644 --- a/src/components/motion/MotionController.h +++ b/src/components/motion/MotionController.h @@ -1,11 +1,18 @@ #pragma once #include +#include namespace Pinetime { namespace Controllers { class MotionController { public: + enum class DeviceTypes{ + Unknown, + BMA421, + BMA425, + }; + void Update(int16_t x, int16_t y, int16_t z, uint32_t nbSteps); int16_t X() const { @@ -27,6 +34,12 @@ namespace Pinetime { return isSensorOk; } + DeviceTypes DeviceType() const { + return deviceType; + } + + void Init(Pinetime::Drivers::Bma421::DeviceTypes types); + private: uint32_t nbSteps; int16_t x; @@ -34,6 +47,7 @@ namespace Pinetime { int16_t z; int16_t lastYForWakeUp = 0; bool isSensorOk = false; + DeviceTypes deviceType = DeviceTypes::Unknown; }; } } \ No newline at end of file diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index ab73969d..de93428c 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -329,7 +329,7 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction) break; case Apps::SysInfo: currentScreen = - std::make_unique(this, dateTimeController, batteryController, brightnessController, bleController, watchdog); + std::make_unique(this, dateTimeController, batteryController, brightnessController, bleController, watchdog, motionController); ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown); break; case Apps::FlashLight: diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp index 9ff28288..0b16d633 100644 --- a/src/displayapp/screens/SystemInfo.cpp +++ b/src/displayapp/screens/SystemInfo.cpp @@ -7,22 +7,37 @@ #include "components/ble/BleController.h" #include "components/brightness/BrightnessController.h" #include "components/datetime/DateTimeController.h" +#include "components/motion/MotionController.h" #include "drivers/Watchdog.h" using namespace Pinetime::Applications::Screens; +namespace { + const char* ToString(const Pinetime::Controllers::MotionController::DeviceTypes deviceType) { + switch (deviceType) { + case Pinetime::Controllers::MotionController::DeviceTypes::BMA421: + return "BMA421"; + case Pinetime::Controllers::MotionController::DeviceTypes::BMA425: + return "BMA425"; + } + return "???"; + } +} + SystemInfo::SystemInfo(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::DateTime& dateTimeController, Pinetime::Controllers::Battery& batteryController, Pinetime::Controllers::BrightnessController& brightnessController, Pinetime::Controllers::Ble& bleController, - Pinetime::Drivers::WatchdogView& watchdog) + Pinetime::Drivers::WatchdogView& watchdog, + Pinetime::Controllers::MotionController& motionController) : Screen(app), dateTimeController {dateTimeController}, batteryController {batteryController}, brightnessController {brightnessController}, bleController {bleController}, watchdog {watchdog}, + motionController{motionController}, screens {app, 0, {[this]() -> std::unique_ptr { @@ -132,9 +147,7 @@ std::unique_ptr SystemInfo::CreateScreen2() { // hack to not use the flot functions from printf uint8_t batteryVoltageBytes[2]; batteryVoltageBytes[1] = static_cast(batteryVoltage); // truncate whole numbers - batteryVoltageBytes[0] = - static_cast((batteryVoltage - batteryVoltageBytes[1]) * 100); // remove whole part of flt and shift 2 places over - // + batteryVoltageBytes[0] = static_cast((batteryVoltage - batteryVoltageBytes[1]) * 100); // remove whole part of flt and shift 2 places over lv_obj_t* label = lv_label_create(lv_scr_act(), nullptr); lv_label_set_recolor(label, true); @@ -144,7 +157,8 @@ std::unique_ptr SystemInfo::CreateScreen2() { "#444444 Uptime#\n %02lud %02lu:%02lu:%02lu\n" "#444444 Battery# %d%%/%1i.%02iv\n" "#444444 Backlight# %s\n" - "#444444 Last reset# %s\n", + "#444444 Last reset# %s\n" + "#444444 Accel.# %s\n", dateTimeController.Day(), static_cast(dateTimeController.Month()), dateTimeController.Year(), @@ -159,7 +173,8 @@ std::unique_ptr SystemInfo::CreateScreen2() { batteryVoltageBytes[1], batteryVoltageBytes[0], brightnessController.ToString(), - resetReason); + resetReason, + ToString(motionController.DeviceType())); lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0); return std::make_unique(1, 5, app, label); } diff --git a/src/displayapp/screens/SystemInfo.h b/src/displayapp/screens/SystemInfo.h index c61a07a2..9d471f61 100644 --- a/src/displayapp/screens/SystemInfo.h +++ b/src/displayapp/screens/SystemInfo.h @@ -27,7 +27,8 @@ namespace Pinetime { Pinetime::Controllers::Battery& batteryController, Pinetime::Controllers::BrightnessController& brightnessController, Pinetime::Controllers::Ble& bleController, - Pinetime::Drivers::WatchdogView& watchdog); + Pinetime::Drivers::WatchdogView& watchdog, + Pinetime::Controllers::MotionController& motionController); ~SystemInfo() override; bool Refresh() override; bool OnButtonPushed() override; @@ -41,6 +42,7 @@ namespace Pinetime { Pinetime::Controllers::BrightnessController& brightnessController; Pinetime::Controllers::Ble& bleController; Pinetime::Drivers::WatchdogView& watchdog; + Pinetime::Controllers::MotionController& motionController; ScreenList<5> screens; diff --git a/src/drivers/Bma421.cpp b/src/drivers/Bma421.cpp index 35b2c105..dd284000 100644 --- a/src/drivers/Bma421.cpp +++ b/src/drivers/Bma421.cpp @@ -42,6 +42,12 @@ void Bma421::Init() { if (ret != BMA4_OK) return; + switch(bma.chip_id) { + case BMA423_CHIP_ID: deviceType = DeviceTypes::BMA421; break; + case BMA425_CHIP_ID: deviceType = DeviceTypes::BMA425; break; + default: deviceType = DeviceTypes::Unknown; break; + } + ret = bma423_write_config_file(&bma); if (ret != BMA4_OK) return; @@ -121,3 +127,6 @@ void Bma421::SoftReset() { nrf_delay_ms(1); } } +Bma421::DeviceTypes Bma421::DeviceType() const { + return deviceType; +} diff --git a/src/drivers/Bma421.h b/src/drivers/Bma421.h index e4d925f5..ace644bd 100644 --- a/src/drivers/Bma421.h +++ b/src/drivers/Bma421.h @@ -6,6 +6,11 @@ namespace Pinetime { class TwiMaster; class Bma421 { public: + enum class DeviceTypes : uint8_t { + Unknown, + BMA421, + BMA425 + }; struct Values { uint32_t steps; int16_t x; @@ -29,6 +34,7 @@ namespace Pinetime { void Write(uint8_t registerAddress, const uint8_t* data, size_t size); bool IsOk() const; + DeviceTypes DeviceType() const; private: void Reset(); @@ -38,6 +44,7 @@ namespace Pinetime { struct bma4_dev bma; bool isOk = false; bool isResetOk = false; + DeviceTypes deviceType = DeviceTypes::Unknown; }; } } \ No newline at end of file diff --git a/src/drivers/Bma421_C/bma423.c b/src/drivers/Bma421_C/bma423.c index 1d782705..7d6c2e0a 100644 --- a/src/drivers/Bma421_C/bma423.c +++ b/src/drivers/Bma421_C/bma423.c @@ -43,6 +43,521 @@ #include "bma423.h" /**\name Feature configuration file */ +const uint8_t bma425_config_file[] = { + 0x80, 0x2e, 0xfd, 0x00, 0x80, 0x2e, 0xff, 0x00, 0xc8, 0x2e, 0x00, 0x2e, + 0x80, 0x2e, 0xfb, 0x00, 0x80, 0x2e, 0xdd, 0xb0, 0x80, 0x2e, 0xfe, 0x00, + 0x80, 0x2e, 0xfc, 0x00, 0x80, 0x2e, 0x0d, 0xb1, 0x50, 0x39, 0x21, 0x2e, + 0xb0, 0xf0, 0x10, 0x30, 0x21, 0x2e, 0x16, 0xf0, 0x80, 0x2e, 0x34, 0xb1, + 0x65, 0x50, 0x4f, 0x52, 0x01, 0x42, 0x3b, 0x80, 0x41, 0x30, 0x01, 0x42, + 0x3c, 0x80, 0x00, 0x2e, 0x01, 0x40, 0x01, 0x42, 0x21, 0x2e, 0xff, 0xaf, + 0xb8, 0x2e, 0x1f, 0x7f, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0xfd, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x08, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, + 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x2e, + 0x55, 0xf0, 0xc0, 0x2e, 0x21, 0x2e, 0x55, 0xf0, 0x30, 0x50, 0x00, 0x30, + 0x51, 0x56, 0x05, 0x30, 0x05, 0x2c, 0xfb, 0x7f, 0x3e, 0xbe, 0xd2, 0xba, + 0xb2, 0xb9, 0x6c, 0x0b, 0x53, 0x0e, 0xf9, 0x2f, 0x53, 0x1a, 0x01, 0x2f, + 0x4d, 0x0e, 0xf5, 0x2f, 0xd2, 0x7f, 0x04, 0x30, 0x1f, 0x2c, 0xe1, 0x7f, + 0xc5, 0x01, 0xa3, 0x03, 0x72, 0x0e, 0x03, 0x2f, 0x72, 0x1a, 0x0f, 0x2f, + 0x79, 0x0f, 0x0d, 0x2f, 0xe1, 0x6f, 0x4f, 0x04, 0x5f, 0xb9, 0xb1, 0xbf, + 0xfa, 0x0b, 0xd2, 0x6f, 0x96, 0x06, 0xb1, 0x25, 0x51, 0xbf, 0xeb, 0x7f, + 0x06, 0x00, 0xb2, 0x25, 0x27, 0x03, 0xdb, 0x7f, 0xcf, 0xbf, 0x3e, 0xbf, + 0x01, 0xb8, 0xd2, 0xba, 0x41, 0xba, 0xb2, 0xb9, 0x07, 0x0a, 0x6e, 0x0b, + 0xc0, 0x90, 0xdf, 0x2f, 0x40, 0x91, 0xdd, 0x2f, 0xfb, 0x6f, 0xd0, 0x5f, + 0xb8, 0x2e, 0x00, 0x31, 0xc0, 0x2e, 0x21, 0x2e, 0xba, 0xf0, 0xc8, 0x2e, + 0xc8, 0x2e, 0xc8, 0x2e, 0xc8, 0x2e, 0xc8, 0x2e, 0xaa, 0x00, 0x05, 0x00, + 0xaa, 0x00, 0x05, 0x00, 0x2d, 0x01, 0xd4, 0x7b, 0x3b, 0x01, 0xdb, 0x7a, + 0x04, 0x00, 0x3f, 0x7b, 0xcd, 0x6c, 0xc3, 0x04, 0x85, 0x09, 0xc3, 0x04, + 0xec, 0xe6, 0x0c, 0x46, 0x01, 0x00, 0x27, 0x00, 0x19, 0x00, 0x96, 0x00, + 0xa0, 0x00, 0x01, 0x00, 0x0c, 0x00, 0xf0, 0x3c, 0x00, 0x01, 0x01, 0x00, + 0x03, 0x00, 0x01, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x47, 0x28, 0x88, 0x00, 0x54, 0x00, 0x51, 0x00, 0x97, 0x00, + 0xa0, 0x00, 0x80, 0x00, 0x00, 0x40, 0xff, 0x7f, 0x00, 0x80, 0xaf, 0x00, + 0xff, 0x00, 0xff, 0xb7, 0x00, 0x02, 0x00, 0xb0, 0x05, 0x80, 0xb1, 0xf0, + 0x5e, 0xf0, 0xc0, 0x00, 0x59, 0xf0, 0x39, 0xf0, 0x57, 0x00, 0x89, 0xf0, + 0x54, 0x00, 0x00, 0x20, 0x82, 0x00, 0x59, 0x00, 0x5d, 0x00, 0x81, 0x00, + 0xff, 0xfb, 0x52, 0xf0, 0x56, 0xf0, 0x33, 0x09, 0x33, 0x07, 0x00, 0x08, + 0x90, 0x01, 0x00, 0xf8, 0x00, 0x01, 0x02, 0x01, 0x60, 0x00, 0x6a, 0x00, + 0x4c, 0x04, 0xa0, 0x00, 0xe8, 0x03, 0x81, 0x00, 0x82, 0x00, 0xeb, 0x07, + 0xae, 0x07, 0xaa, 0x00, 0x75, 0x00, 0xff, 0x0f, 0xdb, 0x00, 0xb6, 0x01, + 0x70, 0x69, 0x26, 0xd3, 0x9c, 0x07, 0xbc, 0x02, 0x1f, 0x05, 0x9d, 0x00, + 0xa8, 0x05, 0xee, 0x06, 0x01, 0xf0, 0xbc, 0x05, 0x37, 0x08, 0xbb, 0x06, + 0x37, 0xfa, 0xb2, 0x00, 0xff, 0x03, 0x98, 0x2e, 0x15, 0xb0, 0x20, 0x26, + 0x98, 0x2e, 0xf7, 0x00, 0x98, 0x2e, 0xc4, 0xb0, 0x10, 0x30, 0x21, 0x2e, + 0x59, 0xf0, 0x98, 0x2e, 0xb9, 0x00, 0x98, 0x2e, 0x7a, 0xb4, 0x98, 0x2e, + 0x89, 0xb4, 0x00, 0x2e, 0x00, 0x2e, 0xd0, 0x2e, 0x98, 0x2e, 0xa7, 0xb0, + 0x01, 0x2e, 0x58, 0x00, 0x00, 0xb2, 0x1a, 0x2f, 0x00, 0x30, 0x21, 0x2e, + 0x58, 0x00, 0x47, 0x50, 0x98, 0x2e, 0x65, 0xb0, 0x03, 0x2e, 0x1e, 0x01, + 0x47, 0x50, 0x02, 0x30, 0x98, 0x2e, 0x28, 0xb5, 0x03, 0x2e, 0x1f, 0x01, + 0x47, 0x50, 0x12, 0x30, 0x98, 0x2e, 0x28, 0xb5, 0x01, 0x2e, 0x03, 0xf0, + 0x0d, 0xbc, 0x0f, 0xb8, 0x00, 0x90, 0x02, 0x2f, 0x4f, 0x50, 0x21, 0x2e, + 0xbc, 0xf0, 0x01, 0x2e, 0x57, 0x00, 0x00, 0xb2, 0x25, 0x2f, 0x00, 0x30, + 0x21, 0x2e, 0x57, 0x00, 0x49, 0x50, 0x98, 0x2e, 0x65, 0xb0, 0x49, 0x50, + 0x98, 0x2e, 0xc1, 0xb1, 0x49, 0x50, 0x98, 0x2e, 0x34, 0xb6, 0x49, 0x50, + 0x4b, 0x52, 0x98, 0x2e, 0xa4, 0xb4, 0x49, 0x50, 0x4d, 0x52, 0x98, 0x2e, + 0xa4, 0xb4, 0x01, 0x2e, 0x1e, 0x01, 0x0f, 0xbc, 0x0f, 0xb8, 0x00, 0x90, + 0x4f, 0x50, 0x08, 0x2f, 0x03, 0x2e, 0x1f, 0x01, 0x9f, 0xbc, 0x9f, 0xb8, + 0x40, 0x90, 0x02, 0x2f, 0x21, 0x2e, 0xbc, 0xf0, 0x02, 0x2d, 0x21, 0x2e, + 0xba, 0xf0, 0x98, 0x2e, 0xb9, 0x00, 0xaf, 0x2d, 0x10, 0x50, 0xfb, 0x7f, + 0x21, 0x25, 0x98, 0x2e, 0xf4, 0x01, 0xfb, 0x6f, 0x21, 0x25, 0xf0, 0x5f, + 0x10, 0x25, 0x80, 0x2e, 0xbe, 0x00, 0x94, 0x01, 0xdd, 0x03, 0xc0, 0xad, + 0x0b, 0x2f, 0xc0, 0xa8, 0x03, 0x2f, 0xc0, 0x90, 0x07, 0x2f, 0x80, 0xa6, + 0x05, 0x2f, 0x40, 0xa9, 0x12, 0x2f, 0x40, 0x91, 0x01, 0x2f, 0x00, 0xab, + 0x0e, 0x2f, 0xc0, 0xac, 0x00, 0x30, 0x55, 0x52, 0x07, 0x2f, 0xc0, 0xa9, + 0x03, 0x2f, 0xc0, 0x91, 0x03, 0x2f, 0x80, 0xa7, 0x01, 0x2f, 0x40, 0xa1, + 0x05, 0x2f, 0xc0, 0x2e, 0x17, 0x25, 0x06, 0x25, 0xc0, 0x2e, 0xf0, 0x3f, + 0x53, 0x52, 0xb8, 0x2e, 0x83, 0x86, 0x01, 0x30, 0x00, 0x30, 0x94, 0x40, + 0x24, 0x18, 0x06, 0x00, 0x53, 0x0e, 0x4f, 0x02, 0xf9, 0x2f, 0xb8, 0x2e, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0xa8, 0x03, 0x25, 0x10, 0x2f, 0x80, 0x90, + 0x01, 0x2f, 0x41, 0x0e, 0x0c, 0x2f, 0xf3, 0x3f, 0x18, 0x05, 0x05, 0x30, + 0x5d, 0x07, 0x15, 0x0e, 0x03, 0x2f, 0x55, 0x1a, 0x02, 0x2f, 0xcc, 0x0f, + 0x00, 0x2f, 0x58, 0x04, 0x01, 0x25, 0xb8, 0x2e, 0xb8, 0x2e, 0x63, 0x50, + 0x41, 0x30, 0x02, 0x40, 0x51, 0x0a, 0x01, 0x42, 0x18, 0x82, 0x57, 0x50, + 0x60, 0x42, 0x70, 0x3c, 0x59, 0x54, 0x42, 0x42, 0x69, 0x82, 0x82, 0x32, + 0x43, 0x40, 0x18, 0x08, 0x02, 0x0a, 0x40, 0x42, 0x42, 0x80, 0x02, 0x3f, + 0x01, 0x40, 0x10, 0x50, 0x4a, 0x08, 0xfb, 0x7f, 0x11, 0x42, 0x0b, 0x31, + 0x0b, 0x42, 0x3e, 0x80, 0x31, 0x32, 0x01, 0x42, 0x00, 0x2e, 0x01, 0x2e, + 0x40, 0xf0, 0x13, 0x90, 0x20, 0x2f, 0x03, 0x30, 0x5d, 0x50, 0x5b, 0x54, + 0x14, 0x35, 0x06, 0x30, 0x61, 0x52, 0x55, 0x32, 0x1d, 0x1a, 0xe3, 0x22, + 0x18, 0x1a, 0x5f, 0x58, 0xe3, 0x22, 0x04, 0x30, 0xd5, 0x40, 0xb5, 0x0d, + 0xe1, 0xbe, 0x6f, 0xbb, 0x80, 0x91, 0xa9, 0x0d, 0x01, 0x89, 0xb5, 0x23, + 0x10, 0xa1, 0xf7, 0x2f, 0xda, 0x0e, 0x14, 0x35, 0xeb, 0x2f, 0x01, 0x2e, + 0x25, 0x00, 0x70, 0x1a, 0x00, 0x30, 0x21, 0x30, 0x02, 0x2c, 0x08, 0x22, + 0x30, 0x30, 0x00, 0xb2, 0x06, 0x2f, 0x21, 0x2e, 0x59, 0xf0, 0x98, 0x2e, + 0xb9, 0x00, 0x00, 0x2e, 0x00, 0x2e, 0xd0, 0x2e, 0xfb, 0x6f, 0xf0, 0x5f, + 0xb8, 0x2e, 0x70, 0x50, 0x03, 0x2e, 0x22, 0x01, 0xf1, 0x7f, 0x2a, 0x25, + 0xb9, 0x82, 0xe0, 0x7f, 0xdb, 0x7f, 0x00, 0x30, 0x45, 0x30, 0x32, 0x30, + 0x03, 0x30, 0x04, 0x30, 0xf6, 0x6f, 0xf2, 0x09, 0xfc, 0x13, 0xc2, 0xab, + 0xb5, 0x09, 0xc7, 0x23, 0x80, 0xb3, 0xe6, 0x6f, 0xb7, 0x01, 0x00, 0x2e, + 0x8b, 0x41, 0x4b, 0x42, 0x05, 0x2f, 0xc5, 0x7f, 0x05, 0x30, 0x46, 0x40, + 0xae, 0x05, 0xc5, 0x6f, 0x46, 0x42, 0x01, 0x80, 0x23, 0xbd, 0xd3, 0xbe, + 0x03, 0x89, 0x41, 0x82, 0xdf, 0x0c, 0x03, 0xa2, 0xe4, 0x2f, 0xe0, 0x6f, + 0x91, 0x6f, 0x11, 0x42, 0xc3, 0xb2, 0xa1, 0x6f, 0x11, 0x42, 0x00, 0x2e, + 0xb1, 0x6f, 0x01, 0x42, 0x06, 0x2f, 0x00, 0x32, 0x03, 0x2e, 0x59, 0xf0, + 0x08, 0x0a, 0x21, 0x2e, 0x59, 0xf0, 0x06, 0x2d, 0xf1, 0x3d, 0x01, 0x2e, + 0x59, 0xf0, 0x01, 0x08, 0x21, 0x2e, 0x59, 0xf0, 0xdb, 0x6f, 0x90, 0x5f, + 0xb8, 0x2e, 0x69, 0x50, 0x05, 0x2e, 0x00, 0xf0, 0x4f, 0x56, 0xd3, 0x0f, + 0x01, 0x40, 0xf4, 0x33, 0x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 0x98, 0x2e, 0xd1, 0x01, 0xf2, 0x6f, + 0xd5, 0x6f, 0xca, 0x16, 0x55, 0x18, 0xdd, 0x18, 0x95, 0x6f, 0xea, 0x18, + 0x73, 0x5a, 0x31, 0x25, 0x75, 0x01, 0x01, 0x30, 0x20, 0x25, 0x39, 0x02, + 0x5e, 0xba, 0x82, 0xbc, 0x8e, 0xb6, 0x21, 0x0b, 0x98, 0x2e, 0xd1, 0x01, + 0xe2, 0x6f, 0xb5, 0x6f, 0x2a, 0x18, 0xe0, 0x7f, 0xf1, 0x7f, 0x04, 0x30, + 0x73, 0x54, 0xf2, 0x00, 0x7c, 0x02, 0x85, 0x6f, 0xd0, 0x6f, 0x0d, 0x17, + 0x68, 0x18, 0xe0, 0x18, 0x90, 0x6f, 0xc4, 0x6f, 0xc5, 0x18, 0xeb, 0x6f, + 0xb2, 0x01, 0x1b, 0x43, 0x02, 0x30, 0x7a, 0x03, 0xfb, 0x6f, 0x3d, 0x8f, + 0x0b, 0x43, 0x3e, 0xba, 0x12, 0xbd, 0x52, 0xbc, 0x6e, 0xbb, 0xa2, 0x0a, + 0x9e, 0xb5, 0xde, 0xb6, 0x30, 0x0b, 0xf7, 0x7f, 0x98, 0x2e, 0xd1, 0x01, + 0xf5, 0x6f, 0x31, 0x25, 0xd1, 0x6f, 0x92, 0x6f, 0xab, 0x6f, 0x50, 0x43, + 0x43, 0x43, 0x90, 0x5f, 0x53, 0x56, 0x80, 0x2e, 0x00, 0xb0, 0x10, 0x50, + 0x03, 0x40, 0x19, 0x18, 0x55, 0x56, 0x19, 0x05, 0x36, 0x25, 0xf7, 0x7f, + 0x4a, 0x17, 0x54, 0x18, 0xec, 0x18, 0x09, 0x17, 0x01, 0x30, 0x0c, 0x07, + 0xe2, 0x18, 0xde, 0x00, 0xf2, 0x6f, 0x97, 0x02, 0x51, 0x58, 0xdc, 0x00, + 0x91, 0x02, 0xbf, 0xb8, 0x21, 0xbd, 0x8a, 0x0a, 0xc0, 0x2e, 0x02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 0x2e, + 0x5c, 0x00, 0x75, 0x52, 0x7b, 0x5c, 0x98, 0x2e, 0xbe, 0xb2, 0x90, 0x6f, + 0x00, 0xb2, 0x0b, 0x2f, 0xf0, 0x6f, 0x00, 0xb2, 0x08, 0x2f, 0x77, 0x58, + 0x79, 0x50, 0x12, 0x41, 0x12, 0x42, 0x21, 0x30, 0x04, 0x41, 0x04, 0x42, + 0x23, 0x2e, 0x5e, 0xf0, 0xc0, 0x6f, 0x00, 0xb2, 0x26, 0x2f, 0x74, 0x6f, + 0x80, 0x6f, 0x7f, 0x54, 0x88, 0xbd, 0xc8, 0xb8, 0x4b, 0x0a, 0x94, 0x42, + 0x91, 0x42, 0x90, 0x42, 0x88, 0xba, 0x77, 0x52, 0xf3, 0x6f, 0x54, 0x42, + 0x85, 0x42, 0xc0, 0x90, 0x40, 0x42, 0x15, 0x2f, 0x79, 0x52, 0x00, 0x2e, + 0x52, 0x40, 0x41, 0x40, 0xa2, 0x04, 0x41, 0x06, 0x40, 0xaa, 0x04, 0x2f, + 0x40, 0x90, 0x0b, 0x2f, 0xb1, 0x6f, 0x4a, 0x0f, 0x08, 0x2f, 0xb2, 0x6f, + 0x80, 0xb2, 0x05, 0x2f, 0x79, 0x54, 0x21, 0x30, 0x94, 0x42, 0x80, 0x42, + 0x23, 0x2e, 0x5e, 0xf0, 0xd0, 0x6f, 0x00, 0xb2, 0x13, 0x2f, 0x01, 0x2e, + 0x5b, 0x00, 0x09, 0x2e, 0x81, 0x00, 0x04, 0x1a, 0x0d, 0x2f, 0x81, 0x50, + 0x29, 0x2e, 0x5b, 0x00, 0x24, 0x42, 0x44, 0x30, 0x02, 0x40, 0x02, 0x42, + 0x09, 0x80, 0x00, 0x2e, 0x04, 0x42, 0x03, 0x2d, 0x10, 0x30, 0x21, 0x2e, + 0x5f, 0x00, 0xeb, 0x6f, 0x70, 0x5f, 0xb8, 0x2e, 0x09, 0x86, 0x51, 0x54, + 0xe4, 0x40, 0xc3, 0x80, 0x94, 0x04, 0xc3, 0x40, 0x13, 0x05, 0x05, 0x40, + 0x25, 0x05, 0x8a, 0x17, 0x73, 0x30, 0x73, 0x09, 0x8c, 0x17, 0xf3, 0x08, + 0xe3, 0x00, 0x4c, 0x82, 0x15, 0x01, 0xb3, 0xb5, 0x53, 0x42, 0x8b, 0x16, + 0x43, 0xb6, 0x52, 0x42, 0x4c, 0x17, 0x54, 0x42, 0x55, 0x42, 0x53, 0x42, + 0x52, 0x42, 0x54, 0x42, 0x45, 0x42, 0x6d, 0x82, 0x83, 0x54, 0x52, 0x42, + 0x10, 0x50, 0x85, 0x54, 0x52, 0x42, 0xfb, 0x7f, 0x22, 0x30, 0x87, 0x56, + 0x43, 0x42, 0x44, 0x82, 0x0b, 0x30, 0x52, 0x42, 0x5b, 0x42, 0x7c, 0x84, + 0x4b, 0x42, 0x35, 0x82, 0x90, 0x80, 0x8b, 0x42, 0x0b, 0x42, 0x35, 0x80, + 0x04, 0x30, 0x0b, 0x42, 0x37, 0x80, 0x15, 0x30, 0x60, 0x25, 0x98, 0x2e, + 0xb1, 0xb2, 0x8b, 0x83, 0xfb, 0x6f, 0x65, 0x42, 0xc0, 0x2e, 0x44, 0x42, + 0xf0, 0x5f, 0x05, 0x80, 0x02, 0x30, 0x51, 0x82, 0x02, 0x42, 0x13, 0x30, + 0x41, 0x40, 0x4b, 0x08, 0x89, 0x54, 0x3e, 0x80, 0x51, 0x14, 0xc0, 0x2e, + 0x01, 0x42, 0x00, 0x2e, 0x40, 0x51, 0xd1, 0x7f, 0x12, 0x25, 0x02, 0x30, + 0x42, 0x43, 0x32, 0x30, 0x82, 0x43, 0xc6, 0x7f, 0xe5, 0x7f, 0xb4, 0x7f, + 0xa3, 0x7f, 0x90, 0x7f, 0x8b, 0x7f, 0x98, 0x2e, 0xc6, 0x01, 0xc0, 0x7e, + 0x00, 0xac, 0x01, 0x2f, 0x53, 0x50, 0xc0, 0x7e, 0x00, 0x2e, 0x90, 0x6f, + 0x09, 0x8a, 0xd1, 0x6f, 0x75, 0x7f, 0x4c, 0x82, 0x63, 0x41, 0x65, 0x7f, + 0x11, 0x7f, 0x00, 0x2e, 0x64, 0x41, 0x44, 0x85, 0x52, 0x7f, 0x45, 0x7f, + 0x00, 0x2e, 0xa6, 0x40, 0x80, 0x40, 0x32, 0x7f, 0x82, 0x8e, 0xc2, 0x6e, + 0x45, 0x41, 0xf0, 0x7f, 0x27, 0x7f, 0x02, 0x7f, 0x98, 0x2e, 0x38, 0xb1, + 0x23, 0x6f, 0xd1, 0x6f, 0xc2, 0x40, 0xf9, 0x86, 0x23, 0x7f, 0x80, 0xb2, + 0xe0, 0x7e, 0x0f, 0x2f, 0x32, 0x6f, 0x64, 0x6f, 0x82, 0x40, 0xf2, 0x7f, + 0x50, 0x82, 0x42, 0x6f, 0x50, 0x6f, 0x73, 0x6f, 0x85, 0x40, 0xc3, 0x40, + 0x04, 0x41, 0x06, 0x40, 0xe2, 0x6e, 0x98, 0x2e, 0x38, 0xb1, 0xe0, 0x7e, + 0xf3, 0x31, 0x10, 0x6f, 0x36, 0x80, 0xe1, 0x6e, 0x02, 0x40, 0x71, 0x7f, + 0x51, 0x04, 0x02, 0x30, 0x40, 0xa8, 0x91, 0x04, 0x4a, 0x22, 0x89, 0x16, + 0x93, 0x08, 0x4a, 0x00, 0x95, 0xb4, 0x09, 0x18, 0x8e, 0x16, 0x13, 0x30, + 0x93, 0x08, 0x21, 0x6f, 0x60, 0x7f, 0x4d, 0x86, 0x02, 0x80, 0xb2, 0x00, + 0x41, 0x40, 0x21, 0xb5, 0x50, 0x7f, 0x43, 0x7f, 0x98, 0x2e, 0xa7, 0xb1, + 0x40, 0x6f, 0x62, 0x6f, 0x55, 0x6f, 0x13, 0x40, 0x84, 0x40, 0x01, 0x40, + 0x45, 0x41, 0x42, 0xbe, 0x1d, 0x18, 0x4c, 0x04, 0x31, 0x0f, 0x04, 0x8a, + 0xc0, 0x6f, 0x11, 0x30, 0x02, 0x2f, 0x00, 0x2e, 0x03, 0x2c, 0x01, 0x42, + 0x23, 0x30, 0x03, 0x42, 0x00, 0x2e, 0xd6, 0x6f, 0x44, 0x41, 0x8a, 0x87, + 0x76, 0x8b, 0x00, 0xb3, 0x53, 0x7f, 0x15, 0x2f, 0x04, 0x6f, 0x8b, 0x5e, + 0x8b, 0x8d, 0xe7, 0x01, 0xc0, 0xa5, 0x84, 0x41, 0x01, 0x2f, 0x00, 0xa1, + 0x03, 0x2f, 0xc0, 0xad, 0x08, 0x2f, 0x00, 0xa5, 0x06, 0x2f, 0xc6, 0x40, + 0x81, 0x8d, 0x07, 0x30, 0x3c, 0x05, 0xd6, 0x42, 0x04, 0x2c, 0xc4, 0x42, + 0x02, 0x2c, 0x07, 0x30, 0x07, 0x30, 0x86, 0x86, 0x94, 0x6f, 0xd7, 0x7e, + 0x0e, 0x8d, 0x00, 0x40, 0x74, 0x89, 0xc7, 0x40, 0x02, 0xb2, 0xf9, 0x29, + 0x45, 0x41, 0x86, 0x41, 0xbe, 0x80, 0x21, 0x41, 0x75, 0x23, 0x82, 0x40, + 0xc7, 0x42, 0x45, 0x7f, 0x34, 0x7f, 0x20, 0x7f, 0x98, 0x2e, 0xa7, 0xb1, + 0x31, 0x6f, 0x60, 0x6f, 0x24, 0x6f, 0x22, 0x40, 0x05, 0x41, 0x43, 0x40, + 0x13, 0x01, 0x43, 0x86, 0xac, 0x0f, 0xd1, 0x6f, 0x30, 0x7f, 0x00, 0x2f, + 0x44, 0x42, 0x48, 0x8a, 0x41, 0x88, 0xe1, 0x40, 0x13, 0x7f, 0x04, 0x7f, + 0xf5, 0x7e, 0x98, 0x2e, 0xa7, 0xb1, 0x11, 0x6f, 0x60, 0x6f, 0x34, 0x6f, + 0x42, 0x40, 0x03, 0x40, 0x9a, 0x04, 0x04, 0x41, 0x43, 0x82, 0xa2, 0x0e, + 0x03, 0x6f, 0x00, 0x2f, 0xc2, 0x42, 0x00, 0x2e, 0x41, 0x40, 0x72, 0x6f, + 0x98, 0x2e, 0xa7, 0xb1, 0x25, 0x6f, 0x72, 0x6f, 0x53, 0x41, 0x93, 0x0e, + 0xd1, 0x6f, 0x46, 0x80, 0x1b, 0x30, 0x03, 0x30, 0x0c, 0x2f, 0x04, 0x40, + 0x00, 0x91, 0x42, 0x42, 0x08, 0x2f, 0xf6, 0x6e, 0x44, 0x6f, 0x86, 0x41, + 0xb4, 0x0e, 0x03, 0x2f, 0x02, 0x88, 0xdb, 0x7e, 0x03, 0x43, 0x0b, 0x42, + 0x46, 0x8d, 0x44, 0x41, 0x47, 0x80, 0x05, 0x6f, 0x94, 0x0f, 0x76, 0x7f, + 0x60, 0x7f, 0x02, 0x2f, 0x45, 0x89, 0x42, 0x43, 0x03, 0x43, 0x49, 0x88, + 0xa5, 0x6f, 0x40, 0x91, 0xa4, 0x7f, 0x15, 0x30, 0xe2, 0x6f, 0xd3, 0x6e, + 0x03, 0x2f, 0x04, 0x30, 0x83, 0x42, 0x80, 0x2e, 0x62, 0xb4, 0x04, 0x40, + 0x25, 0x29, 0x04, 0x42, 0x83, 0x42, 0x45, 0x82, 0x94, 0x6f, 0x04, 0x85, + 0xc0, 0xb2, 0x90, 0x2e, 0x4e, 0xb4, 0x15, 0x87, 0x3c, 0x8c, 0xc4, 0x40, + 0x46, 0x7f, 0xc2, 0x86, 0x07, 0x40, 0x86, 0x41, 0xf4, 0xbf, 0x00, 0xb3, + 0x0c, 0x2f, 0x90, 0x6f, 0x16, 0x80, 0x46, 0x25, 0x00, 0x40, 0x57, 0x25, + 0x04, 0x18, 0xae, 0x0e, 0x10, 0x30, 0x06, 0x30, 0x75, 0x25, 0x46, 0x23, + 0x60, 0x6f, 0x64, 0x25, 0xc4, 0x40, 0xfa, 0x86, 0x00, 0xb3, 0x33, 0x7f, + 0x09, 0x2f, 0x93, 0x6f, 0xd8, 0x88, 0x53, 0x6f, 0x04, 0x41, 0xc3, 0x40, + 0xdc, 0x0e, 0x13, 0x30, 0x04, 0x30, 0xdc, 0x22, 0xb3, 0x25, 0x40, 0xb3, + 0x02, 0x2f, 0x3b, 0x25, 0xc0, 0x90, 0x05, 0x2f, 0x91, 0x6f, 0xd0, 0x6f, + 0x98, 0x2e, 0xb1, 0xb2, 0x4d, 0x2c, 0x04, 0x30, 0x8d, 0x88, 0x43, 0x40, + 0x82, 0x40, 0x54, 0x7f, 0xda, 0x0f, 0x04, 0x30, 0x08, 0x2f, 0xc1, 0x80, + 0x40, 0x42, 0xc2, 0x0f, 0x02, 0x2f, 0x00, 0x30, 0xc0, 0x7e, 0x1b, 0x2d, + 0xc0, 0x7e, 0x19, 0x2d, 0xe1, 0xbc, 0x92, 0x6f, 0x4f, 0x04, 0x90, 0x84, + 0x40, 0xa8, 0x21, 0x05, 0x83, 0x40, 0x4c, 0x22, 0x4b, 0x0e, 0xb6, 0x84, + 0x21, 0x30, 0x02, 0x2f, 0x11, 0x30, 0x04, 0x2c, 0xc1, 0x7e, 0xe3, 0x6f, + 0xc1, 0x7e, 0xc1, 0x42, 0x00, 0x2e, 0x00, 0x40, 0x81, 0x40, 0x04, 0xbd, + 0x40, 0x6f, 0x98, 0x2e, 0xa7, 0xb1, 0x50, 0x6f, 0x11, 0x30, 0x02, 0x40, + 0x51, 0x08, 0xc3, 0x6e, 0x03, 0x80, 0x99, 0x15, 0x0b, 0x40, 0xb1, 0x6f, + 0xd0, 0x6f, 0xb6, 0x7f, 0x5b, 0x7f, 0x04, 0x30, 0x59, 0x54, 0x03, 0x30, + 0x11, 0x2c, 0x14, 0x80, 0x55, 0x6f, 0x06, 0x40, 0x75, 0x01, 0x58, 0xbb, + 0x6a, 0x09, 0x05, 0x42, 0xc1, 0x86, 0x47, 0x40, 0x51, 0x25, 0xbe, 0x01, + 0x56, 0x43, 0x00, 0x2e, 0x46, 0x41, 0xf4, 0x03, 0xb6, 0x6f, 0x47, 0x43, + 0x5e, 0x0e, 0xed, 0x2f, 0x31, 0x6f, 0x60, 0x6f, 0x42, 0x40, 0x15, 0x30, + 0x02, 0x82, 0x95, 0x08, 0x04, 0x42, 0x52, 0x42, 0x02, 0x2c, 0x44, 0x42, + 0x04, 0x30, 0x3e, 0x8e, 0x91, 0x6f, 0x4f, 0x8c, 0x02, 0x40, 0x83, 0x41, + 0xb5, 0x8d, 0x93, 0x0e, 0xd0, 0x6f, 0x01, 0x2f, 0x98, 0x2e, 0xb1, 0xb2, + 0x00, 0x2e, 0xc0, 0x41, 0x81, 0x41, 0xc1, 0x0f, 0xc0, 0x6f, 0x01, 0x2f, + 0x04, 0x42, 0x00, 0x2e, 0x70, 0x6f, 0x3c, 0x82, 0x00, 0x40, 0x41, 0x40, + 0x89, 0x16, 0x95, 0x08, 0x4a, 0x00, 0x04, 0xbc, 0x91, 0xb4, 0x01, 0x0e, + 0xe0, 0x6f, 0x07, 0x2f, 0xa1, 0x6f, 0x00, 0x2e, 0x41, 0x40, 0x40, 0xb2, + 0x02, 0x2f, 0xa1, 0x6f, 0x05, 0x42, 0x44, 0x42, 0x00, 0x2e, 0x8b, 0x6f, + 0xc0, 0x5e, 0xb8, 0x2e, 0x10, 0x50, 0x8d, 0x52, 0x4b, 0x50, 0xfb, 0x7f, + 0x98, 0x2e, 0x98, 0xb4, 0x4b, 0x52, 0x45, 0x82, 0x10, 0x30, 0x50, 0x42, + 0x60, 0x30, 0xfb, 0x6f, 0xc0, 0x2e, 0x40, 0x42, 0xf0, 0x5f, 0x10, 0x50, + 0x8f, 0x52, 0x4d, 0x50, 0xfb, 0x7f, 0x98, 0x2e, 0x98, 0xb4, 0x4d, 0x52, + 0x45, 0x82, 0x00, 0x30, 0x50, 0x42, 0x70, 0x30, 0xfb, 0x6f, 0xc0, 0x2e, + 0x40, 0x42, 0xf0, 0x5f, 0x12, 0x30, 0x12, 0x42, 0x02, 0x30, 0x12, 0x42, + 0x12, 0x42, 0x12, 0x42, 0x02, 0x42, 0x03, 0x80, 0x41, 0x84, 0x11, 0x42, + 0x02, 0x42, 0xb8, 0x2e, 0x48, 0x86, 0x90, 0x50, 0xc4, 0x40, 0x42, 0x84, + 0xf2, 0x7f, 0x5a, 0x25, 0x02, 0x41, 0xa2, 0xbf, 0x77, 0x85, 0x06, 0x41, + 0xff, 0xbb, 0x87, 0x42, 0x61, 0xbf, 0x07, 0x41, 0x6f, 0xbb, 0x86, 0x7f, + 0x7f, 0xbb, 0x96, 0x7f, 0xfe, 0x86, 0x86, 0x40, 0x80, 0x91, 0xc3, 0x40, + 0xd3, 0x7f, 0xe0, 0x7f, 0x13, 0x30, 0x05, 0x2f, 0x86, 0x6f, 0x80, 0x91, + 0x02, 0x2f, 0x96, 0x6f, 0x80, 0xb3, 0x60, 0x2f, 0x61, 0x25, 0x57, 0x40, + 0xc1, 0x91, 0xc1, 0x7f, 0x0f, 0x2f, 0x01, 0x30, 0x81, 0x43, 0x00, 0x2e, + 0xf2, 0x6f, 0x13, 0x40, 0x93, 0x42, 0x00, 0x2e, 0x13, 0x40, 0x93, 0x42, + 0x00, 0x2e, 0x00, 0x40, 0x80, 0x42, 0xbd, 0x80, 0xc0, 0x2e, 0x01, 0x42, + 0x70, 0x5f, 0x87, 0x83, 0x7a, 0x8d, 0x45, 0x40, 0x7b, 0x82, 0x45, 0x41, + 0x04, 0x41, 0xd5, 0xbf, 0x43, 0xbe, 0xc3, 0xba, 0xa5, 0x7f, 0x75, 0xba, + 0xb6, 0x7f, 0x05, 0x30, 0x97, 0x40, 0xc0, 0xb3, 0x09, 0x2f, 0x06, 0x40, + 0x47, 0x40, 0xb7, 0x05, 0x07, 0x30, 0x80, 0xa9, 0xfe, 0x05, 0xb7, 0x23, + 0x74, 0x0f, 0x5d, 0x23, 0xb6, 0x6f, 0x41, 0x82, 0x01, 0x80, 0x56, 0x0e, + 0xee, 0x2f, 0x40, 0x40, 0x28, 0x1a, 0xc4, 0x6f, 0xe0, 0x6f, 0xf2, 0x6f, + 0x02, 0x2f, 0x03, 0x30, 0x19, 0x2c, 0x03, 0x43, 0x05, 0x41, 0x6b, 0x29, + 0xa6, 0x6f, 0x05, 0x43, 0x6e, 0x0e, 0x11, 0x2f, 0xd4, 0x6f, 0x00, 0xb3, + 0x03, 0x2f, 0x3f, 0x89, 0xdc, 0x14, 0x27, 0x2e, 0x5e, 0xf0, 0x40, 0x25, + 0x32, 0x25, 0x15, 0x41, 0xd5, 0x42, 0x00, 0x2e, 0x15, 0x41, 0xd5, 0x42, + 0x00, 0x2e, 0x04, 0x41, 0xc4, 0x42, 0x00, 0x2e, 0x00, 0x2e, 0x41, 0x40, + 0x40, 0x90, 0x09, 0x2f, 0x11, 0x40, 0x91, 0x42, 0x00, 0x2e, 0x11, 0x40, + 0x91, 0x42, 0x00, 0x2e, 0x00, 0x40, 0x02, 0x2c, 0x80, 0x42, 0x43, 0x42, + 0x70, 0x5f, 0xb8, 0x2e, 0xb0, 0x50, 0x3a, 0x25, 0xf5, 0x86, 0x91, 0x58, + 0xc4, 0x42, 0x15, 0x30, 0x93, 0x58, 0x4d, 0x09, 0x81, 0x90, 0x64, 0x7f, + 0xf2, 0x7f, 0xeb, 0x7f, 0x02, 0x2f, 0x40, 0xb3, 0x90, 0x2e, 0x05, 0xb6, + 0x15, 0x0b, 0x00, 0xb3, 0x90, 0x2e, 0x05, 0xb6, 0x9a, 0x00, 0xe3, 0x30, + 0xcb, 0x08, 0x81, 0x40, 0x44, 0x84, 0xb1, 0xba, 0x46, 0x86, 0x49, 0x8e, + 0x97, 0x5c, 0xc2, 0x7f, 0x02, 0x84, 0x07, 0x25, 0xd3, 0x7f, 0x2b, 0x2e, + 0xa9, 0x00, 0x84, 0x40, 0xe3, 0x41, 0xe3, 0x04, 0xc4, 0x41, 0xc3, 0x43, + 0x2e, 0x18, 0x95, 0x5a, 0x8b, 0x40, 0x0b, 0x42, 0xb5, 0x00, 0x99, 0x5a, + 0xb2, 0x7f, 0x3a, 0x80, 0x95, 0x00, 0x05, 0x40, 0x41, 0x8b, 0x05, 0x42, + 0x03, 0x8a, 0xa2, 0x7f, 0x43, 0x84, 0x40, 0x41, 0x7b, 0x8b, 0x85, 0x7f, + 0x00, 0xb2, 0xdc, 0x05, 0x91, 0x7f, 0x04, 0x2f, 0xc3, 0x6f, 0x00, 0x2e, + 0xc4, 0x40, 0x01, 0x89, 0xc4, 0x42, 0x47, 0x86, 0x66, 0x41, 0x75, 0x7f, + 0x45, 0x88, 0x42, 0x82, 0x3e, 0x0f, 0x45, 0x41, 0x34, 0x2f, 0x46, 0x40, + 0x3e, 0x0e, 0x26, 0x2f, 0x85, 0x40, 0xc1, 0x33, 0xa9, 0x0e, 0x01, 0x30, + 0x02, 0x2f, 0xc3, 0x40, 0xc0, 0xb2, 0x1b, 0x2f, 0x82, 0x34, 0xaa, 0x0e, + 0x31, 0x2f, 0x01, 0x41, 0x7f, 0x82, 0x43, 0xa2, 0x02, 0x30, 0x02, 0x2f, + 0x00, 0x2e, 0x0c, 0x2c, 0x01, 0x30, 0x00, 0xb2, 0xd0, 0x6f, 0x11, 0x30, + 0x01, 0x2f, 0x02, 0x42, 0x02, 0x2d, 0x01, 0x42, 0x01, 0x30, 0xc0, 0x6f, + 0x00, 0x2e, 0x02, 0x42, 0x3e, 0x81, 0x04, 0x86, 0x02, 0x42, 0x02, 0x43, + 0xc2, 0x42, 0x19, 0x2d, 0xc0, 0x33, 0x80, 0x42, 0x16, 0x2d, 0xa0, 0x6f, + 0x28, 0x04, 0x38, 0x1e, 0x40, 0x42, 0x11, 0x30, 0x90, 0x6f, 0x22, 0x30, + 0x98, 0x2e, 0x08, 0xb6, 0x0c, 0x2c, 0x01, 0x30, 0xa1, 0x6f, 0xa9, 0x00, + 0x90, 0x6f, 0x01, 0x82, 0xba, 0x1c, 0x42, 0x42, 0x21, 0x30, 0x12, 0x30, + 0x98, 0x2e, 0x08, 0xb6, 0x01, 0x30, 0x72, 0x6f, 0xd4, 0xb1, 0xf5, 0xbd, + 0x6b, 0xba, 0x9f, 0x5a, 0x80, 0x40, 0x05, 0x18, 0xf5, 0xbe, 0xe3, 0x0a, + 0xeb, 0xbb, 0x3d, 0x0b, 0x80, 0x6f, 0xe3, 0x00, 0x04, 0x40, 0x63, 0x05, + 0xa1, 0x58, 0x2c, 0x18, 0xf5, 0xbe, 0x83, 0x42, 0xeb, 0xbb, 0xfd, 0x0b, + 0xb2, 0x6f, 0x5a, 0x01, 0xdf, 0x01, 0x7d, 0x1f, 0x15, 0x42, 0x9a, 0x04, + 0x05, 0x40, 0x5d, 0x05, 0x2c, 0x18, 0x75, 0xbe, 0xeb, 0xba, 0x2c, 0x0b, + 0xdc, 0x04, 0x9a, 0x1c, 0x02, 0x42, 0x04, 0x80, 0x00, 0x2e, 0x00, 0x40, + 0x00, 0xb2, 0x10, 0x2f, 0xc2, 0x6f, 0xc0, 0x33, 0x82, 0x40, 0x90, 0x0e, + 0x0b, 0x2f, 0xd1, 0x6f, 0x7e, 0x88, 0x03, 0x81, 0x3c, 0x84, 0x0b, 0x30, + 0x82, 0x86, 0x4b, 0x42, 0x0b, 0x42, 0x0b, 0x43, 0x8b, 0x42, 0xcb, 0x42, + 0x21, 0x30, 0x42, 0xb2, 0x02, 0x30, 0x9d, 0x50, 0x02, 0x22, 0x41, 0xb2, + 0x9b, 0x52, 0x08, 0x22, 0xf1, 0x6f, 0x40, 0x90, 0x11, 0x30, 0x06, 0x2f, + 0x22, 0x30, 0x02, 0x08, 0x00, 0xb2, 0x08, 0x2f, 0x23, 0x2e, 0x5e, 0xf0, + 0x06, 0x2d, 0x01, 0x08, 0x00, 0xb2, 0x02, 0x2f, 0x00, 0x31, 0x21, 0x2e, + 0x5e, 0xf0, 0xeb, 0x6f, 0x50, 0x5f, 0xb8, 0x2e, 0x07, 0x86, 0xfc, 0x88, + 0xc6, 0x40, 0x05, 0x41, 0x31, 0x1a, 0x12, 0x2f, 0x80, 0x91, 0x22, 0x2f, + 0xc1, 0x33, 0x29, 0x0f, 0x0a, 0x2f, 0x06, 0x80, 0x00, 0x2e, 0x00, 0x40, + 0x00, 0xb2, 0x01, 0x2f, 0x44, 0xa9, 0x03, 0x2f, 0x00, 0x30, 0xc0, 0x42, + 0x00, 0x43, 0xb8, 0x2e, 0xc2, 0x42, 0x01, 0x43, 0xb8, 0x2e, 0xc1, 0x33, + 0xa9, 0x0e, 0x0e, 0x2f, 0x43, 0x3c, 0xeb, 0x00, 0xcc, 0xa8, 0x0a, 0x2f, + 0x05, 0x86, 0xc2, 0x80, 0xc3, 0x40, 0x02, 0x42, 0x3c, 0x84, 0xc1, 0x80, + 0x81, 0x42, 0x82, 0x84, 0xc0, 0x2e, 0x80, 0x42, 0x00, 0x2e, 0xb8, 0x2e, + 0x05, 0x2e, 0x20, 0x01, 0x11, 0x30, 0x20, 0x50, 0x91, 0x08, 0xf0, 0x7f, + 0x80, 0xb2, 0xeb, 0x7f, 0x13, 0x2f, 0x01, 0x2e, 0x74, 0x00, 0x01, 0x90, + 0x02, 0x30, 0xa3, 0x50, 0x03, 0x2f, 0x25, 0x2e, 0x74, 0x00, 0x98, 0x2e, + 0xad, 0xb7, 0xf2, 0x6f, 0xa3, 0x52, 0x98, 0x2e, 0x57, 0xb6, 0x00, 0xb2, + 0x06, 0x2f, 0x80, 0x30, 0x21, 0x2e, 0x5e, 0xf0, 0x03, 0x2d, 0x10, 0x30, + 0x21, 0x2e, 0x74, 0x00, 0xeb, 0x6f, 0xe0, 0x5f, 0xb8, 0x2e, 0x30, 0x51, + 0x42, 0x8a, 0xe1, 0x7f, 0x83, 0x88, 0xdb, 0x7f, 0xc5, 0x7f, 0x1a, 0x25, + 0x05, 0x25, 0x93, 0x40, 0x06, 0x40, 0xb3, 0x01, 0x16, 0x42, 0xcb, 0x16, + 0x06, 0x40, 0xf3, 0x02, 0x13, 0x42, 0x54, 0x0e, 0xf5, 0x2f, 0x04, 0x40, + 0x12, 0x30, 0xa2, 0x28, 0x02, 0x42, 0x88, 0xa0, 0x00, 0x30, 0x90, 0x2e, + 0xa9, 0xb7, 0x6d, 0x84, 0x73, 0x88, 0x92, 0x7f, 0x70, 0x7f, 0x84, 0x7f, + 0xa2, 0x7f, 0x70, 0x86, 0xb5, 0x7f, 0x63, 0x7f, 0x75, 0x30, 0xa5, 0x52, + 0xa7, 0x54, 0xbd, 0x50, 0xaf, 0x58, 0xb7, 0x6f, 0xf4, 0x7f, 0x51, 0x7f, + 0x00, 0x2e, 0xd6, 0x41, 0xd4, 0x41, 0xb7, 0x7f, 0xcc, 0x17, 0x7d, 0x09, + 0x75, 0x01, 0x06, 0x30, 0x26, 0x03, 0x4d, 0xbe, 0xd3, 0xba, 0x6c, 0x0b, + 0x28, 0x0e, 0x05, 0x22, 0x2a, 0x0f, 0x90, 0x22, 0xd2, 0x42, 0x43, 0x7f, + 0x32, 0x7f, 0x00, 0x2e, 0xa9, 0x5a, 0xab, 0x58, 0xad, 0x5c, 0xa9, 0x56, + 0x98, 0x2e, 0x38, 0xb1, 0x91, 0x6f, 0x32, 0x6f, 0x50, 0x42, 0x91, 0x7f, + 0xb3, 0x30, 0x10, 0x25, 0x98, 0x2e, 0xdb, 0xb7, 0x71, 0x6f, 0x88, 0x28, + 0x43, 0x6f, 0x80, 0x6f, 0x72, 0x7f, 0x58, 0x0e, 0x51, 0x6f, 0x44, 0x82, + 0xa7, 0x54, 0xbd, 0x50, 0x75, 0x30, 0xaf, 0x58, 0xcd, 0x2f, 0xb1, 0x6f, + 0x46, 0x84, 0xe1, 0x6f, 0x4e, 0x80, 0x81, 0x40, 0xb2, 0x7f, 0x90, 0x7f, + 0x12, 0x30, 0x98, 0x2e, 0xcc, 0xb7, 0xb1, 0x6f, 0x7c, 0x8a, 0xa2, 0x6f, + 0xb5, 0x7f, 0x40, 0x42, 0x98, 0x2e, 0xf4, 0x01, 0x95, 0xbc, 0x0b, 0xb9, + 0x51, 0x0a, 0x62, 0x6f, 0xa1, 0x7f, 0x98, 0x2e, 0xf4, 0x01, 0x95, 0xbc, + 0x0b, 0xb9, 0x11, 0x0a, 0xa1, 0x6f, 0x49, 0x17, 0x48, 0x18, 0x88, 0x16, + 0xe8, 0x18, 0xd1, 0x18, 0x27, 0x25, 0x16, 0x25, 0x80, 0x7f, 0x98, 0x2e, + 0xbe, 0x00, 0xb5, 0x6f, 0xe1, 0x6f, 0x43, 0x41, 0x4b, 0x84, 0x4c, 0x8c, + 0xb0, 0x7f, 0x62, 0x7f, 0x4a, 0x88, 0x7e, 0x8b, 0xc0, 0x90, 0x56, 0x7f, + 0x13, 0x2f, 0x45, 0x7f, 0x34, 0x7f, 0xb3, 0x30, 0xb1, 0x52, 0xb2, 0x6f, + 0x98, 0x2e, 0xdb, 0xb7, 0x71, 0x6f, 0x88, 0x0e, 0x34, 0x6f, 0x45, 0x6f, + 0xe1, 0x6f, 0x06, 0x2f, 0x34, 0x25, 0x1b, 0x30, 0x10, 0x6f, 0x22, 0x6f, + 0xdb, 0x42, 0xd0, 0x42, 0xc2, 0x42, 0x02, 0x30, 0x00, 0x6f, 0x00, 0xa8, + 0x90, 0x05, 0x13, 0x6f, 0x86, 0x23, 0xc0, 0xa8, 0xd3, 0x05, 0xdf, 0x23, + 0xb7, 0x05, 0xb3, 0x5e, 0x37, 0x0f, 0x4d, 0x8c, 0x07, 0x30, 0x19, 0x2f, + 0x44, 0x7f, 0x00, 0x2e, 0x24, 0x6f, 0xb3, 0x5e, 0xa7, 0x0e, 0x44, 0x6f, + 0x07, 0x30, 0x11, 0x2f, 0xc7, 0x5e, 0xdf, 0x00, 0xc1, 0x5e, 0x5f, 0x0e, + 0x02, 0x2f, 0x00, 0x2e, 0x0b, 0x2c, 0x07, 0x30, 0xc9, 0x56, 0x03, 0x00, + 0xc3, 0x56, 0x43, 0x0e, 0x02, 0x2f, 0x00, 0x2e, 0x03, 0x2c, 0x07, 0x30, + 0x82, 0x43, 0x17, 0x30, 0x41, 0x86, 0xc0, 0x91, 0x0e, 0x2f, 0xc0, 0x40, + 0x01, 0x90, 0x09, 0x2f, 0x80, 0x41, 0x14, 0x30, 0x04, 0x28, 0x80, 0x43, + 0x06, 0xa0, 0x03, 0x2f, 0xc8, 0x80, 0xbb, 0x58, 0xc2, 0x42, 0x04, 0x42, + 0x66, 0x2c, 0x00, 0x30, 0x90, 0x6f, 0x00, 0x2e, 0x00, 0x40, 0x00, 0xa8, + 0x00, 0x30, 0x5e, 0x2f, 0x00, 0x41, 0x00, 0xb2, 0x00, 0x30, 0x5a, 0x2f, + 0x49, 0x82, 0xb2, 0x6f, 0x43, 0x7f, 0xb5, 0x7f, 0x94, 0x7f, 0xb3, 0x30, + 0x41, 0x40, 0x98, 0x2e, 0xdb, 0xb7, 0x71, 0x6f, 0x88, 0x0f, 0xb5, 0x6f, + 0xe1, 0x6f, 0x02, 0x30, 0x00, 0x30, 0x4a, 0x2f, 0x80, 0x6f, 0xc5, 0x58, + 0x04, 0x00, 0xbf, 0x58, 0x44, 0x0e, 0x02, 0x2f, 0x00, 0x2e, 0x43, 0x2c, + 0x00, 0x30, 0xa0, 0x6f, 0xb5, 0x58, 0x84, 0x0e, 0x00, 0x30, 0x3c, 0x2f, + 0xb7, 0x54, 0x21, 0x6f, 0xb5, 0x7f, 0x98, 0x2e, 0xcc, 0xb7, 0x10, 0x25, + 0xb3, 0x30, 0x21, 0x25, 0x98, 0x2e, 0xdb, 0xb7, 0x02, 0x6f, 0xa0, 0x7f, + 0xb3, 0x30, 0x12, 0x25, 0x98, 0x2e, 0xdb, 0xb7, 0x12, 0x6f, 0x80, 0x7f, + 0xb3, 0x30, 0x12, 0x25, 0x98, 0x2e, 0xdb, 0xb7, 0x81, 0x6f, 0x88, 0x28, + 0x87, 0x52, 0x98, 0x2e, 0xcc, 0xb7, 0xa1, 0x6f, 0x88, 0x0f, 0xb5, 0x6f, + 0xe1, 0x6f, 0x02, 0x30, 0x00, 0x30, 0x1a, 0x2f, 0x44, 0x6f, 0x00, 0x2e, + 0x00, 0x41, 0x00, 0xb2, 0x0f, 0x2f, 0x64, 0x6f, 0x10, 0x6f, 0x04, 0x41, + 0x84, 0x0e, 0x00, 0x30, 0x0f, 0x2f, 0x54, 0x6f, 0x20, 0x6f, 0x04, 0x41, + 0x84, 0x0f, 0x00, 0x30, 0x09, 0x2f, 0x94, 0x6f, 0x10, 0x30, 0x07, 0x2c, + 0x02, 0x43, 0x08, 0x87, 0xb9, 0x50, 0xd0, 0x42, 0x10, 0x30, 0x00, 0x43, + 0xc2, 0x42, 0x0b, 0x30, 0x4b, 0x43, 0x7a, 0x8b, 0xc4, 0x6f, 0x06, 0x89, + 0x52, 0x43, 0x52, 0x43, 0x6c, 0x0e, 0xfb, 0x2f, 0x78, 0x85, 0x00, 0x2e, + 0x82, 0x40, 0x02, 0x1a, 0x02, 0x2f, 0x00, 0x2e, 0x02, 0x2c, 0x40, 0x42, + 0x00, 0x30, 0x00, 0x2e, 0xdb, 0x6f, 0xd0, 0x5e, 0xb8, 0x2e, 0x08, 0x82, + 0x02, 0x30, 0x12, 0x42, 0x08, 0x86, 0xc2, 0x88, 0x87, 0x5a, 0x12, 0x43, + 0x05, 0x43, 0x02, 0x8b, 0x7c, 0x8d, 0x42, 0x43, 0x14, 0x30, 0xbe, 0x8b, + 0x04, 0x42, 0x45, 0x81, 0x42, 0x43, 0x02, 0x42, 0x35, 0x80, 0xb9, 0x5e, + 0xa5, 0x5a, 0xc7, 0x42, 0x84, 0x43, 0x52, 0x43, 0x12, 0x42, 0x52, 0x43, + 0x12, 0x42, 0x52, 0x43, 0x52, 0x43, 0x41, 0x0e, 0xf7, 0x2f, 0xb8, 0x2e, + 0x0a, 0x0c, 0x55, 0x56, 0x03, 0x09, 0x0a, 0x04, 0x00, 0xb3, 0x07, 0x2f, + 0x88, 0x0c, 0x93, 0x08, 0x80, 0xb2, 0x03, 0x2f, 0x53, 0x50, 0xc0, 0x2e, + 0x40, 0xac, 0x03, 0x22, 0xb8, 0x2e, 0xff, 0x88, 0x10, 0x30, 0x4a, 0x0d, + 0x0a, 0x18, 0x04, 0x15, 0x4c, 0x16, 0x5f, 0xb9, 0x79, 0x08, 0x53, 0x5a, + 0x95, 0x00, 0x34, 0x09, 0x40, 0x90, 0x02, 0x2f, 0x00, 0x91, 0x00, 0x2f, + 0x00, 0x30, 0xd8, 0x00, 0xc0, 0xb2, 0x0b, 0x2f, 0xd0, 0xa0, 0x03, 0x2f, + 0xf0, 0x86, 0xbb, 0x11, 0x07, 0x2c, 0xce, 0x17, 0x01, 0x31, 0x4b, 0x04, + 0x79, 0x14, 0x33, 0x12, 0xfb, 0x11, 0x81, 0x0b, 0xce, 0x16, 0xc0, 0x2e, + 0x7b, 0x1a, 0x16, 0x22, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, + 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00, 0x80, 0x2e, 0x18, 0x00 +}; + const uint8_t bma423_config_file[] = { 0x80, 0x2e, 0xfe, 0x00, 0x80, 0x2e, 0xf1, 0x01, 0xc8, 0x2e, 0x00, 0x2e, 0x80, 0x2e, 0xfc, 0x00, 0x80, 0x2e, 0xfb, 0x00, 0x80, 0x2e, 0xff, 0x00, 0x80, 0x2e, 0xfd, 0x00, 0x80, 0x2e, 0x42, 0xb0, 0x50, 0x39, 0x21, 0x2e, 0xb0, 0xf0, @@ -450,7 +965,7 @@ int8_t bma423_init(struct bma4_dev *dev) rslt = bma4_init(dev); if (rslt == BMA4_OK) { - if (dev->chip_id == BMA423_CHIP_ID) + if (dev->chip_id == BMA423_CHIP_ID || dev->chip_id == BMA425_CHIP_ID) { /* Resolution of BMA423 sensor is 12 bit */ dev->resolution = 12; @@ -478,7 +993,7 @@ int8_t bma423_write_config_file(struct bma4_dev *dev) if (dev != NULL) { - if (dev->chip_id == BMA423_CHIP_ID) + if (dev->chip_id == BMA423_CHIP_ID || dev->chip_id == BMA425_CHIP_ID) { /* Configuration stream read/write length boundary * check @@ -492,7 +1007,10 @@ int8_t bma423_write_config_file(struct bma4_dev *dev) } /*Assign stream data */ - dev->config_file_ptr = bma423_config_file; + if(dev->chip_id == BMA423_CHIP_ID) + dev->config_file_ptr = bma423_config_file; + else if(dev->chip_id == BMA425_CHIP_ID) + dev->config_file_ptr = bma425_config_file; rslt = bma4_write_config_file(dev); } else @@ -526,7 +1044,7 @@ int8_t bma423_get_config_id(uint16_t *config_id, struct bma4_dev *dev) if (dev != NULL) { - if (dev->chip_id == BMA423_CHIP_ID) + if (dev->chip_id == BMA423_CHIP_ID || dev->chip_id == BMA425_CHIP_ID) { rslt = bma4_read_regs(BMA4_FEATURE_CONFIG_ADDR, feature_config, BMA423_FEATURE_SIZE, dev); if (rslt == BMA4_OK) @@ -559,7 +1077,7 @@ int8_t bma423_map_interrupt(uint8_t int_line, uint16_t int_map, uint8_t enable, if (dev != NULL) { - if (dev->chip_id == BMA423_CHIP_ID) + if (dev->chip_id == BMA423_CHIP_ID || dev->chip_id == BMA425_CHIP_ID) { if (int_line <= 1) { @@ -593,7 +1111,7 @@ int8_t bma423_read_int_status(uint16_t *int_status, struct bma4_dev *dev) if (dev != NULL) { - if (dev->chip_id == BMA423_CHIP_ID) + if (dev->chip_id == BMA423_CHIP_ID || dev->chip_id == BMA425_CHIP_ID) { /* Read the interrupt status */ rslt = bma4_read_int_status(int_status, dev); @@ -622,7 +1140,7 @@ int8_t bma423_feature_enable(uint8_t feature, uint8_t enable, struct bma4_dev *d if (dev != NULL) { - if (dev->chip_id == BMA423_CHIP_ID) + if (dev->chip_id == BMA423_CHIP_ID || dev->chip_id == BMA425_CHIP_ID) { /* Read feature configuration data */ rslt = bma4_read_regs(BMA4_FEATURE_CONFIG_ADDR, feature_config, len, dev); @@ -669,7 +1187,7 @@ int8_t bma423_set_remap_axes(const struct bma423_axes_remap *remap_data, struct if (dev != NULL) { - if (dev->chip_id == BMA423_CHIP_ID) + if (dev->chip_id == BMA423_CHIP_ID || dev->chip_id == BMA425_CHIP_ID) { rslt = bma4_read_regs(BMA4_FEATURE_CONFIG_ADDR, feature_config, BMA423_FEATURE_SIZE, dev); if (rslt == BMA4_OK) @@ -708,7 +1226,7 @@ int8_t bma423_get_remap_axes(struct bma423_axes_remap *remap_data, struct bma4_d if (dev != NULL) { - if (dev->chip_id == BMA423_CHIP_ID) + if (dev->chip_id == BMA423_CHIP_ID || dev->chip_id == BMA425_CHIP_ID) { rslt = bma4_read_regs(BMA4_FEATURE_CONFIG_ADDR, feature_config, BMA423_FEATURE_SIZE, dev); if (rslt == BMA4_OK) @@ -997,7 +1515,7 @@ int8_t bma423_step_detector_enable(uint8_t enable, struct bma4_dev *dev) if (dev != NULL) { - if (dev->chip_id == BMA423_CHIP_ID) + if (dev->chip_id == BMA423_CHIP_ID || dev->chip_id == BMA425_CHIP_ID) { rslt = bma4_read_regs(BMA4_FEATURE_CONFIG_ADDR, feature_config, BMA423_FEATURE_SIZE, dev); if (rslt == BMA4_OK) @@ -1034,7 +1552,7 @@ int8_t bma423_step_counter_set_watermark(uint16_t step_counter_wm, struct bma4_d if (dev != NULL) { - if (dev->chip_id == BMA423_CHIP_ID) + if (dev->chip_id == BMA423_CHIP_ID || dev->chip_id == BMA425_CHIP_ID) { rslt = bma4_read_regs(BMA4_FEATURE_CONFIG_ADDR, feature_config, BMA423_FEATURE_SIZE, dev); if (rslt == BMA4_OK) @@ -1088,7 +1606,7 @@ int8_t bma423_step_counter_get_watermark(uint16_t *step_counter_wm, struct bma4_ if (dev != NULL) { - if (dev->chip_id == BMA423_CHIP_ID) + if (dev->chip_id == BMA423_CHIP_ID || dev->chip_id == BMA425_CHIP_ID) { rslt = bma4_read_regs(BMA4_FEATURE_CONFIG_ADDR, feature_config, BMA423_FEATURE_SIZE, dev); if (rslt == BMA4_OK) @@ -1125,7 +1643,7 @@ int8_t bma423_reset_step_counter(struct bma4_dev *dev) if (dev != NULL) { - if (dev->chip_id == BMA423_CHIP_ID) + if (dev->chip_id == BMA423_CHIP_ID || dev->chip_id == BMA425_CHIP_ID) { rslt = bma4_read_regs(BMA4_FEATURE_CONFIG_ADDR, feature_config, BMA423_FEATURE_SIZE, dev); if (rslt == BMA4_OK) @@ -1162,7 +1680,7 @@ int8_t bma423_step_counter_output(uint32_t *step_count, struct bma4_dev *dev) if (dev != NULL) { - if (dev->chip_id == BMA423_CHIP_ID) + if (dev->chip_id == BMA423_CHIP_ID || dev->chip_id == BMA425_CHIP_ID) { /* Reads the step counter output data from the * gpio register @@ -1200,7 +1718,7 @@ int8_t bma423_activity_output(uint8_t *activity, struct bma4_dev *dev) if (dev != NULL) { - if (dev->chip_id == BMA423_CHIP_ID) + if (dev->chip_id == BMA423_CHIP_ID || dev->chip_id == BMA425_CHIP_ID) { /* Reads the activity output from the gpio register */ rslt = bma4_read_regs(BMA4_ACTIVITY_OUT_ADDR, &data, 1, dev); @@ -1234,7 +1752,7 @@ int8_t bma423_stepcounter_get_parameter(struct bma423_stepcounter_settings *sett if (dev != NULL) { - if (dev->chip_id == BMA423_CHIP_ID) + if (dev->chip_id == BMA423_CHIP_ID || dev->chip_id == BMA425_CHIP_ID) { rslt = bma4_read_regs(BMA4_FEATURE_CONFIG_ADDR, feature_config, BMA423_FEATURE_SIZE, dev); if (rslt == BMA4_OK) @@ -1269,7 +1787,7 @@ int8_t bma423_stepcounter_set_parameter(const struct bma423_stepcounter_settings if (dev != NULL) { - if (dev->chip_id == BMA423_CHIP_ID) + if (dev->chip_id == BMA423_CHIP_ID || dev->chip_id == BMA425_CHIP_ID) { rslt = bma4_read_regs(BMA4_FEATURE_CONFIG_ADDR, feature_config, BMA423_FEATURE_SIZE, dev); if (rslt == BMA4_OK) @@ -1306,7 +1824,7 @@ int8_t bma423_single_tap_set_sensitivity(uint8_t sensitivity, struct bma4_dev *d if (dev != NULL) { - if (dev->chip_id == BMA423_CHIP_ID) + if (dev->chip_id == BMA423_CHIP_ID || dev->chip_id == BMA425_CHIP_ID) { rslt = bma4_read_regs(BMA4_FEATURE_CONFIG_ADDR, feature_config, BMA423_FEATURE_SIZE, dev); if (rslt == BMA4_OK) @@ -1341,7 +1859,7 @@ int8_t bma423_double_tap_set_sensitivity(uint8_t sensitivity, struct bma4_dev *d if (dev != NULL) { - if (dev->chip_id == BMA423_CHIP_ID) + if (dev->chip_id == BMA423_CHIP_ID || dev->chip_id == BMA425_CHIP_ID) { rslt = bma4_read_regs(BMA4_FEATURE_CONFIG_ADDR, feature_config, BMA423_FEATURE_SIZE, dev); if (rslt == BMA4_OK) @@ -1376,7 +1894,7 @@ int8_t bma423_single_tap_get_sensitivity(uint8_t *sensitivity, struct bma4_dev * if (dev != NULL) { - if (dev->chip_id == BMA423_CHIP_ID) + if (dev->chip_id == BMA423_CHIP_ID || dev->chip_id == BMA425_CHIP_ID) { rslt = bma4_read_regs(BMA4_FEATURE_CONFIG_ADDR, feature_config, BMA423_FEATURE_SIZE, dev); if (rslt == BMA4_OK) @@ -1409,7 +1927,7 @@ int8_t bma423_double_tap_get_sensitivity(uint8_t *sensitivity, struct bma4_dev * if (dev != NULL) { - if (dev->chip_id == BMA423_CHIP_ID) + if (dev->chip_id == BMA423_CHIP_ID || dev->chip_id == BMA425_CHIP_ID) { rslt = bma4_read_regs(BMA4_FEATURE_CONFIG_ADDR, feature_config, BMA423_FEATURE_SIZE, dev); if (rslt == BMA4_OK) diff --git a/src/drivers/Bma421_C/bma423.h b/src/drivers/Bma421_C/bma423.h index 96e5d8e3..b58e0d21 100644 --- a/src/drivers/Bma421_C/bma423.h +++ b/src/drivers/Bma421_C/bma423.h @@ -52,6 +52,7 @@ extern "C" { /**\name Chip ID of BMA423 sensor */ #define BMA423_CHIP_ID UINT8_C(0x11) +#define BMA425_CHIP_ID UINT8_C(0x13) /**\ Configuration ID start position of BMA423 sensor */ #define BMA423_CONFIG_ID_START_ADDR UINT8_C(66) diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index 38e9793c..13755f71 100644 --- a/src/systemtask/SystemTask.cpp +++ b/src/systemtask/SystemTask.cpp @@ -126,6 +126,7 @@ void SystemTask::Work() { twiMaster.Init(); motionSensor.Init(); + motionController.Init(motionSensor.DeviceType()); settingsController.Init(); displayApp.Register(this); -- cgit v1.2.3-70-g09d2 From 20a24f8cf56551eae1202f8dc5733bd0cf61adbf Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Sat, 19 Jun 2021 20:59:18 +0200 Subject: Set version to 1.2.0 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a488eaa..f2e467e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10) -project(pinetime VERSION 1.1.0 LANGUAGES C CXX ASM) +project(pinetime VERSION 1.2.0 LANGUAGES C CXX ASM) set(CMAKE_C_STANDARD 99) set(CMAKE_CXX_STANDARD 14) -- cgit v1.2.3-70-g09d2 From 572be3e857f86047926f7ccae5a4197958580f98 Mon Sep 17 00:00:00 2001 From: Avamander Date: Tue, 22 Jun 2021 21:31:31 +0300 Subject: Removed an illogical comparison from SystemInfo and St7789 driver (#449) * Removed an illogical comparison --- src/displayapp/screens/SystemInfo.cpp | 3 --- src/drivers/St7789.cpp | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp index 0b16d633..1cf895c7 100644 --- a/src/displayapp/screens/SystemInfo.cpp +++ b/src/displayapp/screens/SystemInfo.cpp @@ -141,9 +141,6 @@ std::unique_ptr SystemInfo::CreateScreen2() { uptimeSeconds = uptimeSeconds % secondsInAMinute; // TODO handle more than 100 days of uptime - if (batteryPercent == -1) - batteryPercent = 0; - // hack to not use the flot functions from printf uint8_t batteryVoltageBytes[2]; batteryVoltageBytes[1] = static_cast(batteryVoltage); // truncate whole numbers diff --git a/src/drivers/St7789.cpp b/src/drivers/St7789.cpp index 39218e77..0f1dc02e 100644 --- a/src/drivers/St7789.cpp +++ b/src/drivers/St7789.cpp @@ -140,8 +140,9 @@ void St7789::Uninit() { } void St7789::DrawPixel(uint16_t x, uint16_t y, uint32_t color) { - if ((x < 0) || (x >= Width) || (y < 0) || (y >= Height)) + if (x >= Width || y >= Height) { return; + } SetAddrWindow(x, y, x + 1, y + 1); -- cgit v1.2.3-70-g09d2 From ef999e8dd397ea2680e724ea0bd9987a1793a9c1 Mon Sep 17 00:00:00 2001 From: Jonathan Vander Mey Date: Tue, 22 Jun 2021 14:34:46 -0400 Subject: Fix typo in variable names (#430) --- src/displayapp/screens/WatchFaceAnalog.cpp | 8 ++++---- src/displayapp/screens/WatchFaceAnalog.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/displayapp/screens/WatchFaceAnalog.cpp b/src/displayapp/screens/WatchFaceAnalog.cpp index 02f1fc2a..0051408c 100644 --- a/src/displayapp/screens/WatchFaceAnalog.cpp +++ b/src/displayapp/screens/WatchFaceAnalog.cpp @@ -30,14 +30,14 @@ WatchFaceAnalog::WatchFaceAnalog(Pinetime::Applications::DisplayApp* app, Controllers::DateTime& dateTimeController, Controllers::Battery& batteryController, Controllers::Ble& bleController, - Controllers::NotificationManager& notificatioManager, + Controllers::NotificationManager& notificationManager, Controllers::Settings& settingsController) : Screen(app), currentDateTime {{}}, dateTimeController {dateTimeController}, batteryController {batteryController}, bleController {bleController}, - notificatioManager {notificatioManager}, + notificationManager {notificationManager}, settingsController {settingsController} { settingsController.SetClockFace(1); @@ -172,7 +172,7 @@ bool WatchFaceAnalog::Refresh() { lv_label_set_text(batteryIcon, BatteryIcon::GetBatteryIcon(batteryPercent)); } - notificationState = notificatioManager.AreNewNotificationsAvailable(); + notificationState = notificationManager.AreNewNotificationsAvailable(); if (notificationState.IsUpdated()) { if (notificationState.Get() == true) @@ -202,4 +202,4 @@ bool WatchFaceAnalog::Refresh() { } return true; -} \ No newline at end of file +} diff --git a/src/displayapp/screens/WatchFaceAnalog.h b/src/displayapp/screens/WatchFaceAnalog.h index 667f6241..96225558 100644 --- a/src/displayapp/screens/WatchFaceAnalog.h +++ b/src/displayapp/screens/WatchFaceAnalog.h @@ -27,7 +27,7 @@ namespace Pinetime { Controllers::DateTime& dateTimeController, Controllers::Battery& batteryController, Controllers::Ble& bleController, - Controllers::NotificationManager& notificatioManager, + Controllers::NotificationManager& notificationManager, Controllers::Settings& settingsController); ~WatchFaceAnalog() override; @@ -79,11 +79,11 @@ namespace Pinetime { Controllers::DateTime& dateTimeController; Controllers::Battery& batteryController; Controllers::Ble& bleController; - Controllers::NotificationManager& notificatioManager; + Controllers::NotificationManager& notificationManager; Controllers::Settings& settingsController; void UpdateClock(); }; } } -} \ No newline at end of file +} -- cgit v1.2.3-70-g09d2 From 883700fca13a45b6cb0af4d74e3ef276a2d69283 Mon Sep 17 00:00:00 2001 From: Florian Date: Tue, 22 Jun 2021 20:56:49 +0200 Subject: update main font to keep diffs for future changes small (#420) * update font with jetbrains mono v2.225 and the current converter * added the tff file for JetBrains Mono to ensure everybody is using the same version Co-authored-by: Florian --- src/displayapp/fonts/JetBrainsMono-Bold.ttf | Bin 0 -> 173264 bytes src/displayapp/fonts/README.md | 2 +- src/displayapp/fonts/jetbrains_mono_bold_20.c | 390 ++++++++++++++------------ 3 files changed, 204 insertions(+), 188 deletions(-) create mode 100644 src/displayapp/fonts/JetBrainsMono-Bold.ttf diff --git a/src/displayapp/fonts/JetBrainsMono-Bold.ttf b/src/displayapp/fonts/JetBrainsMono-Bold.ttf new file mode 100644 index 00000000..0cd1cb66 Binary files /dev/null and b/src/displayapp/fonts/JetBrainsMono-Bold.ttf differ diff --git a/src/displayapp/fonts/README.md b/src/displayapp/fonts/README.md index 183ad7e4..08427d51 100644 --- a/src/displayapp/fonts/README.md +++ b/src/displayapp/fonts/README.md @@ -10,7 +10,7 @@ * Size : 20 * Bpp : 1 bit-per-pixel * Do not enable font compression and horizontal subpixel hinting -* Load the file `JetBrainsMono-Bold.tff` and specify the following range : `0x20-0x7f, 0x410-0x44f` +* Load the file `JetBrainsMono-Bold.tff` (use the file in this repo to ensure the version matches) and specify the following range : `0x20-0x7f, 0x410-0x44f` * Add a 2nd font, load the file `FontAwesome5-Solid+Brands+Regular.woff` and specify the following range : `0xf293, 0xf294, 0xf244, 0xf240, 0xf242, 0xf243, 0xf241, 0xf54b, 0xf21e, 0xf1e6, 0xf54b, 0xf017, 0xf129, 0xf03a, 0xf185, 0xf560, 0xf001, 0xf3fd, 0xf069, 0xf1fc, 0xf45d, 0xf59f, 0xf5a0, 0xf029, 0xf027, 0xf028, 0xf6a9, 0xf04b, 0xf04c, 0xf048, 0xf051, 0xf095, 0xf3dd, 0xf04d, 0xf2f2, 0xf024, 0xf252` * Click on Convert, and download the file `jetbrains_mono_bold_20.c` and copy it in `src/DisplayApp/Fonts` diff --git a/src/displayapp/fonts/jetbrains_mono_bold_20.c b/src/displayapp/fonts/jetbrains_mono_bold_20.c index 9174ff48..b001bb7e 100644 --- a/src/displayapp/fonts/jetbrains_mono_bold_20.c +++ b/src/displayapp/fonts/jetbrains_mono_bold_20.c @@ -1,11 +1,15 @@ -#include "lvgl/lvgl.h" - /******************************************************************************* * Size: 20 px * Bpp: 1 * Opts: ******************************************************************************/ +#ifdef LV_LVGL_H_INCLUDE_SIMPLE +#include "lvgl.h" +#else +#include "lvgl/lvgl.h" +#endif + #ifndef JETBRAINS_MONO_BOLD_20 #define JETBRAINS_MONO_BOLD_20 1 #endif @@ -17,707 +21,707 @@ *----------------*/ /*Store the image of the glyphs*/ -static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { - /* U+20 " " */ +static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = { + /* U+0020 " " */ 0x0, - /* U+21 "!" */ + /* U+0021 "!" */ 0xff, 0xff, 0xff, 0xfc, 0xf, 0xc0, - /* U+22 "\"" */ + /* U+0022 "\"" */ 0xef, 0xdf, 0xbf, 0x7e, 0xfd, 0xc0, - /* U+23 "#" */ + /* U+0023 "#" */ 0x8, 0xc3, 0x10, 0x66, 0x3f, 0xf7, 0xfe, 0x23, 0x4, 0x61, 0x88, 0x31, 0x1f, 0xfb, 0xff, 0x19, 0x82, 0x30, 0xc4, 0x0, - /* U+24 "$" */ - 0x8, 0x2, 0x0, 0x80, 0xfc, 0x7f, 0xba, 0x7e, + /* U+0024 "$" */ + 0x8, 0x2, 0x0, 0x81, 0xfc, 0x7f, 0xba, 0x7e, 0x9f, 0xa0, 0xf8, 0x1f, 0x83, 0xf8, 0x3f, 0x9, 0xfa, 0x7e, 0x9d, 0xfe, 0x7f, 0x2, 0x0, 0x80, 0x20, - /* U+25 "%" */ + /* U+0025 "%" */ 0x78, 0x3f, 0xc6, 0xcc, 0xcc, 0xcc, 0xfd, 0x87, 0xb0, 0x6, 0x0, 0x7e, 0xf, 0xf1, 0xb3, 0x33, 0x33, 0x33, 0x63, 0xfc, 0x1e, - /* U+26 "&" */ + /* U+0026 "&" */ 0x1e, 0xf, 0xe1, 0x8e, 0x30, 0x6, 0x0, 0x60, 0x1e, 0x7, 0xe6, 0xed, 0xdc, 0xf3, 0x9e, 0x73, - 0xcf, 0xfc, 0x79, 0x80, + 0xcf, 0xfc, 0xf9, 0x80, - /* U+27 "'" */ + /* U+0027 "'" */ 0xff, 0xff, 0xc0, - /* U+28 "(" */ + /* U+0028 "(" */ 0x2, 0x1c, 0x79, 0xc7, 0x1e, 0x38, 0x70, 0xe1, 0xc3, 0x87, 0xe, 0x1c, 0x3c, 0x38, 0x3c, 0x3c, 0x38, - /* U+29 ")" */ + /* U+0029 ")" */ 0x1, 0xc3, 0xc3, 0xc1, 0xc3, 0xc3, 0x87, 0xe, 0x1c, 0x38, 0x70, 0xe1, 0xc7, 0xe, 0x79, 0xe3, 0x0, - /* U+2A "*" */ + /* U+002A "*" */ 0xc, 0x3, 0x8, 0xc7, 0xb7, 0x7f, 0x83, 0x1, 0xe0, 0xcc, 0x73, 0x80, 0x0, - /* U+2B "+" */ + /* U+002B "+" */ 0x1c, 0x7, 0x1, 0xc3, 0xff, 0xff, 0xc7, 0x1, 0xc0, 0x70, 0x1c, 0x0, - /* U+2C "," */ + /* U+002C "," */ 0x7b, 0x9c, 0xce, 0x60, - /* U+2D "-" */ + /* U+002D "-" */ 0xff, 0xf0, - /* U+2E "." */ + /* U+002E "." */ 0xff, 0xf0, - /* U+2F "/" */ + /* U+002F "/" */ 0x1, 0xc0, 0x60, 0x38, 0xe, 0x3, 0x1, 0xc0, 0x70, 0x18, 0xe, 0x3, 0x1, 0xc0, 0x70, 0x18, 0xe, 0x3, 0x80, 0xc0, 0x70, 0x18, 0xe, 0x0, - /* U+30 "0" */ + /* U+0030 "0" */ 0x3f, 0x1f, 0xef, 0x3f, 0x87, 0xe1, 0xf8, 0x7f, 0xdf, 0xf7, 0xe1, 0xf8, 0x7e, 0x1f, 0xcf, 0x7f, 0x8f, 0xc0, - /* U+31 "1" */ + /* U+0031 "1" */ 0x1e, 0x3f, 0x3b, 0x99, 0xc8, 0xe0, 0x70, 0x38, 0x1c, 0xe, 0x7, 0x3, 0x81, 0xcf, 0xff, 0xfc, - /* U+32 "2" */ + /* U+0032 "2" */ 0x3e, 0x3f, 0xbc, 0xfc, 0x70, 0x38, 0x1c, 0x1c, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0xf, 0xff, 0xfc, - /* U+33 "3" */ + /* U+0033 "3" */ 0x7f, 0x9f, 0xe0, 0x30, 0x18, 0xc, 0x7, 0xc1, 0xf8, 0xf, 0x1, 0xc0, 0x7e, 0x1f, 0xcf, 0x7f, 0x8f, 0xc0, - /* U+34 "4" */ + /* U+0034 "4" */ 0x7, 0x7, 0x3, 0x83, 0x83, 0x83, 0xc1, 0xcf, 0xe7, 0xe3, 0xff, 0xff, 0xe0, 0x70, 0x38, 0x1c, - /* U+35 "5" */ + /* U+0035 "5" */ 0x7f, 0x9f, 0xe7, 0x1, 0xc0, 0x77, 0x1f, 0xe7, 0x3c, 0x7, 0x1, 0xc0, 0x77, 0x1d, 0xcf, 0x7f, 0x87, 0xc0, - /* U+36 "6" */ + /* U+0036 "6" */ 0xe, 0x3, 0x1, 0xc0, 0x60, 0x38, 0x1d, 0xc7, 0xfb, 0xcf, 0xe1, 0xf8, 0x7e, 0x1f, 0xcf, 0x7f, - 0x87, 0x80, + 0x8f, 0x80, - /* U+37 "7" */ + /* U+0037 "7" */ 0xff, 0xff, 0xfe, 0x1f, 0x86, 0x3, 0x80, 0xe0, 0x30, 0x1c, 0x6, 0x3, 0x80, 0xc0, 0x70, 0x1c, 0x6, 0x0, - /* U+38 "8" */ + /* U+0038 "8" */ 0x3f, 0x1f, 0xef, 0x3f, 0x87, 0xe1, 0xdc, 0xe3, 0xf0, 0xfc, 0x73, 0xb8, 0x7e, 0x1f, 0xcf, 0x7f, 0x8f, 0xc0, - /* U+39 "9" */ + /* U+0039 "9" */ 0x1e, 0x1f, 0xef, 0x3f, 0x87, 0xe1, 0xf8, 0x7f, 0x3d, 0xfe, 0x3b, 0x81, 0xc0, 0x60, 0x38, 0xc, 0x7, 0x0, - /* U+3A ":" */ + /* U+003A ":" */ 0xff, 0x80, 0x0, 0xff, 0x80, - /* U+3B ";" */ + /* U+003B ";" */ 0x7b, 0xde, 0x0, 0x0, 0x0, 0x3, 0xdc, 0xe6, 0x73, 0x0, - /* U+3C "<" */ + /* U+003C "<" */ 0x0, 0x81, 0xc3, 0xe7, 0xcf, 0x6, 0x3, 0xc0, 0x7c, 0xf, 0x81, 0xc0, 0x20, - /* U+3D "=" */ + /* U+003D "=" */ 0xff, 0xff, 0xc0, 0x0, 0x0, 0x7, 0xff, 0xfe, - /* U+3E ">" */ + /* U+003E ">" */ 0x80, 0x70, 0x3e, 0x7, 0xc0, 0xf8, 0xc, 0x1e, 0x3c, 0xf8, 0x70, 0x20, 0x0, - /* U+3F "?" */ + /* U+003F "?" */ 0xfc, 0xfe, 0xf, 0x7, 0x7, 0xf, 0x3e, 0x3c, 0x30, 0x30, 0x0, 0x0, 0x70, 0x70, - /* U+40 "@" */ + /* U+0040 "@" */ 0x1f, 0x7, 0xf9, 0xc3, 0x70, 0x3c, 0x7, 0x8f, 0xf3, 0xfe, 0x63, 0xcc, 0x79, 0x8f, 0x31, 0xe6, 0x3c, 0xff, 0x8e, 0xf8, 0x3, 0x80, 0x3e, 0x3, 0xc0, - /* U+41 "A" */ + /* U+0041 "A" */ 0x1e, 0x7, 0x81, 0xe0, 0xfc, 0x3f, 0xc, 0xc3, 0x31, 0xce, 0x73, 0x9f, 0xe7, 0xfb, 0x87, 0xe1, 0xf0, 0x30, - /* U+42 "B" */ + /* U+0042 "B" */ 0xfe, 0x3f, 0xce, 0x3b, 0x8e, 0xe3, 0xb8, 0xcf, 0xe3, 0xfc, 0xe3, 0xb8, 0x7e, 0x1f, 0x8f, 0xff, 0xbf, 0xc0, - /* U+43 "C" */ + /* U+0043 "C" */ 0x3f, 0x1f, 0xef, 0x3f, 0x87, 0xe0, 0x38, 0xe, 0x3, 0x80, 0xe0, 0x38, 0xe, 0x1f, 0xcf, 0x7f, 0x8f, 0xc0, - /* U+44 "D" */ + /* U+0044 "D" */ 0xfe, 0x7f, 0xb9, 0xfc, 0x7e, 0x3f, 0x1f, 0x8f, 0xc7, 0xe3, 0xf1, 0xf8, 0xfc, 0xff, 0xf7, 0xf0, - /* U+45 "E" */ + /* U+0045 "E" */ 0xff, 0xff, 0xf8, 0x1c, 0xe, 0x7, 0x3, 0xfd, 0xfe, 0xe0, 0x70, 0x38, 0x1c, 0xf, 0xff, 0xfc, - /* U+46 "F" */ + /* U+0046 "F" */ 0xff, 0xff, 0xf8, 0x1c, 0xe, 0x7, 0x3, 0xff, 0xff, 0xe0, 0x70, 0x38, 0x1c, 0xe, 0x7, 0x0, - /* U+47 "G" */ - 0x3f, 0x1f, 0xef, 0x1f, 0x87, 0xe0, 0x38, 0xe, + /* U+0047 "G" */ + 0x3f, 0x1f, 0xef, 0x3f, 0x87, 0xe0, 0x38, 0xe, 0x7f, 0x9f, 0xe1, 0xf8, 0x7e, 0x1f, 0xcf, 0x7f, 0x8f, 0xc0, - /* U+48 "H" */ + /* U+0048 "H" */ 0xe3, 0xf1, 0xf8, 0xfc, 0x7e, 0x3f, 0x1f, 0xff, 0xff, 0xe3, 0xf1, 0xf8, 0xfc, 0x7e, 0x3f, 0x1c, - /* U+49 "I" */ + /* U+0049 "I" */ 0xff, 0xff, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0xff, - /* U+4A "J" */ + /* U+004A "J" */ 0x1f, 0xc7, 0xf0, 0x1c, 0x7, 0x1, 0xc0, 0x70, 0x1c, 0x7, 0x1, 0xc0, 0x7e, 0x1f, 0xcf, 0x7f, 0x8f, 0xc0, - /* U+4B "K" */ + /* U+004B "K" */ 0xe1, 0xf8, 0x7e, 0x3b, 0x8e, 0xe7, 0x39, 0xcf, 0xe3, 0xf8, 0xe7, 0x39, 0xce, 0x3b, 0x8e, 0xe1, 0xf8, 0x70, - /* U+4C "L" */ + /* U+004C "L" */ 0xe0, 0x70, 0x38, 0x1c, 0xe, 0x7, 0x3, 0x81, 0xc0, 0xe0, 0x70, 0x38, 0x1c, 0xf, 0xff, 0xfc, - /* U+4D "M" */ + /* U+004D "M" */ 0xe1, 0xf8, 0x7f, 0x3f, 0xcf, 0xd2, 0xf7, 0xbd, 0xef, 0x33, 0xc0, 0xf0, 0x3c, 0xf, 0x3, 0xc0, 0xf0, 0x30, - /* U+4E "N" */ - 0xe1, 0xf0, 0xfc, 0x7e, 0x3d, 0x9e, 0xcf, 0x67, - 0x9b, 0xcd, 0xe6, 0xf1, 0xf8, 0xfc, 0x3e, 0x1c, + /* U+004E "N" */ + 0xe1, 0xf0, 0xfc, 0x7e, 0x3f, 0x9e, 0xcf, 0x67, + 0x9b, 0xcd, 0xe6, 0xf1, 0xf8, 0xfc, 0x7e, 0x1c, - /* U+4F "O" */ + /* U+004F "O" */ 0x3e, 0x3f, 0xb8, 0xfc, 0x7e, 0x3f, 0x1f, 0x8f, 0xc7, 0xe3, 0xf1, 0xf8, 0xfc, 0x77, 0xf1, 0xf0, - /* U+50 "P" */ + /* U+0050 "P" */ 0xff, 0x3f, 0xee, 0x3f, 0x87, 0xe1, 0xf8, 0xff, 0xfb, 0xfc, 0xe0, 0x38, 0xe, 0x3, 0x80, 0xe0, 0x38, 0x0, - /* U+51 "Q" */ + /* U+0051 "Q" */ 0x3f, 0x1f, 0xef, 0x3f, 0x87, 0xe1, 0xf8, 0x7e, 0x1f, 0x87, 0xe1, 0xf8, 0x7e, 0x1f, 0xcf, 0x7f, 0x8f, 0x80, 0x70, 0xe, 0x3, 0x80, 0x70, - /* U+52 "R" */ + /* U+0052 "R" */ 0xff, 0x3f, 0xee, 0x3f, 0x87, 0xe1, 0xf8, 0xff, 0xfb, 0xf8, 0xe6, 0x39, 0xce, 0x33, 0x8e, 0xe3, 0xb8, 0x70, - /* U+53 "S" */ + /* U+0053 "S" */ 0x3f, 0x1f, 0xee, 0x3f, 0x87, 0xe0, 0x3c, 0x7, 0xf0, 0xfe, 0x3, 0xc0, 0x7e, 0x1f, 0xcf, 0x7f, 0x8f, 0xc0, - /* U+54 "T" */ + /* U+0054 "T" */ 0xff, 0xff, 0xf0, 0xe0, 0x38, 0xe, 0x3, 0x80, 0xe0, 0x38, 0xe, 0x3, 0x80, 0xe0, 0x38, 0xe, 0x3, 0x80, - /* U+55 "U" */ + /* U+0055 "U" */ 0xe3, 0xf1, 0xf8, 0xfc, 0x7e, 0x3f, 0x1f, 0x8f, 0xc7, 0xe3, 0xf1, 0xf8, 0xfc, 0x77, 0xf1, 0xf0, - /* U+56 "V" */ + /* U+0056 "V" */ 0xc0, 0xf8, 0x7e, 0x1d, 0x86, 0x61, 0x9c, 0xe7, 0x38, 0xcc, 0x33, 0xf, 0xc3, 0xf0, 0x78, 0x1e, 0x7, 0x80, - /* U+57 "W" */ + /* U+0057 "W" */ 0xce, 0x79, 0xcf, 0x29, 0xe5, 0x3c, 0xa7, 0xd5, 0xda, 0xb3, 0x56, 0x7b, 0xcf, 0x79, 0xef, 0x38, 0xe7, 0x1c, 0xe3, 0x80, - /* U+58 "X" */ + /* U+0058 "X" */ 0xe1, 0xd8, 0x67, 0x38, 0xcc, 0x3f, 0x7, 0x81, 0xe0, 0x78, 0x1e, 0xf, 0xc3, 0x31, 0xce, 0xe1, 0xf8, 0x70, - /* U+59 "Y" */ + /* U+0059 "Y" */ 0xe0, 0xfc, 0x1d, 0xc7, 0x38, 0xe3, 0xb8, 0x77, 0x6, 0xc0, 0xf8, 0xe, 0x1, 0xc0, 0x38, 0x7, 0x0, 0xe0, 0x1c, 0x0, - /* U+5A "Z" */ + /* U+005A "Z" */ 0xff, 0xff, 0xc0, 0xe0, 0xe0, 0x70, 0x70, 0x70, 0x38, 0x38, 0x38, 0x1c, 0x1c, 0xf, 0xff, 0xfc, - /* U+5B "[" */ + /* U+005B "[" */ 0xff, 0xfe, 0x38, 0xe3, 0x8e, 0x38, 0xe3, 0x8e, 0x38, 0xe3, 0x8e, 0x38, 0xff, 0xf0, - /* U+5C "\\" */ + /* U+005C "\\" */ 0xe0, 0x18, 0x7, 0x1, 0xc0, 0x30, 0xe, 0x3, 0x80, 0x60, 0x1c, 0x3, 0x0, 0xe0, 0x38, 0x6, 0x1, 0xc0, 0x70, 0xc, 0x3, 0x80, 0x60, 0x1c, - /* U+5D "]" */ + /* U+005D "]" */ 0xff, 0xf1, 0xc7, 0x1c, 0x71, 0xc7, 0x1c, 0x71, 0xc7, 0x1c, 0x71, 0xc7, 0xff, 0xf0, - /* U+5E "^" */ + /* U+005E "^" */ 0xc, 0x7, 0x81, 0xe0, 0xfc, 0x33, 0x1c, 0xe6, 0x19, 0x86, - /* U+5F "_" */ + /* U+005F "_" */ 0xff, 0xff, 0xf0, - /* U+60 "`" */ + /* U+0060 "`" */ 0xe3, 0x8c, - /* U+61 "a" */ + /* U+0061 "a" */ 0x1f, 0x1f, 0xe7, 0x1c, 0x7, 0x3f, 0xdf, 0xfe, 0x1f, 0x87, 0xe3, 0xff, 0xf3, 0xdc, - /* U+62 "b" */ + /* U+0062 "b" */ 0xe0, 0x70, 0x38, 0x1d, 0xcf, 0xf7, 0x1f, 0x8f, 0xc7, 0xe3, 0xf1, 0xf8, 0xfc, 0x7f, 0xf7, 0x70, - /* U+63 "c" */ + /* U+0063 "c" */ 0x3e, 0x3f, 0xb8, 0xfc, 0x7e, 0x7, 0x3, 0x81, 0xc7, 0xe3, 0xbf, 0x8f, 0x80, - /* U+64 "d" */ + /* U+0064 "d" */ 0x3, 0x81, 0xc0, 0xe7, 0x77, 0xff, 0x1f, 0x8f, 0xc7, 0xe3, 0xf1, 0xf8, 0xfc, 0x77, 0xf9, 0xdc, - /* U+65 "e" */ + /* U+0065 "e" */ 0x3e, 0x3f, 0xb8, 0xfc, 0x7f, 0xff, 0xff, 0x81, 0xc0, 0xe3, 0xbf, 0x8f, 0x80, - /* U+66 "f" */ + /* U+0066 "f" */ 0xf, 0xc7, 0xf1, 0xc0, 0x70, 0xff, 0xff, 0xf1, 0xc0, 0x70, 0x1c, 0x7, 0x1, 0xc0, 0x70, 0x1c, 0x7, 0x0, - /* U+67 "g" */ + /* U+0067 "g" */ 0x3b, 0xbf, 0xfd, 0xfc, 0x7e, 0x3f, 0x1f, 0x8f, 0xc7, 0xf7, 0xbf, 0xce, 0xe0, 0x70, 0x39, 0xf8, 0xf8, - /* U+68 "h" */ + /* U+0068 "h" */ 0xe0, 0x70, 0x38, 0x1d, 0xcf, 0xf7, 0x1f, 0x8f, 0xc7, 0xe3, 0xf1, 0xf8, 0xfc, 0x7e, 0x3f, 0x1c, - /* U+69 "i" */ + /* U+0069 "i" */ 0x1c, 0x7, 0x1, 0xc0, 0x0, 0x0, 0x3f, 0xf, 0xc0, 0x70, 0x1c, 0x7, 0x1, 0xc0, 0x70, 0x1c, 0x7, 0xf, 0xff, 0xff, - /* U+6A "j" */ + /* U+006A "j" */ 0x7, 0x7, 0x7, 0x0, 0xff, 0xff, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0xf, 0xfe, 0xfc, - /* U+6B "k" */ + /* U+006B "k" */ 0xe0, 0x38, 0xe, 0x3, 0x87, 0xe3, 0xb8, 0xee, 0x73, 0xf8, 0xfe, 0x39, 0xce, 0x33, 0x8e, 0xe1, 0xb8, 0x70, - /* U+6C "l" */ + /* U+006C "l" */ 0xfe, 0x1f, 0xc0, 0x38, 0x7, 0x0, 0xe0, 0x1c, 0x3, 0x80, 0x70, 0xe, 0x1, 0xc0, 0x38, 0x7, 0x0, 0x7e, 0x7, 0xc0, - /* U+6D "m" */ + /* U+006D "m" */ 0xd9, 0xbf, 0xfc, 0xcf, 0x33, 0xcc, 0xf3, 0x3c, 0xcf, 0x33, 0xcc, 0xf3, 0x3c, 0xcc, - /* U+6E "n" */ + /* U+006E "n" */ 0xee, 0x7f, 0xb8, 0xfc, 0x7e, 0x3f, 0x1f, 0x8f, 0xc7, 0xe3, 0xf1, 0xf8, 0xe0, - /* U+6F "o" */ + /* U+006F "o" */ 0x3e, 0x3f, 0xb8, 0xfc, 0x7e, 0x3f, 0x1f, 0x8f, 0xc7, 0xe3, 0xbf, 0x8f, 0x80, - /* U+70 "p" */ + /* U+0070 "p" */ 0xee, 0x7f, 0xb8, 0xfc, 0x7e, 0x3f, 0x1f, 0x8f, 0xc7, 0xe3, 0xff, 0xbb, 0x9c, 0xe, 0x7, 0x3, 0x80, - /* U+71 "q" */ + /* U+0071 "q" */ 0x3b, 0xbf, 0xf8, 0xfc, 0x7e, 0x3f, 0x1f, 0x8f, 0xc7, 0xe3, 0xbf, 0xce, 0xe0, 0x70, 0x38, 0x1c, 0xe, - /* U+72 "r" */ - 0xee, 0x7f, 0xb8, 0xfc, 0x7e, 0x3f, 0x3, 0x81, + /* U+0072 "r" */ + 0xee, 0x7f, 0xb9, 0xfc, 0x7e, 0x3f, 0x3, 0x81, 0xc0, 0xe0, 0x70, 0x38, 0x0, - /* U+73 "s" */ + /* U+0073 "s" */ 0x1f, 0x1f, 0xf7, 0x1d, 0xc0, 0x7c, 0xf, 0xe0, 0x3c, 0x7, 0x71, 0xdf, 0xe3, 0xf0, - /* U+74 "t" */ + /* U+0074 "t" */ 0x1c, 0x7, 0x1, 0xc3, 0xff, 0xff, 0xc7, 0x1, 0xc0, 0x70, 0x1c, 0x7, 0x1, 0xc0, 0x70, 0x1f, 0xc3, 0xf0, - /* U+75 "u" */ + /* U+0075 "u" */ 0xe3, 0xf1, 0xf8, 0xfc, 0x7e, 0x3f, 0x1f, 0x8f, 0xc7, 0xe3, 0xbf, 0x8f, 0x80, - /* U+76 "v" */ + /* U+0076 "v" */ 0xe0, 0xf8, 0x76, 0x19, 0x86, 0x73, 0x8c, 0xc3, 0x30, 0xfc, 0x1e, 0x7, 0x81, 0xe0, - /* U+77 "w" */ + /* U+0077 "w" */ 0xe6, 0x36, 0x66, 0x66, 0x66, 0xf6, 0x6f, 0x66, 0x96, 0x69, 0x62, 0x94, 0x39, 0xc3, 0x9c, 0x39, 0xc0, - /* U+78 "x" */ + /* U+0078 "x" */ 0xe1, 0xdc, 0xe3, 0x30, 0xfc, 0x1e, 0x7, 0x81, - 0xe0, 0xfc, 0x73, 0x9c, 0x6e, 0x1c, + 0xe0, 0xfc, 0x73, 0x9c, 0xee, 0x1c, - /* U+79 "y" */ + /* U+0079 "y" */ 0xe1, 0xf8, 0x76, 0x19, 0xce, 0x73, 0x8c, 0xc3, 0xf0, 0x7c, 0x1e, 0x7, 0x80, 0xe0, 0x30, 0x1c, 0x6, 0x3, 0x80, - /* U+7A "z" */ + /* U+007A "z" */ 0xff, 0xff, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0x7f, 0xff, 0xe0, - /* U+7B "{" */ + /* U+007B "{" */ 0x3, 0x87, 0xc3, 0x81, 0xc0, 0xe0, 0x70, 0x38, 0x1c, 0xfc, 0x7e, 0x3, 0x81, 0xc0, 0xe0, 0x70, 0x38, 0x1c, 0xf, 0x81, 0xc0, - /* U+7C "|" */ + /* U+007C "|" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, - /* U+7D "}" */ + /* U+007D "}" */ 0xf0, 0x3e, 0x1, 0xc0, 0x70, 0x1c, 0x7, 0x1, 0xc0, 0x70, 0xf, 0xc3, 0xf1, 0xc0, 0x70, 0x1c, 0x7, 0x1, 0xc0, 0x70, 0xf8, 0x3c, 0x0, - /* U+7E "~" */ + /* U+007E "~" */ 0x78, 0xff, 0x3c, 0xcf, 0x3f, 0xc7, 0x80, - /* U+410 "А" */ + /* U+0410 "А" */ 0x1e, 0x7, 0x81, 0xe0, 0xfc, 0x3f, 0xc, 0xc3, 0x31, 0xce, 0x73, 0x9f, 0xe7, 0xfb, 0x87, 0xe1, 0xf0, 0x30, - /* U+411 "Б" */ + /* U+0411 "Б" */ 0xff, 0xbf, 0xee, 0x3, 0x80, 0xe0, 0x3f, 0xcf, 0xfb, 0x8f, 0xe1, 0xf8, 0x7e, 0x1f, 0x8f, 0xff, - 0xbf, 0x80, + 0xbf, 0xc0, - /* U+412 "В" */ + /* U+0412 "В" */ 0xfe, 0x3f, 0xce, 0x3b, 0x8e, 0xe3, 0xb8, 0xcf, 0xe3, 0xfc, 0xe3, 0xb8, 0x7e, 0x1f, 0x8f, 0xff, 0xbf, 0xc0, - /* U+413 "Г" */ + /* U+0413 "Г" */ 0xff, 0xff, 0xf8, 0x1c, 0xe, 0x7, 0x3, 0x81, 0xc0, 0xe0, 0x70, 0x38, 0x1c, 0xe, 0x7, 0x0, - /* U+414 "Д" */ + /* U+0414 "Д" */ 0x3f, 0xc7, 0xf8, 0xe7, 0x1c, 0xe3, 0x9c, 0x73, 0x8e, 0x71, 0xce, 0x39, 0xc7, 0x38, 0xe7, 0x38, 0xef, 0xff, 0xff, 0xf8, 0x3f, 0x7, 0xe0, 0xe0, - /* U+415 "Е" */ + /* U+0415 "Е" */ 0xff, 0xff, 0xf8, 0x1c, 0xe, 0x7, 0x3, 0xfd, 0xfe, 0xe0, 0x70, 0x38, 0x1c, 0xf, 0xff, 0xfc, - /* U+416 "Ж" */ + /* U+0416 "Ж" */ 0xe6, 0x76, 0x66, 0x66, 0x67, 0x66, 0x36, 0xc3, 0x6c, 0x3f, 0xc3, 0x6c, 0x36, 0xc7, 0x6e, 0x66, 0x66, 0x66, 0x66, 0x6c, 0x63, - /* U+417 "З" */ + /* U+0417 "З" */ 0x1f, 0xf, 0xf3, 0xc7, 0x0, 0x60, 0x1c, 0x1e, 0x3, 0xf0, 0xe, 0x0, 0xe0, 0x1f, 0x83, 0xf8, 0xf7, 0xfc, 0x3e, 0x0, - /* U+418 "И" */ + /* U+0418 "И" */ 0xc3, 0xe3, 0xf1, 0xf8, 0xfc, 0xde, 0x6f, 0x37, 0xb3, 0xd9, 0xfc, 0xfc, 0x7e, 0x3e, 0x1f, 0xc, - /* U+419 "Й" */ + /* U+0419 "Й" */ 0x63, 0x31, 0x8f, 0x83, 0x80, 0x6, 0x1f, 0x1f, 0x8f, 0xc7, 0xe7, 0xf3, 0x79, 0xbd, 0x9e, 0xcf, 0xe7, 0xe3, 0xf1, 0xf8, 0xf8, 0x60, - /* U+41A "К" */ + /* U+041A "К" */ 0xe1, 0xf8, 0x7e, 0x3b, 0x8e, 0xe7, 0x39, 0xcf, 0xe3, 0xf8, 0xe7, 0x39, 0xce, 0x3b, 0x8e, 0xe1, 0xf8, 0x70, - /* U+41B "Л" */ + /* U+041B "Л" */ 0x3f, 0xcf, 0xf3, 0x9c, 0xe7, 0x39, 0xce, 0x73, 0x9c, 0xe7, 0x39, 0xce, 0x73, 0x9d, 0xe7, 0xf1, 0xf8, 0x70, - /* U+41C "М" */ + /* U+041C "М" */ 0xe1, 0xf8, 0x7f, 0x3f, 0xcf, 0xd2, 0xf7, 0xbd, 0xef, 0x33, 0xc0, 0xf0, 0x3c, 0xf, 0x3, 0xc0, 0xf0, 0x30, - /* U+41D "Н" */ + /* U+041D "Н" */ 0xe3, 0xf1, 0xf8, 0xfc, 0x7e, 0x3f, 0x1f, 0xff, 0xff, 0xe3, 0xf1, 0xf8, 0xfc, 0x7e, 0x3f, 0x1c, - /* U+41E "О" */ + /* U+041E "О" */ 0x3e, 0x3f, 0xb8, 0xfc, 0x7e, 0x3f, 0x1f, 0x8f, 0xc7, 0xe3, 0xf1, 0xf8, 0xfc, 0x77, 0xf1, 0xf0, - /* U+41F "П" */ + /* U+041F "П" */ 0xff, 0xff, 0xf8, 0xfc, 0x7e, 0x3f, 0x1f, 0x8f, 0xc7, 0xe3, 0xf1, 0xf8, 0xfc, 0x7e, 0x3f, 0x1c, - /* U+420 "Р" */ + /* U+0420 "Р" */ 0xff, 0x3f, 0xee, 0x3f, 0x87, 0xe1, 0xf8, 0xff, 0xfb, 0xfc, 0xe0, 0x38, 0xe, 0x3, 0x80, 0xe0, 0x38, 0x0, - /* U+421 "С" */ + /* U+0421 "С" */ 0x3f, 0x1f, 0xef, 0x3f, 0x87, 0xe0, 0x38, 0xe, 0x3, 0x80, 0xe0, 0x38, 0xe, 0x1f, 0xcf, 0x7f, 0x8f, 0xc0, - /* U+422 "Т" */ + /* U+0422 "Т" */ 0xff, 0xff, 0xf0, 0xe0, 0x38, 0xe, 0x3, 0x80, 0xe0, 0x38, 0xe, 0x3, 0x80, 0xe0, 0x38, 0xe, 0x3, 0x80, - /* U+423 "У" */ + /* U+0423 "У" */ 0xe1, 0xf8, 0x76, 0x19, 0xce, 0x33, 0x8c, 0xc3, 0xb0, 0x7c, 0x1e, 0x3, 0x80, 0xc0, 0x70, 0x1c, 0x6, 0x0, - /* U+424 "Ф" */ + /* U+0424 "Ф" */ 0xc, 0xf, 0xc7, 0xfb, 0xb7, 0xcc, 0xf3, 0x3c, 0xcf, 0x33, 0xcc, 0xf3, 0x3c, 0xcf, 0xb7, 0x7f, 0x8f, 0xc0, 0xc0, 0x30, - /* U+425 "Х" */ + /* U+0425 "Х" */ 0xe1, 0xd8, 0x67, 0x38, 0xcc, 0x3f, 0x7, 0x81, 0xe0, 0x78, 0x1e, 0xf, 0xc3, 0x31, 0xce, 0xe1, 0xf8, 0x70, - /* U+426 "Ц" */ + /* U+0426 "Ц" */ 0xe3, 0xb8, 0xee, 0x3b, 0x8e, 0xe3, 0xb8, 0xee, 0x3b, 0x8e, 0xe3, 0xb8, 0xee, 0x3b, 0x8e, 0xff, 0xff, 0xf0, 0x1c, 0x7, 0x1, 0xc0, - /* U+427 "Ч" */ + /* U+0427 "Ч" */ 0xe3, 0xf1, 0xf8, 0xfc, 0x7e, 0x3f, 0x1f, 0xce, 0xff, 0x3f, 0x81, 0xc0, 0xe0, 0x70, 0x38, 0x1c, - /* U+428 "Ш" */ + /* U+0428 "Ш" */ 0xcc, 0xf3, 0x3c, 0xcf, 0x33, 0xcc, 0xf3, 0x3c, 0xcf, 0x33, 0xcc, 0xf3, 0x3c, 0xcf, 0x33, 0xff, 0xff, 0xf0, - /* U+429 "Щ" */ + /* U+0429 "Щ" */ 0xcc, 0xd9, 0x9b, 0x33, 0x66, 0x6c, 0xcd, 0x99, 0xb3, 0x36, 0x66, 0xcc, 0xd9, 0x9b, 0x33, 0x66, 0x6f, 0xff, 0xff, 0xc0, 0x18, 0x3, - /* U+42A "Ъ" */ + /* U+042A "Ъ" */ 0xfc, 0xf, 0xc0, 0x1c, 0x1, 0xc0, 0x1c, 0x1, 0xfc, 0x1f, 0xe1, 0xcf, 0x1c, 0x71, 0xc7, 0x1c, - 0x71, 0xcf, 0x1f, 0xe1, 0xf8, + 0x71, 0xcf, 0x1f, 0xe1, 0xfc, - /* U+42B "Ы" */ + /* U+042B "Ы" */ 0xc0, 0xf0, 0x3c, 0xf, 0x3, 0xc0, 0xfe, 0x3f, 0xcf, 0x3b, 0xc6, 0xf1, 0xbc, 0x6f, 0x3b, 0xfc, 0xfe, 0x30, - /* U+42C "Ь" */ + /* U+042C "Ь" */ 0xe0, 0x38, 0xe, 0x3, 0x80, 0xe0, 0x3f, 0xcf, 0xfb, 0x8f, 0xe1, 0xf8, 0x7e, 0x1f, 0x8f, 0xff, 0xbf, 0x80, - /* U+42D "Э" */ + /* U+042D "Э" */ 0x3e, 0x3f, 0xb8, 0xfc, 0x70, 0x38, 0x1c, 0x7e, 0x3f, 0x3, 0x81, 0xf8, 0xfc, 0x77, 0xf1, 0xf0, - /* U+42E "Ю" */ + /* U+042E "Ю" */ 0xc7, 0xb3, 0xfc, 0xcf, 0x33, 0xcc, 0xff, 0x3f, 0xcf, 0x33, 0xcc, 0xf3, 0x3c, 0xcf, 0x33, 0xcf, 0xf1, 0xe0, - /* U+42F "Я" */ + /* U+042F "Я" */ 0x3f, 0xdf, 0xff, 0x1f, 0x87, 0xe1, 0xfc, 0x77, 0xfc, 0x7f, 0x19, 0xce, 0x73, 0x1d, 0xc7, 0x71, 0xf8, 0x70, - /* U+430 "а" */ + /* U+0430 "а" */ 0x1f, 0x1f, 0xe7, 0x1c, 0x7, 0x3f, 0xdf, 0xfe, 0x1f, 0x87, 0xe3, 0xff, 0xf3, 0xdc, - /* U+431 "б" */ + /* U+0431 "б" */ 0x1f, 0x3f, 0x9c, 0x1c, 0xe, 0xe7, 0xfb, 0x8f, 0xc7, 0xe3, 0xf1, 0xf8, 0xfc, 0x77, 0xf1, 0xf0, - /* U+432 "в" */ + /* U+0432 "в" */ 0xff, 0x3f, 0xee, 0x3b, 0x8e, 0xfe, 0x3f, 0xee, 0x1f, 0x87, 0xe1, 0xff, 0xef, 0xf0, - /* U+433 "г" */ + /* U+0433 "г" */ 0xff, 0xff, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, - /* U+434 "д" */ + /* U+0434 "д" */ 0x3f, 0xc7, 0xf8, 0xe7, 0x1c, 0xe3, 0x9c, 0x73, 0x8e, 0x71, 0xce, 0x71, 0xdf, 0xff, 0xff, 0xf0, 0x7e, 0xf, 0xc1, 0xc0, - /* U+435 "е" */ + /* U+0435 "е" */ 0x3e, 0x3f, 0xb8, 0xfc, 0x7f, 0xff, 0xff, 0x81, 0xc0, 0xe3, 0xbf, 0x8f, 0x80, - /* U+436 "ж" */ + /* U+0436 "ж" */ 0xe6, 0x76, 0x66, 0x66, 0x63, 0x6c, 0x36, 0xc3, - 0xfc, 0x36, 0xc3, 0x6c, 0x66, 0x66, 0x66, 0xe6, + 0xfc, 0x36, 0xc3, 0x6e, 0x66, 0x66, 0x66, 0xe6, 0x70, - /* U+437 "з" */ + /* U+0437 "з" */ 0x3f, 0x1f, 0xfe, 0x1c, 0x7, 0x1f, 0x87, 0xe0, 0x1c, 0x7, 0xe1, 0xdf, 0xe3, 0xf0, - /* U+438 "и" */ + /* U+0438 "и" */ 0xc3, 0xe3, 0xf1, 0xf9, 0xfc, 0xde, 0xef, 0x67, 0xb3, 0xf1, 0xf8, 0xf8, 0x60, - /* U+439 "й" */ + /* U+0439 "й" */ 0x63, 0x31, 0x8f, 0x83, 0x80, 0x6, 0x1f, 0x1f, 0x8f, 0xcf, 0xe6, 0xf7, 0x7b, 0x3f, 0x9f, 0x8f, 0xc7, 0xc3, - /* U+43A "к" */ + /* U+043A "к" */ 0xe1, 0xf8, 0xee, 0x33, 0x9c, 0xfe, 0x3f, 0x8e, 0x73, 0x9c, 0xe3, 0xb8, 0x6e, 0x1c, - /* U+43B "л" */ + /* U+043B "л" */ 0x3f, 0xcf, 0xf3, 0x9c, 0xe7, 0x39, 0xce, 0x73, 0x9c, 0xe7, 0x39, 0xfc, 0x7e, 0x1c, - /* U+43C "м" */ + /* U+043C "м" */ 0xe1, 0xf8, 0x7f, 0x3f, 0xcf, 0xda, 0xf7, 0xbd, 0xef, 0x33, 0xc0, 0xf0, 0x3c, 0xc, - /* U+43D "н" */ + /* U+043D "н" */ 0xe3, 0xf1, 0xf8, 0xfc, 0x7e, 0x3f, 0xff, 0xff, 0xc7, 0xe3, 0xf1, 0xf8, 0xe0, - /* U+43E "о" */ + /* U+043E "о" */ 0x3e, 0x3f, 0xb8, 0xfc, 0x7e, 0x3f, 0x1f, 0x8f, 0xc7, 0xe3, 0xbf, 0x8f, 0x80, - /* U+43F "п" */ + /* U+043F "п" */ 0xff, 0xff, 0xf8, 0xfc, 0x7e, 0x3f, 0x1f, 0x8f, 0xc7, 0xe3, 0xf1, 0xf8, 0xe0, - /* U+440 "р" */ + /* U+0440 "р" */ 0xee, 0x7f, 0xb8, 0xfc, 0x7e, 0x3f, 0x1f, 0x8f, 0xc7, 0xe3, 0xff, 0xbb, 0x9c, 0xe, 0x7, 0x3, 0x80, - /* U+441 "с" */ + /* U+0441 "с" */ 0x3e, 0x3f, 0xb8, 0xfc, 0x7e, 0x7, 0x3, 0x81, 0xc7, 0xe3, 0xbf, 0x8f, 0x80, - /* U+442 "т" */ + /* U+0442 "т" */ 0xff, 0xff, 0xf0, 0xe0, 0x38, 0xe, 0x3, 0x80, 0xe0, 0x38, 0xe, 0x3, 0x80, 0xe0, - /* U+443 "у" */ + /* U+0443 "у" */ 0xe1, 0xf8, 0x76, 0x19, 0xce, 0x73, 0x8c, 0xc3, 0xf0, 0x7c, 0x1e, 0x7, 0x80, 0xe0, 0x30, 0x1c, 0x6, 0x3, 0x80, - /* U+444 "ф" */ + /* U+0444 "ф" */ 0xc, 0x3, 0x0, 0xc0, 0xfc, 0x7f, 0xbb, 0x7c, 0xcf, 0x33, 0xcc, 0xf3, 0x3c, 0xcf, 0xb7, 0x7f, 0x8f, 0xc0, 0xc0, 0x30, 0xc, 0x3, 0x0, - /* U+445 "х" */ + /* U+0445 "х" */ 0xe1, 0xdc, 0xe3, 0x30, 0xfc, 0x1e, 0x7, 0x81, - 0xe0, 0xfc, 0x73, 0x9c, 0x6e, 0x1c, + 0xe0, 0xfc, 0x73, 0x9c, 0xee, 0x1c, - /* U+446 "ц" */ + /* U+0446 "ц" */ 0xe3, 0xb8, 0xee, 0x3b, 0x8e, 0xe3, 0xb8, 0xee, 0x3b, 0x8e, 0xe3, 0xbf, 0xff, 0xfc, 0x7, 0x1, 0xc0, 0x70, - /* U+447 "ч" */ + /* U+0447 "ч" */ 0xe3, 0xf1, 0xf8, 0xfc, 0x7e, 0x3b, 0xfc, 0xfe, 0x7, 0x3, 0x81, 0xc0, 0xe0, - /* U+448 "ш" */ + /* U+0448 "ш" */ 0xcc, 0xf3, 0x3c, 0xcf, 0x33, 0xcc, 0xf3, 0x3c, 0xcf, 0x33, 0xcc, 0xff, 0xff, 0xfc, - /* U+449 "щ" */ + /* U+0449 "щ" */ 0xcc, 0xd9, 0x9b, 0x33, 0x66, 0x6c, 0xcd, 0x99, 0xb3, 0x36, 0x66, 0xcc, 0xdf, 0xff, 0xff, 0x80, 0x30, 0x6, - /* U+44A "ъ" */ + /* U+044A "ъ" */ 0xfc, 0xf, 0xc0, 0x1c, 0x1, 0xc0, 0x1f, 0xc1, 0xfe, 0x1c, 0x71, 0xc7, 0x1c, 0x71, 0xfe, 0x1f, 0xc0, - /* U+44B "ы" */ + /* U+044B "ы" */ 0xc0, 0xf0, 0x3c, 0xf, 0x3, 0xf8, 0xff, 0x3c, - 0x6f, 0x1b, 0xc6, 0xff, 0x3f, 0x8c, + 0xef, 0x1b, 0xc6, 0xff, 0x3f, 0x8c, - /* U+44C "ь" */ + /* U+044C "ь" */ 0xe0, 0x38, 0xe, 0x3, 0x80, 0xff, 0x3f, 0xee, 0x1f, 0x87, 0xe1, 0xff, 0xef, 0xf0, - /* U+44D "э" */ + /* U+044D "э" */ 0x3e, 0x3f, 0xb8, 0xe0, 0x70, 0xf8, 0x7c, 0xf, 0xc7, 0xe7, 0xbf, 0x8f, 0x80, - /* U+44E "ю" */ + /* U+044E "ю" */ 0xc7, 0xb3, 0xfc, 0xcf, 0x33, 0xfc, 0xff, 0x3c, 0xcf, 0x33, 0xcc, 0xf3, 0xfc, 0x78, - /* U+44F "я" */ + /* U+044F "я" */ 0x3f, 0xbf, 0xf8, 0xfc, 0x7e, 0x3b, 0xfc, 0xfe, 0x77, 0x33, 0xb9, 0xf8, 0xe0, @@ -727,7 +731,7 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { 0xfc, 0x70, 0x7e, 0x7, 0x7, 0x0, 0x70, 0x70, 0x7, 0x7, 0x0, 0x70, 0x70, 0x7, 0x7, 0x0, 0x70, 0x70, 0x7f, 0x7, 0xf, 0xf7, 0xf0, 0xff, - 0xff, 0x7, 0xef, 0xf0, 0x0, 0xff, 0x0, 0x3, + 0xff, 0x7, 0xef, 0xf0, 0x10, 0xff, 0x0, 0x3, 0xc0, 0x0, /* U+F017 "" */ @@ -739,11 +743,11 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { 0x1, 0xff, 0xc0, 0x1f, 0xf0, 0x0, 0x70, 0x0, /* U+F024 "" */ - 0x70, 0x0, 0xf, 0x80, 0x0, 0xf8, 0x0, 0xf, + 0x70, 0x0, 0xf, 0x80, 0x0, 0xf9, 0x0, 0xf, 0xff, 0xf, 0x7f, 0xff, 0xf7, 0xff, 0xff, 0x7f, 0xff, 0xf7, 0xff, 0xff, 0x7f, 0xff, 0xf7, 0xff, 0xff, 0x7f, 0xff, 0xf7, 0xff, 0xff, 0x7f, 0xff, - 0xf7, 0xff, 0xff, 0x7f, 0x7f, 0xe7, 0x0, 0x78, + 0xf7, 0xff, 0xff, 0x7f, 0xff, 0xe7, 0x0, 0xf8, 0x70, 0x0, 0x7, 0x0, 0x0, 0x70, 0x0, 0x7, 0x0, 0x0, @@ -869,35 +873,35 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { 0x7f, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xb8, 0x0, 0x1, 0xfd, 0xff, 0xfe, 0xfe, 0xff, 0xff, 0x7f, 0x7f, 0xff, 0x9f, 0xbf, 0xff, 0xcf, 0xdf, 0xff, - 0xe7, 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f, 0xc0, 0x0, - 0x7, 0xe0, 0x0, 0x7, 0xf0, 0x0, 0x3, 0xff, + 0xf, 0xe0, 0x0, 0x7, 0xf0, 0x0, 0x3, 0xff, 0xff, 0xff, 0xcf, 0xff, 0xff, 0xe0, /* U+F252 "" */ @@ -933,9 +937,9 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { 0x78, 0xf, 0xe0, 0x1e, 0x7, 0xf0, 0x3, 0xc1, 0xf8, 0x0, 0xf0, 0x78, 0x0, 0x3c, 0x3c, 0x0, 0xf, 0xbe, 0x0, 0x1, 0xfe, 0x0, 0x0, 0x7e, - 0x0, 0x1c, 0x1f, 0x0, 0x7f, 0x3, 0xc0, 0x7f, + 0x0, 0x1c, 0x1f, 0x0, 0x7f, 0x3, 0xc0, 0x3f, 0xf0, 0xf0, 0x1f, 0xfc, 0x3c, 0xf, 0xfe, 0x7, - 0x87, 0xfe, 0x1, 0xe3, 0xf8, 0x0, 0x70, 0x0, + 0x87, 0xfe, 0x1, 0xe3, 0xf8, 0x0, 0x70, 0x80, 0x0, 0x10, /* U+F3FD "" */ @@ -1240,9 +1244,14 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = * ALL CUSTOM DATA *--------------------*/ +#if LV_VERSION_CHECK(8, 0, 0) /*Store all the custom data of the font*/ +static lv_font_fmt_txt_glyph_cache_t cache; +static const lv_font_fmt_txt_dsc_t font_dsc = { +#else static lv_font_fmt_txt_dsc_t font_dsc = { - .glyph_bitmap = gylph_bitmap, +#endif + .glyph_bitmap = glyph_bitmap, .glyph_dsc = glyph_dsc, .cmaps = cmaps, .kern_dsc = NULL, @@ -1250,7 +1259,10 @@ static lv_font_fmt_txt_dsc_t font_dsc = { .cmap_num = 3, .bpp = 1, .kern_classes = 0, - .bitmap_format = 0 + .bitmap_format = 0, +#if LV_VERSION_CHECK(8, 0, 0) + .cache = &cache +#endif }; @@ -1259,7 +1271,11 @@ static lv_font_fmt_txt_dsc_t font_dsc = { *----------------*/ /*Initialize a public general font descriptor*/ +#if LV_VERSION_CHECK(8, 0, 0) +const lv_font_t jetbrains_mono_bold_20 = { +#else lv_font_t jetbrains_mono_bold_20 = { +#endif .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/ .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ .line_height = 23, /*The maximum line height required by the font*/ -- cgit v1.2.3-70-g09d2 From 0045fb16b66b008c13888312b92688dcb7535a0c Mon Sep 17 00:00:00 2001 From: Neil O'Fix <69880003+nlfx@users.noreply.github.com> Date: Sat, 26 Jun 2021 18:53:32 +0000 Subject: SPI flash sleep if bootloader >= 1.0.0 (#322) * Retrieve and display bootloader version - Display bootloader version on System Info screen - Enable SPI flash sleep mode if bootloader version >= 1.0.0 * Wait for SPI flash to wakeup before starting OTA DFU --- src/BootloaderVersion.cpp | 30 ++++++++++++++++++++---------- src/BootloaderVersion.h | 15 ++++++++++----- src/components/ble/DfuService.cpp | 5 +++++ src/displayapp/screens/SystemInfo.cpp | 11 +++++++---- src/main.cpp | 4 ++++ src/systemtask/SystemTask.h | 4 ++++ 6 files changed, 50 insertions(+), 19 deletions(-) diff --git a/src/BootloaderVersion.cpp b/src/BootloaderVersion.cpp index 5eba7a1d..07a1da4e 100644 --- a/src/BootloaderVersion.cpp +++ b/src/BootloaderVersion.cpp @@ -1,26 +1,36 @@ #include +#include #include "BootloaderVersion.h" using namespace Pinetime; -// NOTE : current bootloader does not export its version to the application firmware. +// NOTE : version < 1.0.0 of bootloader does not export its version to the application firmware. -uint32_t BootloaderVersion::Major() { - return 0; +uint32_t BootloaderVersion::version = 0; +char BootloaderVersion::versionString[BootloaderVersion::VERSION_STR_LEN] = "0.0.0"; + +const uint32_t BootloaderVersion::Major() { + return (BootloaderVersion::version >> 16u) & 0xff; } -uint32_t BootloaderVersion::Minor() { - return 0; +const uint32_t BootloaderVersion::Minor() { + return (BootloaderVersion::version >> 8u) & 0xff; } -uint32_t BootloaderVersion::Patch() { - return 0; +const uint32_t BootloaderVersion::Patch() { + return BootloaderVersion::version & 0xff; } const char* BootloaderVersion::VersionString() { - return "0.0.0"; + return BootloaderVersion::versionString; +} + +const bool BootloaderVersion::IsValid() { + return BootloaderVersion::version >= 0x00010000; } -bool BootloaderVersion::IsValid() { - return false; +void BootloaderVersion::SetVersion(uint32_t v) { + BootloaderVersion::version = v; + snprintf(BootloaderVersion::versionString, BootloaderVersion::VERSION_STR_LEN, "%ld.%ld.%ld", + BootloaderVersion::Major(), BootloaderVersion::Minor(), BootloaderVersion::Patch()); } diff --git a/src/BootloaderVersion.h b/src/BootloaderVersion.h index c1ede0f5..f8127414 100644 --- a/src/BootloaderVersion.h +++ b/src/BootloaderVersion.h @@ -3,10 +3,15 @@ namespace Pinetime { class BootloaderVersion { public: - static uint32_t Major(); - static uint32_t Minor(); - static uint32_t Patch(); + static const uint32_t Major(); + static const uint32_t Minor(); + static const uint32_t Patch(); static const char* VersionString(); - static bool IsValid(); + static const bool IsValid(); + static void SetVersion(uint32_t v); + private: + static uint32_t version; + static constexpr size_t VERSION_STR_LEN = 12; + static char versionString[VERSION_STR_LEN]; }; -} \ No newline at end of file +} diff --git a/src/components/ble/DfuService.cpp b/src/components/ble/DfuService.cpp index cec194cc..e6bcea81 100644 --- a/src/components/ble/DfuService.cpp +++ b/src/components/ble/DfuService.cpp @@ -121,6 +121,11 @@ int DfuService::WritePacketHandler(uint16_t connectionHandle, os_mbuf* om) { NRF_LOG_INFO( "[DFU] -> Start data received : SD size : %d, BT size : %d, app size : %d", softdeviceSize, bootloaderSize, applicationSize); + // wait until SystemTask has finished waking up all devices + while (systemTask.IsSleeping()) { + vTaskDelay(50); // 50ms + } + dfuImage.Erase(); uint8_t data[] {16, 1, 1}; diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp index 1cf895c7..60e53ad6 100644 --- a/src/displayapp/screens/SystemInfo.cpp +++ b/src/displayapp/screens/SystemInfo.cpp @@ -3,6 +3,7 @@ #include "../DisplayApp.h" #include "Label.h" #include "Version.h" +#include "BootloaderVersion.h" #include "components/battery/BatteryController.h" #include "components/ble/BleController.h" #include "components/brightness/BrightnessController.h" @@ -83,17 +84,19 @@ std::unique_ptr SystemInfo::CreateScreen1() { lv_label_set_recolor(label, true); lv_label_set_text_fmt(label, "#FFFF00 InfiniTime#\n\n" - "#444444 Version# %ld.%ld.%ld\n\n" - "#444444 Short Ref# %s\n\n" + "#444444 Version# %ld.%ld.%ld\n" + "#444444 Short Ref# %s\n" "#444444 Build date#\n" "%s\n" - "%s\n", + "%s\n\n" + "#444444 Bootloader# %s", Version::Major(), Version::Minor(), Version::Patch(), Version::GitCommitHash(), __DATE__, - __TIME__); + __TIME__, + BootloaderVersion::VersionString()); lv_label_set_align(label, LV_LABEL_ALIGN_CENTER); lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0); return std::make_unique(0, 5, app, label); diff --git a/src/main.cpp b/src/main.cpp index 4c2c5de8..5832a78f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -28,6 +28,7 @@ #include #include +#include "BootloaderVersion.h" #include "components/battery/BatteryController.h" #include "components/ble/BleController.h" #include "components/ble/NotificationManager.h" @@ -306,6 +307,9 @@ int main(void) { debounceTimer = xTimerCreate("debounceTimer", 200, pdFALSE, (void*) 0, DebounceTimerCallback); debounceChargeTimer = xTimerCreate("debounceTimerCharge", 200, pdFALSE, (void*) 0, DebounceTimerChargeCallback); + // retrieve version stored by bootloader + Pinetime::BootloaderVersion::SetVersion(NRF_TIMER2->CC[0]); + lvgl.Init(); systemTask.Start(); diff --git a/src/systemtask/SystemTask.h b/src/systemtask/SystemTask.h index fa6a949c..f563640c 100644 --- a/src/systemtask/SystemTask.h +++ b/src/systemtask/SystemTask.h @@ -73,6 +73,10 @@ namespace Pinetime { return nimbleController; }; + bool IsSleeping() const { + return isSleeping; + } + private: TaskHandle_t taskHandle; -- cgit v1.2.3-70-g09d2 From f317d54218659af437d840d00fd349e7919a243f Mon Sep 17 00:00:00 2001 From: kieranc Date: Tue, 29 Jun 2021 20:20:27 +0200 Subject: Add PineTimeStyle watchface (#334) * PineTimeStyle * Move GPL license header * Add step count gauge - replaces heartrate in sidebar * Enable 12/24h functionality * Set step gauge outer to be white when step goal is reached * Add font source file * Move static needle_colors array to member variable * Add documentation on generating a font * Replace .ttf with Google version, add link to font page Co-authored-by: JF002 --- src/CMakeLists.txt | 4 + src/displayapp/fonts/README.md | 18 + src/displayapp/fonts/open_sans_light.c | 1261 ++++++++++++++++++++ src/displayapp/fonts/open_sans_light.ttf | Bin 0 -> 101696 bytes src/displayapp/screens/Clock.cpp | 14 + src/displayapp/screens/Clock.h | 1 + src/displayapp/screens/PineTimeStyle.cpp | 340 ++++++ src/displayapp/screens/PineTimeStyle.h | 86 ++ .../screens/settings/SettingWatchFace.cpp | 9 + src/libs/lv_conf.h | 1 + 10 files changed, 1734 insertions(+) create mode 100644 src/displayapp/fonts/open_sans_light.c create mode 100644 src/displayapp/fonts/open_sans_light.ttf create mode 100644 src/displayapp/screens/PineTimeStyle.cpp create mode 100644 src/displayapp/screens/PineTimeStyle.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7721d6b8..aca86543 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -235,6 +235,7 @@ set(LVGL_SRC libs/lvgl/src/lv_widgets/lv_cont.h libs/lvgl/src/lv_widgets/lv_cpicker.h libs/lvgl/src/lv_widgets/lv_dropdown.h + libs/lvgl/src/lv_widgets/lv_gauge.h libs/lvgl/src/lv_widgets/lv_img.h libs/lvgl/src/lv_widgets/lv_imgbtn.h libs/lvgl/src/lv_widgets/lv_keyboard.h @@ -321,6 +322,7 @@ set(LVGL_SRC libs/lvgl/src/lv_widgets/lv_cont.c libs/lvgl/src/lv_widgets/lv_cpicker.c libs/lvgl/src/lv_widgets/lv_dropdown.c + libs/lvgl/src/lv_widgets/lv_gauge.c libs/lvgl/src/lv_widgets/lv_img.c libs/lvgl/src/lv_widgets/lv_imgbtn.c libs/lvgl/src/lv_widgets/lv_keyboard.c @@ -423,6 +425,7 @@ list(APPEND SOURCE_FILES displayapp/icons/bg_clock.c displayapp/screens/WatchFaceAnalog.cpp displayapp/screens/WatchFaceDigital.cpp + displayapp/screens/PineTimeStyle.cpp ## @@ -473,6 +476,7 @@ list(APPEND SOURCE_FILES displayapp/fonts/jetbrains_mono_76.c displayapp/fonts/jetbrains_mono_42.c displayapp/fonts/lv_font_sys_48.c + displayapp/fonts/open_sans_light.c displayapp/lv_pinetime_theme.c systemtask/SystemTask.cpp diff --git a/src/displayapp/fonts/README.md b/src/displayapp/fonts/README.md index 08427d51..13b61b8e 100644 --- a/src/displayapp/fonts/README.md +++ b/src/displayapp/fonts/README.md @@ -2,6 +2,7 @@ * [Jetbrains Mono](https://www.jetbrains.com/fr-fr/lp/mono/) * [Awesome font from LVGL](https://lvgl.io/assets/others/FontAwesome5-Solid+Brands+Regular.woff) +* [Open Sans Light from Google](https://fonts.google.com/specimen/Open+Sans) ## Generate the fonts: @@ -14,6 +15,8 @@ * Add a 2nd font, load the file `FontAwesome5-Solid+Brands+Regular.woff` and specify the following range : `0xf293, 0xf294, 0xf244, 0xf240, 0xf242, 0xf243, 0xf241, 0xf54b, 0xf21e, 0xf1e6, 0xf54b, 0xf017, 0xf129, 0xf03a, 0xf185, 0xf560, 0xf001, 0xf3fd, 0xf069, 0xf1fc, 0xf45d, 0xf59f, 0xf5a0, 0xf029, 0xf027, 0xf028, 0xf6a9, 0xf04b, 0xf04c, 0xf048, 0xf051, 0xf095, 0xf3dd, 0xf04d, 0xf2f2, 0xf024, 0xf252` * Click on Convert, and download the file `jetbrains_mono_bold_20.c` and copy it in `src/DisplayApp/Fonts` +* Add the font .c file path to src/CMakeLists.txt +* Add an LV_FONT_DECLARE line in src/libs/lv_conf.h Add new symbols: @@ -28,6 +31,21 @@ Add new symbols: static constexpr const char* newSymbol = "\xEF\x86\x85"; ``` +## Simple method to generate a font + +If you want to generate a basic font containing only numbers and letters, you can use the above settings but instead of specifying a range, simply list the characters you need in the Symbols field and leave the range blank. This is the approach used for the PineTimeStyle watchface. +This works well for fonts which will only be used to display numbers, but will fail if you try to add a colon or other punctuation. + +* Open the [LVGL font converter](https://lvgl.io/tools/fontconverter) +* Name : open_sans_light +* Size : 150 +* Bpp : 1 bit-per-pixel +* Do not enable font compression and horizontal subpixel hinting +* Load the file `open_sans_light.tff` (use the file in this repo to ensure the version matches) and specify the following symbols : `0123456789` +* Click on Convert, and download the file `open_sans_light.c` and copy it in `src/DisplayApp/Fonts` +* Add the font .c file path to src/CMakeLists.txt (search for jetbrains to find the appropriate location/format) +* Add an LV_FONT_DECLARE line in src/libs/lv_conf.h (as above) + #### Navigation font To create the navigtion.ttf I use the web app [icomoon](https://icomoon.io/app) diff --git a/src/displayapp/fonts/open_sans_light.c b/src/displayapp/fonts/open_sans_light.c new file mode 100644 index 00000000..15f0ddf6 --- /dev/null +++ b/src/displayapp/fonts/open_sans_light.c @@ -0,0 +1,1261 @@ +/******************************************************************************* + * Size: 150 px + * Bpp: 1 + * Opts: + ******************************************************************************/ + +#ifdef LV_LVGL_H_INCLUDE_SIMPLE +#include "lvgl.h" +#else +#include "lvgl/lvgl.h" +#endif + +#ifndef OPEN_SANS_LIGHT +#define OPEN_SANS_LIGHT 1 +#endif + +#if OPEN_SANS_LIGHT + +/*----------------- + * BITMAPS + *----------------*/ + +/*Store the image of the glyphs*/ +static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = { + /* U+0030 "0" */ + 0x0, 0x0, 0x0, 0xf, 0xff, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x7, 0xff, 0xff, 0xc0, 0x0, + 0x0, 0x0, 0x0, 0x1, 0xff, 0xff, 0xff, 0x80, + 0x0, 0x0, 0x0, 0x0, 0x3f, 0xff, 0xff, 0xff, + 0x0, 0x0, 0x0, 0x0, 0x7, 0xff, 0xff,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, 0x0, 0x0, 0x0, 0x3, 0xff, + 0xc0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xff, + 0xf8, 0x0, 0x0, 0x1, 0x80, 0x0, 0x0, 0xff, + 0xff, 0x0, 0x0, 0x0, 0x1f, 0xe0, 0x0, 0xff, + 0xff, 0xc0, 0x0, 0x0, 0x1, 0xff, 0xff, 0xff, + 0xff, 0xf0, 0x0, 0x0, 0x0, 0x1f, 0xff, 0xff, + 0xff, 0xfc, 0x0, 0x0, 0x0, 0x1, 0xff, 0xff, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x1f, 0xff, + 0xff, 0xff, 0xc0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0xff, 0xff, 0xc0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x7f, 0xff, 0x80, 0x0, 0x0, 0x0, 0x0 +}; + + +/*--------------------- + * GLYPH DESCRIPTION + *--------------------*/ + +static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { + {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */, + {.bitmap_index = 0, .adv_w = 1370, .box_w = 69, .box_h = 110, .ofs_x = 8, .ofs_y = -1}, + {.bitmap_index = 949, .adv_w = 1370, .box_w = 35, .box_h = 107, .ofs_x = 15, .ofs_y = 0}, + {.bitmap_index = 1418, .adv_w = 1370, .box_w = 67, .box_h = 108, .ofs_x = 8, .ofs_y = 0}, + {.bitmap_index = 2323, .adv_w = 1370, .box_w = 68, .box_h = 110, .ofs_x = 7, .ofs_y = -1}, + {.bitmap_index = 3258, .adv_w = 1370, .box_w = 81, .box_h = 108, .ofs_x = 3, .ofs_y = -1}, + {.bitmap_index = 4352, .adv_w = 1370, .box_w = 66, .box_h = 108, .ofs_x = 10, .ofs_y = -1}, + {.bitmap_index = 5243, .adv_w = 1370, .box_w = 69, .box_h = 110, .ofs_x = 9, .ofs_y = -1}, + {.bitmap_index = 6192, .adv_w = 1370, .box_w = 69, .box_h = 106, .ofs_x = 8, .ofs_y = 0}, + {.bitmap_index = 7107, .adv_w = 1370, .box_w = 68, .box_h = 110, .ofs_x = 9, .ofs_y = -1}, + {.bitmap_index = 8042, .adv_w = 1370, .box_w = 68, .box_h = 110, .ofs_x = 8, .ofs_y = -1} +}; + +/*--------------------- + * CHARACTER MAPPING + *--------------------*/ + + + +/*Collect the unicode lists and glyph_id offsets*/ +static const lv_font_fmt_txt_cmap_t cmaps[] = +{ + { + .range_start = 48, .range_length = 10, .glyph_id_start = 1, + .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY + } +}; + + + +/*-------------------- + * ALL CUSTOM DATA + *--------------------*/ + +#if LV_VERSION_CHECK(8, 0, 0) +/*Store all the custom data of the font*/ +static lv_font_fmt_txt_glyph_cache_t cache; +static const lv_font_fmt_txt_dsc_t font_dsc = { +#else +static lv_font_fmt_txt_dsc_t font_dsc = { +#endif + .glyph_bitmap = glyph_bitmap, + .glyph_dsc = glyph_dsc, + .cmaps = cmaps, + .kern_dsc = NULL, + .kern_scale = 0, + .cmap_num = 1, + .bpp = 1, + .kern_classes = 0, + .bitmap_format = 0, +#if LV_VERSION_CHECK(8, 0, 0) + .cache = &cache +#endif +}; + + +/*----------------- + * PUBLIC FONT + *----------------*/ + +/*Initialize a public general font descriptor*/ +#if LV_VERSION_CHECK(8, 0, 0) +const lv_font_t open_sans_light = { +#else +lv_font_t open_sans_light = { +#endif + .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/ + .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ + .line_height = 110, /*The maximum line height required by the font*/ + .base_line = 1, /*Baseline measured from the bottom of the line*/ +#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0) + .subpx = LV_FONT_SUBPX_NONE, +#endif +#if LV_VERSION_CHECK(7, 4, 0) + .underline_position = -11, + .underline_thickness = 7, +#endif + .dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ +}; + + + +#endif /*#if OPEN_SANS_LIGHT*/ + diff --git a/src/displayapp/fonts/open_sans_light.ttf b/src/displayapp/fonts/open_sans_light.ttf new file mode 100644 index 00000000..6580d3a1 Binary files /dev/null and b/src/displayapp/fonts/open_sans_light.ttf differ diff --git a/src/displayapp/screens/Clock.cpp b/src/displayapp/screens/Clock.cpp index 05e47a39..e0684976 100644 --- a/src/displayapp/screens/Clock.cpp +++ b/src/displayapp/screens/Clock.cpp @@ -14,6 +14,7 @@ #include "../DisplayApp.h" #include "WatchFaceDigital.h" #include "WatchFaceAnalog.h" +#include "PineTimeStyle.h" using namespace Pinetime::Applications::Screens; @@ -41,6 +42,9 @@ Clock::Clock(DisplayApp* app, case 1: return WatchFaceAnalogScreen(); break; + case 2: + return PineTimeStyleScreen(); + break; } return WatchFaceDigitalScreen(); }()} { @@ -76,6 +80,16 @@ std::unique_ptr Clock::WatchFaceAnalogScreen() { app, dateTimeController, batteryController, bleController, notificatioManager, settingsController); } +std::unique_ptr Clock::PineTimeStyleScreen() { + return std::make_unique(app, + dateTimeController, + batteryController, + bleController, + notificatioManager, + settingsController, + motionController); +} + /* // Examples for more watch faces std::unique_ptr Clock::WatchFaceMinimalScreen() { diff --git a/src/displayapp/screens/Clock.h b/src/displayapp/screens/Clock.h index 174c73b7..a48feea1 100644 --- a/src/displayapp/screens/Clock.h +++ b/src/displayapp/screens/Clock.h @@ -50,6 +50,7 @@ namespace Pinetime { std::unique_ptr screen; std::unique_ptr WatchFaceDigitalScreen(); std::unique_ptr WatchFaceAnalogScreen(); + std::unique_ptr PineTimeStyleScreen(); // Examples for more watch faces // std::unique_ptr WatchFaceMinimalScreen(); diff --git a/src/displayapp/screens/PineTimeStyle.cpp b/src/displayapp/screens/PineTimeStyle.cpp new file mode 100644 index 00000000..678099c0 --- /dev/null +++ b/src/displayapp/screens/PineTimeStyle.cpp @@ -0,0 +1,340 @@ +/* + * This file is part of the Infinitime distribution (https://github.com/JF002/Infinitime). + * Copyright (c) 2021 Kieran Cawthray. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 3. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * PineTimeStyle watchface for Infinitime created by Kieran Cawthray + * Based on WatchFaceDigital + * Style/layout copied from TimeStyle for Pebble by Dan Tilden (github.com/tilden) + */ + +#include "PineTimeStyle.h" +#include +#include +#include +#include "BatteryIcon.h" +#include "BleIcon.h" +#include "NotificationIcon.h" +#include "Symbols.h" +#include "components/battery/BatteryController.h" +#include "components/ble/BleController.h" +#include "components/ble/NotificationManager.h" +#include "components/motion/MotionController.h" +#include "components/settings/Settings.h" +#include "../DisplayApp.h" + +using namespace Pinetime::Applications::Screens; + +PineTimeStyle::PineTimeStyle(DisplayApp* app, + Controllers::DateTime& dateTimeController, + Controllers::Battery& batteryController, + Controllers::Ble& bleController, + Controllers::NotificationManager& notificatioManager, + Controllers::Settings& settingsController, + Controllers::MotionController& motionController) + : Screen(app), + currentDateTime {{}}, + dateTimeController {dateTimeController}, + batteryController {batteryController}, + bleController {bleController}, + notificatioManager {notificatioManager}, + settingsController {settingsController}, + motionController {motionController} { + + /* This sets the watchface number to return to after leaving the menu */ + settingsController.SetClockFace(2); + + displayedChar[0] = 0; + displayedChar[1] = 0; + displayedChar[2] = 0; + displayedChar[3] = 0; + displayedChar[4] = 0; + + /* Create a 200px wide background rectangle */ + + timebar = lv_obj_create(lv_scr_act(), nullptr); + lv_obj_set_style_local_bg_color(timebar, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x000000)); + lv_obj_set_style_local_radius(timebar, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, 0); + lv_obj_set_size(timebar, 200, 240); + lv_obj_align(timebar, lv_scr_act(), LV_ALIGN_IN_TOP_LEFT, 5, 0); + + /* Display the time */ + + timeDD1 = lv_label_create(lv_scr_act(), nullptr); + lv_obj_set_style_local_text_font(timeDD1, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &open_sans_light); + lv_obj_set_style_local_text_color(timeDD1, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x008080)); + lv_label_set_text(timeDD1, "12"); + lv_obj_align(timeDD1, timebar, LV_ALIGN_IN_TOP_MID, 5, 5); + + timeDD2 = lv_label_create(lv_scr_act(), nullptr); + lv_obj_set_style_local_text_font(timeDD2, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &open_sans_light); + lv_obj_set_style_local_text_color(timeDD2, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x008080)); + lv_label_set_text(timeDD2, "34"); + lv_obj_align(timeDD2, timebar, LV_ALIGN_IN_BOTTOM_MID, 5, -5); + + timeAMPM = lv_label_create(lv_scr_act(), nullptr); + lv_obj_set_style_local_text_color(timeAMPM, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x008080)); + lv_obj_set_style_local_text_line_space(timeAMPM, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, -3); + lv_label_set_text(timeAMPM, ""); + lv_obj_align(timeAMPM, timebar, LV_ALIGN_IN_BOTTOM_LEFT, 2, -20); + + /* Create a 40px wide bar down the right side of the screen */ + + sidebar = lv_obj_create(lv_scr_act(), nullptr); + lv_obj_set_style_local_bg_color(sidebar, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x008080)); + lv_obj_set_style_local_radius(sidebar, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, 0); + lv_obj_set_size(sidebar, 40, 240); + lv_obj_align(sidebar, lv_scr_act(), LV_ALIGN_IN_TOP_RIGHT, 0, 0); + + /* Display icons */ + + batteryIcon = lv_label_create(lv_scr_act(), nullptr); + lv_obj_set_style_local_text_color(batteryIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x000000)); + lv_label_set_text(batteryIcon, Symbols::batteryFull); + lv_obj_align(batteryIcon, sidebar, LV_ALIGN_IN_TOP_MID, 0, 2); + + batteryPlug = lv_label_create(lv_scr_act(), nullptr); + lv_obj_set_style_local_text_color(batteryPlug, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x000000)); + lv_obj_align(batteryPlug, sidebar, LV_ALIGN_IN_TOP_MID, 0, 2); + + bleIcon = lv_label_create(lv_scr_act(), nullptr); + lv_obj_set_style_local_text_color(bleIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x000000)); + lv_obj_align(bleIcon, sidebar, LV_ALIGN_IN_TOP_MID, 0, 25); + + notificationIcon = lv_label_create(lv_scr_act(), nullptr); + lv_obj_set_style_local_text_color(notificationIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x000000)); + lv_obj_align(notificationIcon, sidebar, LV_ALIGN_IN_TOP_MID, 0, 40); + + /* Calendar icon */ + + calendarOuter = lv_obj_create(lv_scr_act(), nullptr); + lv_obj_set_style_local_bg_color(calendarOuter, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x000000)); + lv_obj_set_style_local_radius(calendarOuter, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, 0); + lv_obj_set_size(calendarOuter, 34, 34); + lv_obj_align(calendarOuter, sidebar, LV_ALIGN_CENTER, 0, 0); + + calendarInner = lv_obj_create(lv_scr_act(), nullptr); + lv_obj_set_style_local_bg_color(calendarInner, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0xffffff)); + lv_obj_set_style_local_radius(calendarInner, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, 0); + lv_obj_set_size(calendarInner, 27, 27); + lv_obj_align(calendarInner, calendarOuter, LV_ALIGN_CENTER, 0, 0); + + calendarBar1 = lv_obj_create(lv_scr_act(), nullptr); + lv_obj_set_style_local_bg_color(calendarBar1, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x000000)); + lv_obj_set_style_local_radius(calendarBar1, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, 0); + lv_obj_set_size(calendarBar1, 3, 12); + lv_obj_align(calendarBar1, calendarOuter, LV_ALIGN_IN_TOP_MID, -6, -3); + + calendarBar2 = lv_obj_create(lv_scr_act(), nullptr); + lv_obj_set_style_local_bg_color(calendarBar2, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x000000)); + lv_obj_set_style_local_radius(calendarBar2, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, 0); + lv_obj_set_size(calendarBar2, 3, 12); + lv_obj_align(calendarBar2, calendarOuter, LV_ALIGN_IN_TOP_MID, 6, -3); + + calendarCrossBar1 = lv_obj_create(lv_scr_act(), nullptr); + lv_obj_set_style_local_bg_color(calendarCrossBar1, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x000000)); + lv_obj_set_style_local_radius(calendarCrossBar1, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, 0); + lv_obj_set_size(calendarCrossBar1, 8, 3); + lv_obj_align(calendarCrossBar1, calendarBar1, LV_ALIGN_IN_BOTTOM_MID, 0, 0); + + calendarCrossBar2 = lv_obj_create(lv_scr_act(), nullptr); + lv_obj_set_style_local_bg_color(calendarCrossBar2, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x000000)); + lv_obj_set_style_local_radius(calendarCrossBar2, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, 0); + lv_obj_set_size(calendarCrossBar2, 8, 3); + lv_obj_align(calendarCrossBar2, calendarBar2, LV_ALIGN_IN_BOTTOM_MID, 0, 0); + + /* Display date */ + + dateDayOfWeek = lv_label_create(lv_scr_act(), nullptr); + lv_obj_set_style_local_text_color(dateDayOfWeek, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x000000)); + lv_label_set_text(dateDayOfWeek, "THU"); + lv_obj_align(dateDayOfWeek, sidebar, LV_ALIGN_CENTER, 0, -34); + + dateDay = lv_label_create(lv_scr_act(), nullptr); + lv_obj_set_style_local_text_color(dateDay, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x000000)); + lv_label_set_text(dateDay, "25"); + lv_obj_align(dateDay, sidebar, LV_ALIGN_CENTER, 0, 3); + + dateMonth = lv_label_create(lv_scr_act(), nullptr); + lv_obj_set_style_local_text_color(dateMonth, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x000000)); + lv_label_set_text(dateMonth, "MAR"); + lv_obj_align(dateMonth, sidebar, LV_ALIGN_CENTER, 0, 32); + + // Step count gauge + needle_colors[0] = LV_COLOR_WHITE; + stepGauge = lv_gauge_create(lv_scr_act(), nullptr); + lv_gauge_set_needle_count(stepGauge, 1, needle_colors); + lv_obj_set_size(stepGauge, 40, 40); + lv_obj_align(stepGauge, sidebar, LV_ALIGN_IN_BOTTOM_MID, 0, 0); + lv_gauge_set_scale(stepGauge, 360, 11, 0); + lv_gauge_set_angle_offset(stepGauge, 180); + lv_gauge_set_critical_value(stepGauge, (settingsController.GetStepsGoal() / 100)); + lv_gauge_set_range(stepGauge, 0, (settingsController.GetStepsGoal() / 100)); + lv_gauge_set_value(stepGauge, 0, 0); + + lv_obj_set_style_local_pad_right(stepGauge, LV_GAUGE_PART_MAIN, LV_STATE_DEFAULT, 3); + lv_obj_set_style_local_pad_left(stepGauge, LV_GAUGE_PART_MAIN, LV_STATE_DEFAULT, 3); + lv_obj_set_style_local_pad_bottom(stepGauge, LV_GAUGE_PART_MAIN, LV_STATE_DEFAULT, 3); + lv_obj_set_style_local_line_opa(stepGauge, LV_GAUGE_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_COVER); + lv_obj_set_style_local_scale_width(stepGauge, LV_GAUGE_PART_MAIN, LV_STATE_DEFAULT, 4); + lv_obj_set_style_local_line_width(stepGauge, LV_GAUGE_PART_MAIN, LV_STATE_DEFAULT, 4); + lv_obj_set_style_local_line_color(stepGauge, LV_GAUGE_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_BLACK); + lv_obj_set_style_local_line_opa(stepGauge, LV_GAUGE_PART_NEEDLE, LV_STATE_DEFAULT, LV_OPA_COVER); + lv_obj_set_style_local_line_width(stepGauge, LV_GAUGE_PART_NEEDLE, LV_STATE_DEFAULT, 4); + lv_obj_set_style_local_pad_inner(stepGauge, LV_GAUGE_PART_NEEDLE, LV_STATE_DEFAULT, 4); + + backgroundLabel = lv_label_create(lv_scr_act(), nullptr); + lv_obj_set_click(backgroundLabel, true); + lv_label_set_long_mode(backgroundLabel, LV_LABEL_LONG_CROP); + lv_obj_set_size(backgroundLabel, 240, 240); + lv_obj_set_pos(backgroundLabel, 0, 0); + lv_label_set_text(backgroundLabel, ""); +} + +PineTimeStyle::~PineTimeStyle() { + lv_obj_clean(lv_scr_act()); +} + +bool PineTimeStyle::Refresh() { + batteryPercentRemaining = batteryController.PercentRemaining(); + if (batteryPercentRemaining.IsUpdated()) { + auto batteryPercent = batteryPercentRemaining.Get(); + if (batteryController.IsCharging()) { + auto isCharging = batteryController.IsCharging() || batteryController.IsPowerPresent(); + lv_label_set_text(batteryPlug, BatteryIcon::GetPlugIcon(isCharging)); + lv_obj_realign(batteryPlug); + lv_label_set_text(batteryIcon, ""); + } else { + lv_label_set_text(batteryIcon, BatteryIcon::GetBatteryIcon(batteryPercent)); + lv_label_set_text(batteryPlug, ""); + } + } + + bleState = bleController.IsConnected(); + if (bleState.IsUpdated()) { + if (bleState.Get() == true) { + lv_label_set_text(bleIcon, BleIcon::GetIcon(true)); + lv_obj_realign(bleIcon); + } else { + lv_label_set_text(bleIcon, BleIcon::GetIcon(false)); + } + } + + notificationState = notificatioManager.AreNewNotificationsAvailable(); + if (notificationState.IsUpdated()) { + if (notificationState.Get() == true) { + lv_label_set_text(notificationIcon, NotificationIcon::GetIcon(true)); + lv_obj_realign(notificationIcon); + } else { + lv_label_set_text(notificationIcon, NotificationIcon::GetIcon(false)); + } + } + + currentDateTime = dateTimeController.CurrentDateTime(); + + if (currentDateTime.IsUpdated()) { + auto newDateTime = currentDateTime.Get(); + + auto dp = date::floor(newDateTime); + auto time = date::make_time(newDateTime - dp); + auto yearMonthDay = date::year_month_day(dp); + + auto year = (int) yearMonthDay.year(); + auto month = static_cast((unsigned) yearMonthDay.month()); + auto day = (unsigned) yearMonthDay.day(); + auto dayOfWeek = static_cast(date::weekday(yearMonthDay).iso_encoding()); + + int hour = time.hours().count(); + auto minute = time.minutes().count(); + + char minutesChar[3]; + sprintf(minutesChar, "%02d", static_cast(minute)); + + char hoursChar[3]; + char ampmChar[5]; + + if (settingsController.GetClockType() == Controllers::Settings::ClockType::H24) { + sprintf(hoursChar, "%02d", hour); + } else { + if (hour == 0 && hour != 12) { + hour = 12; + sprintf(ampmChar, "A\nM"); + } else if (hour == 12 && hour != 0) { + hour = 12; + sprintf(ampmChar, "P\nM"); + } else if (hour < 12 && hour != 0) { + sprintf(ampmChar, "A\nM"); + } else if (hour > 12 && hour != 0) { + hour = hour - 12; + sprintf(ampmChar, "P\nM"); + } + sprintf(hoursChar, "%02d", hour); + } + + if (hoursChar[0] != displayedChar[0] || hoursChar[1] != displayedChar[1] || minutesChar[0] != displayedChar[2] || + minutesChar[1] != displayedChar[3]) { + displayedChar[0] = hoursChar[0]; + displayedChar[1] = hoursChar[1]; + displayedChar[2] = minutesChar[0]; + displayedChar[3] = minutesChar[1]; + + char hourStr[3]; + char minStr[3]; + + if (settingsController.GetClockType() == Controllers::Settings::ClockType::H12) { + lv_label_set_text(timeAMPM, ampmChar); + } + + /* Display the time as 2 pairs of digits */ + sprintf(hourStr, "%c%c", hoursChar[0], hoursChar[1]); + lv_label_set_text(timeDD1, hourStr); + + sprintf(minStr, "%c%c", minutesChar[0], minutesChar[1]); + lv_label_set_text(timeDD2, minStr); + } + + if ((year != currentYear) || (month != currentMonth) || (dayOfWeek != currentDayOfWeek) || (day != currentDay)) { + char dayOfWeekStr[4]; + char dayStr[3]; + char monthStr[4]; + + sprintf(dayOfWeekStr, "%s", dateTimeController.DayOfWeekShortToString()); + sprintf(dayStr, "%d", day); + sprintf(monthStr, "%s", dateTimeController.MonthShortToString()); + + lv_label_set_text(dateDayOfWeek, dayOfWeekStr); + lv_label_set_text(dateDay, dayStr); + lv_obj_realign(dateDay); + lv_label_set_text(dateMonth, monthStr); + + currentYear = year; + currentMonth = month; + currentDayOfWeek = dayOfWeek; + currentDay = day; + } + } + + stepCount = motionController.NbSteps(); + motionSensorOk = motionController.IsSensorOk(); + if (stepCount.IsUpdated() || motionSensorOk.IsUpdated()) { + lv_gauge_set_value(stepGauge, 0, (stepCount.Get() / 100)); + lv_obj_realign(stepGauge); + if (stepCount.Get() > settingsController.GetStepsGoal()) { + lv_obj_set_style_local_line_color(stepGauge, LV_GAUGE_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_WHITE); + lv_obj_set_style_local_scale_grad_color(stepGauge, LV_GAUGE_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_WHITE); + } + } + + return running; +} \ No newline at end of file diff --git a/src/displayapp/screens/PineTimeStyle.h b/src/displayapp/screens/PineTimeStyle.h new file mode 100644 index 00000000..70794cc5 --- /dev/null +++ b/src/displayapp/screens/PineTimeStyle.h @@ -0,0 +1,86 @@ +#pragma once + +#include +#include +#include +#include +#include "Screen.h" +#include "ScreenList.h" +#include "components/datetime/DateTimeController.h" + +namespace Pinetime { + namespace Controllers { + class Settings; + class Battery; + class Ble; + class NotificationManager; + class HeartRateController; + } + + namespace Applications { + namespace Screens { + class PineTimeStyle : public Screen { + public: + PineTimeStyle(DisplayApp* app, + Controllers::DateTime& dateTimeController, + Controllers::Battery& batteryController, + Controllers::Ble& bleController, + Controllers::NotificationManager& notificatioManager, + Controllers::Settings& settingsController, + Controllers::MotionController& motionController); + ~PineTimeStyle() override; + + bool Refresh() override; + + void OnObjectEvent(lv_obj_t* pObj, lv_event_t i); + + private: + char displayedChar[5]; + + uint16_t currentYear = 1970; + Pinetime::Controllers::DateTime::Months currentMonth = Pinetime::Controllers::DateTime::Months::Unknown; + Pinetime::Controllers::DateTime::Days currentDayOfWeek = Pinetime::Controllers::DateTime::Days::Unknown; + uint8_t currentDay = 0; + + DirtyValue batteryPercentRemaining {}; + DirtyValue bleState {}; + DirtyValue> currentDateTime {}; + DirtyValue motionSensorOk {}; + DirtyValue stepCount {}; + DirtyValue notificationState {}; + + lv_obj_t* timebar; + lv_obj_t* sidebar; + lv_obj_t* timeDD1; + lv_obj_t* timeDD2; + lv_obj_t* timeAMPM; + lv_obj_t* dateDayOfWeek; + lv_obj_t* dateDay; + lv_obj_t* dateMonth; + lv_obj_t* backgroundLabel; + lv_obj_t* batteryIcon; + lv_obj_t* bleIcon; + lv_obj_t* batteryPlug; + lv_obj_t* calendarOuter; + lv_obj_t* calendarInner; + lv_obj_t* calendarBar1; + lv_obj_t* calendarBar2; + lv_obj_t* calendarCrossBar1; + lv_obj_t* calendarCrossBar2; + lv_obj_t* heartbeatIcon; + lv_obj_t* heartbeatValue; + lv_obj_t* heartbeatBpm; + lv_obj_t* notificationIcon; + lv_obj_t* stepGauge; + lv_color_t needle_colors[1]; + + Controllers::DateTime& dateTimeController; + Controllers::Battery& batteryController; + Controllers::Ble& bleController; + Controllers::NotificationManager& notificatioManager; + Controllers::Settings& settingsController; + Controllers::MotionController& motionController; + }; + } + } +} diff --git a/src/displayapp/screens/settings/SettingWatchFace.cpp b/src/displayapp/screens/settings/SettingWatchFace.cpp index 457cebf6..3e73489d 100644 --- a/src/displayapp/screens/settings/SettingWatchFace.cpp +++ b/src/displayapp/screens/settings/SettingWatchFace.cpp @@ -58,6 +58,15 @@ SettingWatchFace::SettingWatchFace(Pinetime::Applications::DisplayApp* app, Pine lv_checkbox_set_checked(cbOption[optionsTotal], true); } + optionsTotal++; + cbOption[optionsTotal] = lv_checkbox_create(container1, nullptr); + lv_checkbox_set_text_static(cbOption[optionsTotal], " PineTimeStyle"); + cbOption[optionsTotal]->user_data = this; + lv_obj_set_event_cb(cbOption[optionsTotal], event_handler); + if (settingsController.GetClockFace() == 2) { + lv_checkbox_set_checked(cbOption[optionsTotal], true); + } + optionsTotal++; } diff --git a/src/libs/lv_conf.h b/src/libs/lv_conf.h index 761baba2..a03a4833 100644 --- a/src/libs/lv_conf.h +++ b/src/libs/lv_conf.h @@ -417,6 +417,7 @@ typedef void* lv_indev_drv_user_data_t; /*Type of user data in the in LV_FONT_DECLARE(jetbrains_mono_extrabold_compressed) \ LV_FONT_DECLARE(jetbrains_mono_42) \ LV_FONT_DECLARE(jetbrains_mono_76) \ + LV_FONT_DECLARE(open_sans_light) \ LV_FONT_DECLARE(lv_font_sys_48) /* Enable it if you have fonts with a lot of characters. -- cgit v1.2.3-70-g09d2 From 2f479e5fc7688ae47e99c0f4aead87c9cdc29123 Mon Sep 17 00:00:00 2001 From: Avamander Date: Fri, 25 Jun 2021 01:07:40 +0300 Subject: Fixed a bunch of format specifiers --- src/displayapp/screens/Steps.cpp | 6 +++--- src/displayapp/screens/SystemInfo.cpp | 4 ++-- src/displayapp/screens/Timer.cpp | 6 +++--- src/displayapp/screens/settings/SettingSteps.cpp | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/displayapp/screens/Steps.cpp b/src/displayapp/screens/Steps.cpp index b485c975..cc78813f 100644 --- a/src/displayapp/screens/Steps.cpp +++ b/src/displayapp/screens/Steps.cpp @@ -30,8 +30,8 @@ Steps::Steps( lSteps = lv_label_create(lv_scr_act(), nullptr); lv_obj_set_style_local_text_color(lSteps, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x00FF00)); - lv_obj_set_style_local_text_font(lSteps, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42); - lv_label_set_text_fmt(lSteps, "%li", stepsCount); + lv_obj_set_style_local_text_font(lSteps, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42); + lv_label_set_text_fmt(lSteps, "%li", stepsCount); lv_obj_align(lSteps, nullptr, LV_ALIGN_CENTER, 0, -20); lv_obj_t * lstepsL = lv_label_create(lv_scr_act(), nullptr); @@ -41,7 +41,7 @@ Steps::Steps( lv_obj_t * lstepsGoal = lv_label_create(lv_scr_act(), nullptr); lv_obj_set_style_local_text_color(lstepsGoal, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_CYAN); - lv_label_set_text_fmt(lstepsGoal,"Goal\n%i", settingsController.GetStepsGoal()); + lv_label_set_text_fmt(lstepsGoal, "Goal\n%lu", settingsController.GetStepsGoal()); lv_label_set_align(lstepsGoal, LV_LABEL_ALIGN_CENTER); lv_obj_align(lstepsGoal, lSteps, LV_ALIGN_OUT_BOTTOM_MID, 0, 60); diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp index 60e53ad6..f70b67fd 100644 --- a/src/displayapp/screens/SystemInfo.cpp +++ b/src/displayapp/screens/SystemInfo.cpp @@ -192,11 +192,11 @@ std::unique_ptr SystemInfo::CreateScreen3() { "\n" "#444444 LVGL Memory#\n" " #444444 used# %d (%d%%)\n" - " #444444 max used# %d\n" + " #444444 max used# %lu\n" " #444444 frag# %d%%\n" " #444444 free# %d" "\n" - "#444444 Steps# %li", + "#444444 Steps# %i", bleAddr[5], bleAddr[4], bleAddr[3], diff --git a/src/displayapp/screens/Timer.cpp b/src/displayapp/screens/Timer.cpp index 260a17ef..99e979ba 100644 --- a/src/displayapp/screens/Timer.cpp +++ b/src/displayapp/screens/Timer.cpp @@ -63,8 +63,8 @@ Timer::Timer(DisplayApp* app, Controllers::TimerController& timerController) lv_obj_set_style_local_text_color(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GRAY); uint32_t seconds = timerController.GetTimeRemaining() / 1000; - lv_label_set_text_fmt(time, "%02d:%02d", seconds / 60, seconds % 60); - + lv_label_set_text_fmt(time, "%02lu:%02lu", seconds / 60, seconds % 60); + lv_obj_align(time, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, -20); btnPlayPause = lv_btn_create(lv_scr_act(), nullptr); @@ -90,7 +90,7 @@ Timer::~Timer() { bool Timer::Refresh() { if (timerController.IsRunning()) { uint32_t seconds = timerController.GetTimeRemaining() / 1000; - lv_label_set_text_fmt(time, "%02d:%02d", seconds / 60, seconds % 60); + lv_label_set_text_fmt(time, "%02lu:%02lu", seconds / 60, seconds % 60); } return running; } diff --git a/src/displayapp/screens/settings/SettingSteps.cpp b/src/displayapp/screens/settings/SettingSteps.cpp index b7c024f1..faa843e6 100644 --- a/src/displayapp/screens/settings/SettingSteps.cpp +++ b/src/displayapp/screens/settings/SettingSteps.cpp @@ -45,7 +45,7 @@ SettingSteps::SettingSteps( stepValue = lv_label_create(lv_scr_act(), NULL); lv_obj_set_style_local_text_font(stepValue, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42); - lv_label_set_text_fmt(stepValue,"%i", settingsController.GetStepsGoal()); + lv_label_set_text_fmt(stepValue, "%lu", settingsController.GetStepsGoal()); lv_label_set_align(stepValue, LV_LABEL_ALIGN_CENTER); lv_obj_align(stepValue, lv_scr_act(), LV_ALIGN_CENTER, 0, -10); @@ -81,7 +81,7 @@ void SettingSteps::UpdateSelected(lv_obj_t *object, lv_event_t event) { value += 1000; if ( value <= 500000 ) { settingsController.SetStepsGoal(value); - lv_label_set_text_fmt(stepValue,"%i", settingsController.GetStepsGoal()); + lv_label_set_text_fmt(stepValue, "%lu", settingsController.GetStepsGoal()); lv_obj_align(stepValue, lv_scr_act(), LV_ALIGN_CENTER, 0, -10); } } @@ -90,7 +90,7 @@ void SettingSteps::UpdateSelected(lv_obj_t *object, lv_event_t event) { value -= 1000; if ( value >= 1000 ) { settingsController.SetStepsGoal(value); - lv_label_set_text_fmt(stepValue,"%i", settingsController.GetStepsGoal()); + lv_label_set_text_fmt(stepValue, "%lu", settingsController.GetStepsGoal()); lv_obj_align(stepValue, lv_scr_act(), LV_ALIGN_CENTER, 0, -10); } } -- cgit v1.2.3-70-g09d2 From bdb5965f1a3432a4f24b5fc566973bf4ab811b08 Mon Sep 17 00:00:00 2001 From: Avamander Date: Fri, 25 Jun 2021 00:40:55 +0300 Subject: static_cast cleanup --- src/components/battery/BatteryController.cpp | 2 +- src/displayapp/screens/SystemInfo.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/battery/BatteryController.cpp b/src/components/battery/BatteryController.cpp index bc146457..b153b980 100644 --- a/src/components/battery/BatteryController.cpp +++ b/src/components/battery/BatteryController.cpp @@ -14,7 +14,7 @@ Battery::Battery() { } void Battery::Init() { - nrf_gpio_cfg_input(chargingPin, (nrf_gpio_pin_pull_t) GPIO_PIN_CNF_PULL_Pullup); + nrf_gpio_cfg_input(chargingPin, static_cast GPIO_PIN_CNF_PULL_Pullup); } void Battery::Update() { diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp index f70b67fd..1e90bf40 100644 --- a/src/displayapp/screens/SystemInfo.cpp +++ b/src/displayapp/screens/SystemInfo.cpp @@ -203,11 +203,11 @@ std::unique_ptr SystemInfo::CreateScreen3() { bleAddr[2], bleAddr[1], bleAddr[0], - (int) mon.total_size - mon.free_size, + static_cast(mon.total_size - mon.free_size), mon.used_pct, mon.max_used, mon.frag_pct, - (int) mon.free_biggest_size, + static_cast(mon.free_biggest_size), 0); lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0); return std::make_unique(2, 5, app, label); -- cgit v1.2.3-70-g09d2 From 69894853acdbae83f3a04da976af0a5794046742 Mon Sep 17 00:00:00 2001 From: Avamander Date: Fri, 25 Jun 2021 00:39:15 +0300 Subject: Improved CLion configuration --- .idea/codeStyles/Project.xml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 7bdfbcb1..9c99b664 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -12,6 +12,29 @@