1
0
Fork 0

Move Backup to the system task.

This commit is contained in:
Tim Keller 2021-08-19 00:51:12 +00:00
parent 2dd7b8ba2c
commit 4f6d7e2c63
4 changed files with 2 additions and 2 deletions

View file

@ -76,7 +76,6 @@ void DateTime::UpdateTime(uint32_t systickCounter) {
} else if (hour != 0) { } else if (hour != 0) {
isMidnightAlreadyNotified = false; isMidnightAlreadyNotified = false;
} }
NoInit_BackUpTime = currentDateTime;
} }
const char* DateTime::MonthShortToString() { const char* DateTime::MonthShortToString() {

View file

@ -2,7 +2,6 @@
#include <cstdint> #include <cstdint>
#include <chrono> #include <chrono>
extern std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> NoInit_BackUpTime;
namespace Pinetime { namespace Pinetime {
namespace System { namespace System {

View file

@ -353,6 +353,7 @@ void SystemTask::Work() {
monitor.Process(); monitor.Process();
uint32_t systick_counter = nrf_rtc_counter_get(portNRF_RTC_REG); uint32_t systick_counter = nrf_rtc_counter_get(portNRF_RTC_REG);
dateTimeController.UpdateTime(systick_counter); dateTimeController.UpdateTime(systick_counter);
NoInit_BackUpTime = dateTimeController.CurrentDateTime();
if (!nrf_gpio_pin_read(pinButton)) if (!nrf_gpio_pin_read(pinButton))
watchdog.Kick(); watchdog.Kick();
} }

View file

@ -30,6 +30,7 @@
#include "drivers/Watchdog.h" #include "drivers/Watchdog.h"
#include "Messages.h" #include "Messages.h"
extern std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> NoInit_BackUpTime;
namespace Pinetime { namespace Pinetime {
namespace Drivers { namespace Drivers {
class Cst816S; class Cst816S;