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/drivers/Bma421.cpp | 2 -- src/drivers/SpiMaster.h | 1 - 2 files changed, 3 deletions(-) (limited to 'src/drivers') 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 }; -- cgit v1.2.3 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(-) (limited to 'src/drivers') 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 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(-) (limited to 'src/drivers') 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 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(+) (limited to 'src/drivers') 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 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(-) (limited to 'src/drivers') 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, 0xcc, 0x08, 0x0d, 0x2f, 0xf4, 0x30, 0x94, 0x08, + 0xb9, 0x88, 0x02, 0xa3, 0x04, 0x2f, 0x67, 0x58, 0x4c, 0x0a, 0x87, 0xa2, + 0x05, 0x2c, 0xcb, 0x22, 0x4f, 0x54, 0x4a, 0x0a, 0xf2, 0x3b, 0xca, 0x08, + 0x3c, 0x80, 0x27, 0x2e, 0x59, 0xf0, 0x01, 0x40, 0x01, 0x42, 0xb8, 0x2e, + 0x01, 0x2e, 0xb1, 0xf0, 0x67, 0x52, 0x01, 0x0a, 0x21, 0x2e, 0xb1, 0xf0, + 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, 0xc0, 0x2e, 0x21, 0x2e, 0xbc, 0xf0, 0xc0, 0x2e, 0x21, 0x2e, + 0xba, 0xf0, 0x70, 0x50, 0xf7, 0x7f, 0x00, 0x2e, 0x0f, 0x2e, 0xb8, 0xf0, + 0xf8, 0xbf, 0xff, 0xbb, 0xc0, 0xb3, 0x23, 0x2f, 0xb2, 0x7f, 0x94, 0x7f, + 0xc6, 0x7f, 0xe5, 0x7f, 0xd3, 0x7f, 0xa1, 0x7f, 0x35, 0x30, 0x05, 0x2e, + 0x01, 0xf0, 0x2e, 0xbd, 0x2e, 0xbb, 0x6b, 0x58, 0x6e, 0x05, 0x47, 0x56, + 0x6d, 0x54, 0x11, 0x30, 0x27, 0x41, 0x06, 0x41, 0xf8, 0xbf, 0xbe, 0x0b, + 0xb5, 0x11, 0xd6, 0x42, 0x03, 0x89, 0x5a, 0x0e, 0xf6, 0x2f, 0x23, 0x2e, + 0x58, 0x00, 0x4f, 0x52, 0x23, 0x2e, 0xb8, 0xf0, 0xb2, 0x6f, 0xe5, 0x6f, + 0xd3, 0x6f, 0xa1, 0x6f, 0x94, 0x6f, 0xc6, 0x6f, 0xf7, 0x6f, 0x90, 0x5f, + 0xc8, 0x2e, 0x60, 0x50, 0xc3, 0x7f, 0xd4, 0x7f, 0xe7, 0x7f, 0xf6, 0x7f, + 0xb2, 0x7f, 0xa5, 0x7f, 0x36, 0x30, 0x07, 0x2e, 0x01, 0xf0, 0xbe, 0xbd, + 0xbe, 0xbb, 0x6f, 0x58, 0x77, 0x05, 0x49, 0x56, 0x71, 0x54, 0x27, 0x41, + 0x06, 0x41, 0xf8, 0xbf, 0xbe, 0x0b, 0xb5, 0x11, 0xd6, 0x42, 0x03, 0x89, + 0x5a, 0x0e, 0xf6, 0x2f, 0x12, 0x30, 0x25, 0x2e, 0x57, 0x00, 0x02, 0x31, + 0x25, 0x2e, 0xb8, 0xf0, 0xd4, 0x6f, 0xc3, 0x6f, 0xe7, 0x6f, 0xb2, 0x6f, + 0xa5, 0x6f, 0xf6, 0x6f, 0xa0, 0x5f, 0xc8, 0x2e, 0x1a, 0x24, 0x26, 0x00, + 0x80, 0x2e, 0x65, 0x01, 0x70, 0x50, 0x42, 0x8e, 0xd4, 0x7f, 0xf6, 0x7f, + 0x47, 0x25, 0x1a, 0x18, 0x73, 0x52, 0xf1, 0x00, 0x64, 0x25, 0x01, 0x30, + 0x39, 0x02, 0x94, 0x41, 0x81, 0x41, 0xe2, 0x7f, 0xbe, 0xbb, 0xbd, 0x8d, + 0x02, 0xbd, 0xb5, 0x7f, 0x8e, 0xb5, 0xba, 0x0a, 0xc6, 0x7f, 0xab, 0x7f, + 0x51, 0x25, 0x98, 0x2e, 0xd1, 0x01, 0xd5, 0x6f, 0xe2, 0x6f, 0x2a, 0x18, + 0x73, 0x54, 0xb2, 0x01, 0x02, 0x30, 0xc4, 0x6f, 0x7a, 0x03, 0x12, 0x41, + 0x74, 0x25, 0xd0, 0x7f, 0x52, 0xbc, 0xd3, 0x41, 0x6e, 0xba, 0xde, 0xb6, + 0x20, 0x0b, 0xc7, 0x7f, 0x91, 0x7f, 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, 0x42, + 0xf0, 0x5f, 0x09, 0x2e, 0x1d, 0x01, 0x05, 0x2e, 0x1d, 0x01, 0xa3, 0xbc, + 0x44, 0xbe, 0x90, 0x50, 0x4f, 0xb9, 0x07, 0x2e, 0x1d, 0x01, 0x4a, 0x25, + 0x9f, 0xb8, 0x39, 0x8f, 0xb2, 0xbd, 0xf2, 0x7f, 0xbf, 0xb9, 0xeb, 0x7f, + 0x8a, 0x0a, 0x37, 0x89, 0x0b, 0x30, 0x93, 0x0a, 0x8b, 0x7f, 0xcb, 0x43, + 0x0b, 0x43, 0x80, 0xb2, 0xd3, 0x7f, 0xc1, 0x7f, 0x90, 0x2e, 0x6c, 0xb2, + 0x20, 0x25, 0x01, 0x2e, 0x5f, 0x00, 0x01, 0x90, 0x0e, 0x2f, 0x75, 0x52, + 0x01, 0x2e, 0x5c, 0x00, 0xb4, 0x7f, 0xa2, 0x7f, 0x98, 0x2e, 0x72, 0xb2, + 0x00, 0x30, 0x21, 0x2e, 0x5f, 0x00, 0xc1, 0x6f, 0xd3, 0x6f, 0xa2, 0x6f, + 0xb4, 0x6f, 0x0b, 0x30, 0x01, 0x2e, 0x1d, 0x01, 0x06, 0xbc, 0x06, 0xbb, + 0x57, 0x25, 0x01, 0x2e, 0x1d, 0x01, 0x94, 0xb1, 0x05, 0xbc, 0xb6, 0x7f, + 0x0f, 0xbb, 0x79, 0x50, 0x80, 0xb3, 0x0f, 0x2f, 0x0d, 0x2e, 0x1d, 0x01, + 0x7d, 0x5e, 0xb7, 0x09, 0x2d, 0x2e, 0x1d, 0x01, 0x7f, 0x5c, 0x77, 0x5e, + 0x9b, 0x43, 0x9b, 0x43, 0xdb, 0x43, 0x9b, 0x43, 0x1b, 0x42, 0xcb, 0x43, + 0x0b, 0x42, 0x8b, 0x43, 0x40, 0xb2, 0x05, 0x2f, 0x77, 0x50, 0x00, 0x2e, + 0x16, 0x40, 0x0b, 0x40, 0x76, 0x7f, 0x8b, 0x7f, 0xcb, 0x0a, 0x01, 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 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(-) (limited to 'src/drivers') 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