This is the actual fix, reducing the time between LCD is turned back on and the next task which will display the time is started.
This commit is contained in:
parent
10c5260187
commit
37c2768787
1 changed files with 4 additions and 7 deletions
|
@ -105,11 +105,8 @@ void SystemTask::Work() {
|
||||||
#pragma clang diagnostic push
|
#pragma clang diagnostic push
|
||||||
#pragma ide diagnostic ignored "EndlessLoop"
|
#pragma ide diagnostic ignored "EndlessLoop"
|
||||||
while(true) {
|
while(true) {
|
||||||
|
|
||||||
uint8_t msg;
|
uint8_t msg;
|
||||||
if (xQueueReceive(systemTasksMsgQueue, &msg, isSleeping ? 2500 : 1000)) {
|
if (xQueueReceive(systemTasksMsgQueue, &msg, isSleeping ? 2500 : 1000)) {
|
||||||
uint32_t systick_counter = nrf_rtc_counter_get(portNRF_RTC_REG);
|
|
||||||
dateTimeController.UpdateTime(systick_counter);
|
|
||||||
batteryController.Update();
|
batteryController.Update();
|
||||||
Messages message = static_cast<Messages >(msg);
|
Messages message = static_cast<Messages >(msg);
|
||||||
switch(message) {
|
switch(message) {
|
||||||
|
@ -117,15 +114,15 @@ void SystemTask::Work() {
|
||||||
spi.Wakeup();
|
spi.Wakeup();
|
||||||
twiMaster.Wakeup();
|
twiMaster.Wakeup();
|
||||||
|
|
||||||
|
nimbleController.StartAdvertising();
|
||||||
|
xTimerStart(idleTimer, 0);
|
||||||
spiNorFlash.Wakeup();
|
spiNorFlash.Wakeup();
|
||||||
lcd.Wakeup();
|
|
||||||
touchPanel.Wakeup();
|
touchPanel.Wakeup();
|
||||||
|
lcd.Wakeup();
|
||||||
|
|
||||||
displayApp->PushMessage(Applications::DisplayApp::Messages::GoToRunning);
|
displayApp->PushMessage(Applications::DisplayApp::Messages::GoToRunning);
|
||||||
displayApp->PushMessage(Applications::DisplayApp::Messages::UpdateBatteryLevel);
|
displayApp->PushMessage(Applications::DisplayApp::Messages::UpdateBatteryLevel);
|
||||||
|
|
||||||
xTimerStart(idleTimer, 0);
|
|
||||||
nimbleController.StartAdvertising();
|
|
||||||
isSleeping = false;
|
isSleeping = false;
|
||||||
isWakingUp = false;
|
isWakingUp = false;
|
||||||
break;
|
break;
|
||||||
|
@ -195,7 +192,7 @@ void SystemTask::Work() {
|
||||||
}
|
}
|
||||||
|
|
||||||
monitor.Process();
|
monitor.Process();
|
||||||
|
dateTimeController.UpdateTime(nrf_rtc_counter_get(portNRF_RTC_REG););
|
||||||
if(!nrf_gpio_pin_read(pinButton))
|
if(!nrf_gpio_pin_read(pinButton))
|
||||||
watchdog.Kick();
|
watchdog.Kick();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue