Fixed displaying last displayed time for ~100ms on wake
This commit is contained in:
parent
0e97db1c30
commit
10c5260187
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,6 +5,7 @@ CMakeFiles/
|
||||||
**/CMakeCache.txt
|
**/CMakeCache.txt
|
||||||
cmake_install.cmake
|
cmake_install.cmake
|
||||||
Makefile
|
Makefile
|
||||||
|
build/
|
||||||
|
|
||||||
# Resulting binary files
|
# Resulting binary files
|
||||||
*.a
|
*.a
|
||||||
|
|
|
@ -105,8 +105,12 @@ 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();
|
||||||
Messages message = static_cast<Messages >(msg);
|
Messages message = static_cast<Messages >(msg);
|
||||||
switch(message) {
|
switch(message) {
|
||||||
case Messages::GoToRunning:
|
case Messages::GoToRunning:
|
||||||
|
@ -190,10 +194,6 @@ void SystemTask::Work() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t systick_counter = nrf_rtc_counter_get(portNRF_RTC_REG);
|
|
||||||
dateTimeController.UpdateTime(systick_counter);
|
|
||||||
batteryController.Update();
|
|
||||||
|
|
||||||
monitor.Process();
|
monitor.Process();
|
||||||
|
|
||||||
if(!nrf_gpio_pin_read(pinButton))
|
if(!nrf_gpio_pin_read(pinButton))
|
||||||
|
|
Loading…
Reference in a new issue