mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
wifi reconnects renaming
This commit is contained in:
@@ -66,8 +66,8 @@ class ESP8266React {
|
||||
return _apSettingsService.getAPNetworkStatus() == APNetworkStatus::ACTIVE;
|
||||
}
|
||||
|
||||
uint16_t getWifiConnects() {
|
||||
return _networkSettingsService.getWifiConnects();
|
||||
uint16_t getWifiReconnects() {
|
||||
return _networkSettingsService.getWifiReconnects();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -304,7 +304,7 @@ void NetworkSettingsService::WiFiEvent(WiFiEvent_t event, WiFiEventInfo_t info)
|
||||
break;
|
||||
|
||||
case ARDUINO_EVENT_WIFI_STA_DISCONNECTED:
|
||||
connectcount_++; // count the number of reconnects
|
||||
connectcount_++; // count the number of WiFi reconnects
|
||||
emsesp::EMSESP::logger().warning("WiFi disconnected (#%d). Reason: %s (%d)",
|
||||
connectcount_,
|
||||
disconnectReason(info.wifi_sta_disconnected.reason),
|
||||
|
||||
@@ -94,7 +94,7 @@ class NetworkSettingsService : public StatefulService<NetworkSettings> {
|
||||
void begin();
|
||||
void loop();
|
||||
|
||||
uint16_t getWifiConnects() const {
|
||||
uint16_t getWifiReconnects() const {
|
||||
return connectcount_;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,13 +60,13 @@ void NetworkStatus::networkStatus(AsyncWebServerRequest * request) {
|
||||
#else
|
||||
root["local_ipv6"] = WiFi.linkLocalIPv6().toString();
|
||||
#endif
|
||||
root["mac_address"] = WiFi.macAddress();
|
||||
root["rssi"] = WiFi.RSSI();
|
||||
root["ssid"] = WiFi.SSID();
|
||||
root["bssid"] = WiFi.BSSIDstr();
|
||||
root["channel"] = WiFi.channel();
|
||||
root["connect_count"] = emsesp::EMSESP::esp8266React.getWifiConnects();
|
||||
root["subnet_mask"] = WiFi.subnetMask().toString();
|
||||
root["mac_address"] = WiFi.macAddress();
|
||||
root["rssi"] = WiFi.RSSI();
|
||||
root["ssid"] = WiFi.SSID();
|
||||
root["bssid"] = WiFi.BSSIDstr();
|
||||
root["channel"] = WiFi.channel();
|
||||
root["reconnect_count"] = emsesp::EMSESP::esp8266React.getWifiReconnects();
|
||||
root["subnet_mask"] = WiFi.subnetMask().toString();
|
||||
|
||||
if (WiFi.gatewayIP() != INADDR_NONE) {
|
||||
root["gateway_ip"] = WiFi.gatewayIP().toString();
|
||||
|
||||
Reference in New Issue
Block a user