From 26a1aca9dd394cf1c4e3ff5786ce90c21012acb5 Mon Sep 17 00:00:00 2001 From: biver Date: Sat, 30 Apr 2022 08:15:16 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=82=D0=BA=D0=BB=D1=8E=D1=87=D0=B0?= =?UTF-8?q?=D0=B5=D0=BC=20=D0=BE=D0=B6=D0=B8=D0=B4=D0=B0=D0=BD=D0=B8=D0=B5?= =?UTF-8?q?=20=D0=BF=D0=BE=D0=BB=D1=83=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20?= =?UTF-8?q?=D0=B2=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=B8=20=D0=B8=D0=B7=20?= =?UTF-8?q?=D1=81=D0=B5=D1=82=D0=B8=20=D0=B8=20=D0=BF=D1=80=D0=BE=D0=B4?= =?UTF-8?q?=D0=BE=D0=BB=D0=B6=D0=B0=D0=B5=D0=BC=20=D0=B3=D1=80=D1=83=D0=B7?= =?UTF-8?q?=D0=B8=D1=82=D1=8C=D1=81=D1=8F.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Main.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/Main.cpp b/src/Main.cpp index 980582ce..cdb8be18 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -36,16 +36,17 @@ void setup() { String ntpServer = jsonReadStr(settingsFlashJson, F("ntp")); int timezone = jsonReadInt(settingsFlashJson, F("timezone")); configTime(3600*timezone, 0, ntpServer.c_str(), "ru.pool.ntp.org", "pool.ntp.org"); - Serial.print("Syncing NTP time"); - int i = 0; - while (isNetworkActive() && iotTimeNow < 1510592825 && i < 200) - { - time(&iotTimeNow); - delay(300); - Serial.print("."); - i++; - } - Serial.println(); + Serial.print("Start syncing NTP time"); + time(&iotTimeNow); + // int i = 0; + // while (isNetworkActive() && iotTimeNow < 1510592825 && i < 200) + // { + // time(&iotTimeNow); + // delay(300); + // Serial.print("."); + // i++; + // } + // Serial.println(); // настраиваем локальный RTC watch = new IoTRTC(0); // создаем объект главного хранилища времени, но с заглушкой (0) для получения системного времени