implemented #336 set time manually or resync NTP

This commit is contained in:
lumapu 2022-10-11 21:52:01 +02:00
parent f53933b473
commit e3532f4464
7 changed files with 71 additions and 13 deletions

View file

@ -112,6 +112,14 @@ class app {
return mTimestamp;
}
inline void setTimestamp(uint32_t newTime) {
DPRINTLN(DBG_DEBUG, F("setTimestamp: ") + String(newTime));
if(0 == newTime)
mUpdateNtp = true;
else
mTimestamp = newTime;
}
void eraseSettings(bool all = false) {
//DPRINTLN(DBG_VERBOSE, F("main.h:eraseSettings"));
uint8_t buf[64];
@ -239,6 +247,7 @@ class app {
eep *mEep;
uint32_t mTimestamp;
bool mUpdateNtp;
bool mShowRebootRequest;
@ -257,7 +266,6 @@ class app {
// timer
uint32_t mTicker;
uint32_t mRxTicker;
// mqtt