minor renaming

This commit is contained in:
Proddy
2022-12-04 10:32:37 +01:00
parent e3c94cc1f7
commit 9053e7ac88

View File

@@ -552,7 +552,7 @@ void System::send_info_mqtt(const char * event_str, bool send_ntp) {
#ifndef EMSESP_STANDALONE
if (EMSESP::system_.ethernet_connected()) {
doc["connection"] = "ethernet";
doc["network"] = "ethernet";
doc["hostname"] = ETH.getHostname();
doc["MAC"] = ETH.macAddress();
doc["IPv4 address"] = uuid::printable_to_string(ETH.localIP()) + "/" + uuid::printable_to_string(ETH.subnetMask());
@@ -562,7 +562,7 @@ void System::send_info_mqtt(const char * event_str, bool send_ntp) {
doc["IPv6 address"] = uuid::printable_to_string(ETH.localIPv6());
}
} else if (WiFi.status() == WL_CONNECTED) {
doc["connection"] = "wifi";
doc["network"] = "wifi";
doc["hostname"] = WiFi.getHostname();
doc["SSID"] = WiFi.SSID();
doc["BSSID"] = WiFi.BSSIDstr();
@@ -896,19 +896,19 @@ void System::show_system(uuid::console::Shell & shell) {
shell.println("Network:");
switch (WiFi.status()) {
case WL_IDLE_STATUS:
shell.printfln(" Network: Idle");
shell.printfln(" Status: Idle");
break;
case WL_NO_SSID_AVAIL:
shell.printfln(" Network: Network not found");
shell.printfln(" Status: Network not found");
break;
case WL_SCAN_COMPLETED:
shell.printfln(" Network: Network scan complete");
shell.printfln(" Status: Network scan complete");
break;
case WL_CONNECTED:
shell.printfln(" Network: connected");
shell.printfln(" Status: connected");
shell.printfln(" SSID: %s", WiFi.SSID().c_str());
shell.printfln(" BSSID: %s", WiFi.BSSIDstr().c_str());
shell.printfln(" RSSI: %d dBm (%d %%)", WiFi.RSSI(), wifi_quality(WiFi.RSSI()));
@@ -943,7 +943,7 @@ void System::show_system(uuid::console::Shell & shell) {
// show Ethernet if connected
if (ethernet_connected_) {
shell.println();
shell.printfln(" Ethernet Network: connected");
shell.printfln(" Status: Ethernet connected");
shell.printfln(" MAC address: %s", ETH.macAddress().c_str());
shell.printfln(" Hostname: %s", ETH.getHostname());
shell.printfln(" IPv4 address: %s/%s", uuid::printable_to_string(ETH.localIP()).c_str(), uuid::printable_to_string(ETH.subnetMask()).c_str());
@@ -1071,9 +1071,9 @@ bool System::command_info(const char * value, const int8_t id, JsonObject & outp
node["uptime"] = uuid::log::format_timestamp_ms(uuid::get_uptime_ms(), 3);
// node["uptime (seconds)"] = uuid::get_uptime_sec();
#ifndef EMSESP_STANDALONE
node["free mem"] = ESP.getFreeHeap() / 1024; // kilobytes
node["maxalloc"] = ESP.getMaxAllocHeap() / 1024; // kilobytes
node["free app"] = EMSESP::system_.appFree(); // kilobytes
node["free mem"] = ESP.getFreeHeap() / 1024; // kilobytes
node["max alloc"] = ESP.getMaxAllocHeap() / 1024; // kilobytes
node["free app"] = EMSESP::system_.appFree(); // kilobytes
#endif
node["reset reason"] = EMSESP::system_.reset_reason(0) + " / " + EMSESP::system_.reset_reason(1);
@@ -1081,7 +1081,7 @@ bool System::command_info(const char * value, const int8_t id, JsonObject & outp
// Network Status
node = output.createNestedObject("Network Info");
if (EMSESP::system_.ethernet_connected()) {
node["connection"] = "Ethernet";
node["network"] = "Ethernet";
node["hostname"] = ETH.getHostname();
node["MAC"] = ETH.macAddress();
node["IPv4 address"] = uuid::printable_to_string(ETH.localIP()) + "/" + uuid::printable_to_string(ETH.subnetMask());
@@ -1091,8 +1091,8 @@ bool System::command_info(const char * value, const int8_t id, JsonObject & outp
node["IPv6 address"] = uuid::printable_to_string(ETH.localIPv6());
}
} else if (WiFi.status() == WL_CONNECTED) {
node["connection"] = "WiFi";
node["hostname"] = WiFi.getHostname();
node["network"] = "WiFi";
node["hostname"] = WiFi.getHostname();
// node["SSID"] = WiFi.SSID();
// node["BSSID"] = WiFi.BSSIDstr();
node["RSSI"] = WiFi.RSSI();
@@ -1150,7 +1150,7 @@ bool System::command_info(const char * value, const int8_t id, JsonObject & outp
}
EMSESP::esp8266React.getMqttSettingsService()->read([&](MqttSettings & settings) {
node["enabled"] = settings.enabled;
node["client_id"] = settings.clientId;
node["client id"] = settings.clientId;
node["keep alive"] = settings.keepAlive;
node["clean session"] = settings.cleanSession;
node["base"] = settings.base;
@@ -1245,7 +1245,7 @@ bool System::command_info(const char * value, const int8_t id, JsonObject & outp
node["phy type"] = settings.phy_type;
if (settings.phy_type != PHY_type::PHY_TYPE_NONE) {
node["eth power"] = settings.eth_power;
node["eth phy_addr"] = settings.eth_phy_addr;
node["eth phy addr"] = settings.eth_phy_addr;
node["eth clock_mode"] = settings.eth_clock_mode;
}
node["rx gpio"] = settings.rx_gpio;