mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-11 16:06:38 +02:00
* 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:
parent
4796555fac
commit
2bfb6467e0
9 changed files with 22 additions and 21 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue