mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
don't restart ethernet a 2nd time
This commit is contained in:
@@ -61,7 +61,7 @@ void WebStatusService::WiFiEvent(WiFiEvent_t event, WiFiEventInfo_t info) {
|
|||||||
LOG_INFO("Adjusting Wifi Tx power from %d to %d (%s)", a1, a2, ok ? "ok" : "failed");
|
LOG_INFO("Adjusting Wifi Tx power from %d to %d (%s)", a1, a2, ok ? "ok" : "failed");
|
||||||
*/
|
*/
|
||||||
|
|
||||||
EMSESP::system_.network_init(); // send out heartbeat MQTT as soon as we have a connection
|
EMSESP::system_.send_heartbeat();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SYSTEM_EVENT_ETH_START:
|
case SYSTEM_EVENT_ETH_START:
|
||||||
@@ -75,7 +75,7 @@ void WebStatusService::WiFiEvent(WiFiEvent_t event, WiFiEventInfo_t info) {
|
|||||||
#ifndef EMSESP_STANDALONE
|
#ifndef EMSESP_STANDALONE
|
||||||
EMSESP::logger().info(F("Ethernet Connected with IP=%s, speed %d Mbps"), ETH.localIP().toString().c_str(), ETH.linkSpeed());
|
EMSESP::logger().info(F("Ethernet Connected with IP=%s, speed %d Mbps"), ETH.localIP().toString().c_str(), ETH.linkSpeed());
|
||||||
#endif
|
#endif
|
||||||
EMSESP::system_.network_init(); // send out heartbeat MQTT as soon as we have a connection
|
EMSESP::system_.send_heartbeat();
|
||||||
EMSESP::system_.ethernet_connected(true);
|
EMSESP::system_.ethernet_connected(true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user