Skip to content

Commit 74d1a81

Browse files
committed
TimeProcessor changes
+ TimeProcessor is a singleton now * TimeSync event now works for esp32 platform also - Obsolete all WorldTimeApi methods, left it as a sepparate class for compatibility only Known issues: esp32 platform uses one ntp server only - espressif/arduino-esp32#5343 Signed-off-by: Emil Muratov <[email protected]>
1 parent f97efab commit 74d1a81

File tree

5 files changed

+235
-215
lines changed

5 files changed

+235
-215
lines changed

EmbUI/EmbUI.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ void EmbUI::begin(){
132132
e4 = WiFi.onWiFiModeChange(std::bind(&EmbUI::onWiFiMode, this, std::placeholders::_1));
133133
#elif defined ESP32
134134
WiFi.onEvent(std::bind(&EmbUI::WiFiEvent, this, std::placeholders::_1, std::placeholders::_2));
135-
//WiFi.onEvent(std::bind(&TimeProcessor::WiFiEvent, &timeProcessor, std::placeholders::_1, std::placeholders::_2));
136135
#endif
137136

138137
// восстанавливаем настройки времени

EmbUI/EmbUI.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ class EmbUI
229229
AsyncWebServer server;
230230
AsyncWebSocket ws;
231231
mqttCallback onConnect;
232-
TimeProcessor timeProcessor;
232+
TimeProcessor& timeProcessor = TimeProcessor::getInstance();
233233

234234
char mc[7]; // id из последних 3 байт mac-адреса "ffffff"
235235

0 commit comments

Comments
 (0)