diff options
| author | hubmartin <hub.martin@gmail.com> | 2021-10-03 15:00:38 (GMT) |
|---|---|---|
| committer | hubmartin <hub.martin@gmail.com> | 2021-10-03 15:00:38 (GMT) |
| commit | f5725714d13a66407b0556f8ac3cbd7e6db8901f (patch) | |
| tree | 8d89e9dbe4209274e4fae1801ec8ca96ee8d6817 | |
| parent | 2aebbe3f474bfaa5058879bde045146f5561fb66 (diff) | |
Call battery controller update
| -rw-r--r-- | src/systemtask/SystemTask.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index a2ff60f..fc2c5cf 100644 --- a/src/systemtask/SystemTask.cpp +++ b/src/systemtask/SystemTask.cpp @@ -136,7 +136,6 @@ void SystemTask::Work() { touchPanel.Init(); dateTimeController.Register(this); batteryController.Register(this); - batteryController.Update(); motorController.Init(); motionSensor.SoftReset(); timerController.Register(this); @@ -197,6 +196,9 @@ void SystemTask::Work() { // } else { // nrf_gpio_cfg_sense_input(PinMap::PowerPresent, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_SENSE_HIGH); // } + + // Update controller based on current gpio pin state, needs to be called after gpio config + batteryController.Update(); idleTimer = xTimerCreate("idleTimer", pdMS_TO_TICKS(2000), pdFALSE, this, IdleTimerCallback); dimTimer = xTimerCreate("dimTimer", pdMS_TO_TICKS(settingsController.GetScreenTimeOut() - 2000), pdFALSE, this, DimTimerCallback); |
