Skip to content

Commit f572571

Browse files
committed
Call battery controller update
1 parent 2aebbe3 commit f572571

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/systemtask/SystemTask.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ void SystemTask::Work() {
136136
touchPanel.Init();
137137
dateTimeController.Register(this);
138138
batteryController.Register(this);
139-
batteryController.Update();
140139
motorController.Init();
141140
motionSensor.SoftReset();
142141
timerController.Register(this);
@@ -197,6 +196,9 @@ void SystemTask::Work() {
197196
// } else {
198197
// nrf_gpio_cfg_sense_input(PinMap::PowerPresent, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_SENSE_HIGH);
199198
// }
199+
200+
// Update controller based on current gpio pin state, needs to be called after gpio config
201+
batteryController.Update();
200202

201203
idleTimer = xTimerCreate("idleTimer", pdMS_TO_TICKS(2000), pdFALSE, this, IdleTimerCallback);
202204
dimTimer = xTimerCreate("dimTimer", pdMS_TO_TICKS(settingsController.GetScreenTimeOut() - 2000), pdFALSE, this, DimTimerCallback);

0 commit comments

Comments
 (0)