summaryrefslogtreecommitdiff
path: root/src/systemtask/SystemTask.cpp
diff options
context:
space:
mode:
authorJF002 <JF002@users.noreply.github.com>2021-04-16 17:57:35 (GMT)
committerGitHub <noreply@github.com>2021-04-16 17:57:35 (GMT)
commit36e27842e146ddcfbcd5dcef4ebb2c92955242be (patch)
tree54c2b4f658a82d5effc5f1a19f5937006aa748cd /src/systemtask/SystemTask.cpp
parenteb769fb60ecb8f96ecf6901082ec3f0610842af8 (diff)
parent3c413bdd5283f6ef95d23a4b7274722da680f039 (diff)
Merge pull request #263 from joaquimorg/0.16.0Update
Fix Issue #262 for 0.16.0 version
Diffstat (limited to 'src/systemtask/SystemTask.cpp')
-rw-r--r--src/systemtask/SystemTask.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp
index 42a4e84..b540fcd 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: