устранение багов

This commit is contained in:
Dmitry Borisenko
2022-10-12 03:14:55 +02:00
parent 2c7adf468b
commit 6912d5f68d
16 changed files with 126 additions and 184 deletions

View File

@@ -13,9 +13,11 @@ void ntpInit() {
if (unixTime < MIN_DATETIME) {
isTimeSynch = false;
// SerialPrint("E", "NTP", "Time not synched");
jsonWriteInt(errorsHeapJson, F("tme1"), 1);
synchTime();
return;
}
jsonWriteInt(errorsHeapJson, F("tme1"), 0);
breakEpochToTime(unixTime + jsonReadInt(settingsFlashJson, F("timezone")) * 60 * 60, _time_local);
breakEpochToTime(unixTime, _time_utc);
isTimeSynch = true;