diff options
Diffstat (limited to 'src/systemtask')
-rw-r--r-- | src/systemtask/SystemTask.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index 42a4e844..b540fcd8 100644 --- a/src/systemtask/SystemTask.cpp +++ b/src/systemtask/SystemTask.cpp @@ -98,7 +98,6 @@ void SystemTask::Work() { heartRateController, settingsController, motionController); displayApp->Start(); - batteryController.Update(); displayApp->PushMessage(Pinetime::Applications::Display::Messages::UpdateBatteryLevel); heartRateSensor.Init(); @@ -106,7 +105,6 @@ void SystemTask::Work() { heartRateApp = std::make_unique<Pinetime::Applications::HeartRateTask>(heartRateSensor, heartRateController); 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); nrf_gpio_pin_set(15); @@ -141,7 +139,14 @@ 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 ??? + Messages message = static_cast<Messages >(msg); switch(message) { case Messages::EnableSleeping: |