From 0c87bc27b21f343a815eed3d7b5817e3b24d2d1d Mon Sep 17 00:00:00 2001 From: Felipe Martinez Date: Sun, 2 Jun 2024 00:43:25 +0000 Subject: [PATCH 1/2] Move motorController.Init call to DisplayApp::Start --- src/displayapp/DisplayApp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index d9b2e9b3..3fd34b3a 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -125,6 +125,7 @@ void DisplayApp::Start(System::BootErrors error) { bootError = error; lvgl.Init(); + motorController.Init(); if (error == System::BootErrors::TouchController) { LoadNewScreen(Apps::Error, DisplayApp::FullRefreshDirections::None); @@ -150,7 +151,6 @@ void DisplayApp::Process(void* instance) { void DisplayApp::InitHw() { brightnessController.Init(); ApplyBrightness(); - motorController.Init(); lcd.Init(); } From 9e406c70f95c2db93bbf84965c210ee274da1dd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Mart=C3=ADnez?= Date: Sun, 12 May 2024 22:05:30 +0200 Subject: [PATCH 2/2] Remove unnecessary BMA421 reads --- src/drivers/Bma421.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/drivers/Bma421.cpp b/src/drivers/Bma421.cpp index aff62b8d..74d47d06 100644 --- a/src/drivers/Bma421.cpp +++ b/src/drivers/Bma421.cpp @@ -126,13 +126,6 @@ Bma421::Values Bma421::Process() { uint32_t steps = 0; bma423_step_counter_output(&steps, &bma); - int32_t temperature; - bma4_get_temperature(&temperature, BMA4_DEG, &bma); - temperature = temperature / 1000; - - uint8_t activity = 0; - bma423_activity_output(&activity, &bma); - // 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}; }