mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-30 20:09:14 +03:00
Отключаем ожидание получения времени из сети и продолжаем грузиться.
This commit is contained in:
19
src/Main.cpp
19
src/Main.cpp
@@ -36,16 +36,17 @@ void setup() {
|
|||||||
String ntpServer = jsonReadStr(settingsFlashJson, F("ntp"));
|
String ntpServer = jsonReadStr(settingsFlashJson, F("ntp"));
|
||||||
int timezone = jsonReadInt(settingsFlashJson, F("timezone"));
|
int timezone = jsonReadInt(settingsFlashJson, F("timezone"));
|
||||||
configTime(3600*timezone, 0, ntpServer.c_str(), "ru.pool.ntp.org", "pool.ntp.org");
|
configTime(3600*timezone, 0, ntpServer.c_str(), "ru.pool.ntp.org", "pool.ntp.org");
|
||||||
Serial.print("Syncing NTP time");
|
Serial.print("Start syncing NTP time");
|
||||||
int i = 0;
|
|
||||||
while (isNetworkActive() && iotTimeNow < 1510592825 && i < 200)
|
|
||||||
{
|
|
||||||
time(&iotTimeNow);
|
time(&iotTimeNow);
|
||||||
delay(300);
|
// int i = 0;
|
||||||
Serial.print(".");
|
// while (isNetworkActive() && iotTimeNow < 1510592825 && i < 200)
|
||||||
i++;
|
// {
|
||||||
}
|
// time(&iotTimeNow);
|
||||||
Serial.println();
|
// delay(300);
|
||||||
|
// Serial.print(".");
|
||||||
|
// i++;
|
||||||
|
// }
|
||||||
|
// Serial.println();
|
||||||
|
|
||||||
// настраиваем локальный RTC
|
// настраиваем локальный RTC
|
||||||
watch = new IoTRTC(0); // создаем объект главного хранилища времени, но с заглушкой (0) для получения системного времени
|
watch = new IoTRTC(0); // создаем объект главного хранилища времени, но с заглушкой (0) для получения системного времени
|
||||||
|
|||||||
Reference in New Issue
Block a user