mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
remove NTP status
This commit is contained in:
@@ -683,15 +683,7 @@ void System::heartbeat_json(JsonObject output) {
|
|||||||
|
|
||||||
output["uptime"] = uuid::log::format_timestamp_ms(uuid::get_uptime_ms(), 3);
|
output["uptime"] = uuid::log::format_timestamp_ms(uuid::get_uptime_ms(), 3);
|
||||||
output["uptime_sec"] = uuid::get_uptime_sec();
|
output["uptime_sec"] = uuid::get_uptime_sec();
|
||||||
bool value_b = ntp_connected();
|
|
||||||
if (EMSESP::system_.bool_format() == BOOL_FORMAT_TRUEFALSE) {
|
|
||||||
output["ntp_status"] = value_b;
|
|
||||||
} else if (EMSESP::system_.bool_format() == BOOL_FORMAT_10) {
|
|
||||||
output["ntp_status"] = value_b ? 1 : 0;
|
|
||||||
} else {
|
|
||||||
char s[12];
|
|
||||||
output["ntp_status"] = Helpers::render_boolean(s, value_b);
|
|
||||||
}
|
|
||||||
output["rxreceived"] = EMSESP::rxservice_.telegram_count();
|
output["rxreceived"] = EMSESP::rxservice_.telegram_count();
|
||||||
output["rxfails"] = EMSESP::rxservice_.telegram_error_count();
|
output["rxfails"] = EMSESP::rxservice_.telegram_error_count();
|
||||||
output["txreads"] = EMSESP::txservice_.telegram_read_count();
|
output["txreads"] = EMSESP::txservice_.telegram_read_count();
|
||||||
@@ -724,6 +716,7 @@ void System::heartbeat_json(JsonObject output) {
|
|||||||
int8_t rssi = WiFi.RSSI();
|
int8_t rssi = WiFi.RSSI();
|
||||||
output["rssi"] = rssi;
|
output["rssi"] = rssi;
|
||||||
output["wifistrength"] = wifi_quality(rssi);
|
output["wifistrength"] = wifi_quality(rssi);
|
||||||
|
output["wificonnects"] = EMSESP::esp8266React.getWifiConnects();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -1507,6 +1500,7 @@ bool System::command_info(const char * value, const int8_t id, JsonObject output
|
|||||||
node["network"] = "WiFi";
|
node["network"] = "WiFi";
|
||||||
node["hostname"] = WiFi.getHostname();
|
node["hostname"] = WiFi.getHostname();
|
||||||
node["RSSI"] = WiFi.RSSI();
|
node["RSSI"] = WiFi.RSSI();
|
||||||
|
node["WIFIConnects"] = EMSESP::esp8266React.getWifiConnects();
|
||||||
// node["MAC"] = WiFi.macAddress();
|
// node["MAC"] = WiFi.macAddress();
|
||||||
// node["IPv4 address"] = uuid::printable_to_string(WiFi.localIP()) + "/" + uuid::printable_to_string(WiFi.subnetMask());
|
// node["IPv4 address"] = uuid::printable_to_string(WiFi.localIP()) + "/" + uuid::printable_to_string(WiFi.subnetMask());
|
||||||
// node["IPv4 gateway"] = uuid::printable_to_string(WiFi.gatewayIP());
|
// node["IPv4 gateway"] = uuid::printable_to_string(WiFi.gatewayIP());
|
||||||
@@ -1535,6 +1529,7 @@ bool System::command_info(const char * value, const int8_t id, JsonObject output
|
|||||||
node["CORSOrigin"] = settings.CORSOrigin;
|
node["CORSOrigin"] = settings.CORSOrigin;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
#ifndef EMSESP_STANDALONE
|
#ifndef EMSESP_STANDALONE
|
||||||
EMSESP::esp8266React.getAPSettingsService()->read([&](const APSettings & settings) {
|
EMSESP::esp8266React.getAPSettingsService()->read([&](const APSettings & settings) {
|
||||||
const char * pM[] = {"always", "disconnected", "never"};
|
const char * pM[] = {"always", "disconnected", "never"};
|
||||||
|
|||||||
Reference in New Issue
Block a user