Move Backup to the system task.
This commit is contained in:
parent
2dd7b8ba2c
commit
4f6d7e2c63
|
@ -76,7 +76,6 @@ void DateTime::UpdateTime(uint32_t systickCounter) {
|
|||
} else if (hour != 0) {
|
||||
isMidnightAlreadyNotified = false;
|
||||
}
|
||||
NoInit_BackUpTime = currentDateTime;
|
||||
}
|
||||
|
||||
const char* DateTime::MonthShortToString() {
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
#include <cstdint>
|
||||
#include <chrono>
|
||||
extern std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> NoInit_BackUpTime;
|
||||
|
||||
namespace Pinetime {
|
||||
namespace System {
|
||||
|
|
|
@ -353,6 +353,7 @@ void SystemTask::Work() {
|
|||
monitor.Process();
|
||||
uint32_t systick_counter = nrf_rtc_counter_get(portNRF_RTC_REG);
|
||||
dateTimeController.UpdateTime(systick_counter);
|
||||
NoInit_BackUpTime = dateTimeController.CurrentDateTime();
|
||||
if (!nrf_gpio_pin_read(pinButton))
|
||||
watchdog.Kick();
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "drivers/Watchdog.h"
|
||||
#include "Messages.h"
|
||||
|
||||
extern std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> NoInit_BackUpTime;
|
||||
namespace Pinetime {
|
||||
namespace Drivers {
|
||||
class Cst816S;
|
||||
|
|
Loading…
Reference in New Issue
Block a user