* fix #195: used trim() to remove leading and trailing spaces, added maxlength attr to input field

* started to work on #209: added another timer for NTP update after configurable interval (default 12h)
This commit is contained in:
lumapu 2022-08-30 15:35:36 +02:00
parent 4796555fac
commit 2bfb6467e0
9 changed files with 22 additions and 21 deletions

View file

@ -64,6 +64,13 @@ void app::loop(void) {
}
}
if(checkTicker(&mNtpRefreshTicker, mNtpRefreshInterval)) {
if(!apActive) {
mTimestamp = mWifi->getNtpTime();
DPRINTLN(DBG_INFO, "[NTP]: " + getDateTimeStr(mTimestamp));
}
}
mSys->Radio.loop();
@ -655,7 +662,10 @@ const char* app::getFieldStateClass(uint8_t fieldId) {
void app::resetSystem(void) {
mUptimeSecs = 0;
mUptimeTicker = 0xffffffff;
mUptimeInterval = 1000;
mUptimeInterval = 1000; // [ms]
mNtpRefreshTicker = 0xffffffff;
mNtpRefreshInterval = NTP_REFRESH_INTERVAL; // [ms]
#ifdef AP_ONLY
mTimestamp = 1;