This commit is contained in:
proddy
2021-01-07 21:20:46 +01:00
parent ebbe32cc12
commit 5afd536c1c

View File

@@ -43,7 +43,7 @@ void WebStatusService::onStationModeDisconnected(WiFiEvent_t event, WiFiEventInf
}
void WebStatusService::onStationModeGotIP(WiFiEvent_t event, WiFiEventInfo_t info) {
EMSESP::logger().info(F("WiFi Connected with IP=%s, hostname=%s"), WiFi.localIP().toString().c_str(), WiFi.getHostname());
EMSESP::system_.reset_system_check(); // send out heartbeat MQTT as soon as we have a connection
EMSESP::system_.init_wifi(); // send out heartbeat MQTT as soon as we have a connection
}
#elif defined(ESP8266)
void WebStatusService::onStationModeDisconnected(const WiFiEventStationModeDisconnected & event) {
@@ -51,7 +51,7 @@ void WebStatusService::onStationModeDisconnected(const WiFiEventStationModeDisco
}
void WebStatusService::onStationModeGotIP(const WiFiEventStationModeGotIP & event) {
EMSESP::logger().info(F("WiFi Connected with IP=%s, hostname=%s"), event.ip.toString().c_str(), WiFi.hostname().c_str());
EMSESP::system_.reset_system_check(); // send out heartbeat MQTT as soon as we have a connection
EMSESP::system_.init_wifi(); // send out heartbeat MQTT as soon as we have a connection
}
#endif