diff --git a/firmware/GyverLamp_v1.2/time.ino b/firmware/GyverLamp_v1.2/time.ino index cd86bb1b..f6961ea3 100644 --- a/firmware/GyverLamp_v1.2/time.ino +++ b/firmware/GyverLamp_v1.2/time.ino @@ -1,6 +1,6 @@ -void timeTick() { - timeClient.update(); +void timeTick() { if (timeTimer.isReady()) { + timeClient.update(); byte thisDay = timeClient.getDay(); if (thisDay == 0) thisDay = 7; // воскресенье это 0 thisDay--; diff --git a/libraries/WiFiManager/WiFiManager.cpp b/libraries/WiFiManager/WiFiManager.cpp index 2e7884d3..921c14e9 100644 --- a/libraries/WiFiManager/WiFiManager.cpp +++ b/libraries/WiFiManager/WiFiManager.cpp @@ -173,7 +173,7 @@ boolean WiFiManager::autoConnect(char const *apName, char const *apPassword) { // attempt to connect; should it fail, fall back to AP WiFi.mode(WIFI_STA); - if (connectWifi("", "") == WL_CONNECTED) { + if (connectWifi(String(apName),String(apPassword)) == WL_CONNECTED) { DEBUG_WM(F("IP Address:")); DEBUG_WM(WiFi.localIP()); //connected