merge PR#1497 from pswid, add partiton, resort system status

This commit is contained in:
MichaelDvP
2023-12-19 13:44:15 +01:00
parent dcb0d5087f
commit 9f3e2dbcd3
18 changed files with 75 additions and 47 deletions

View File

@@ -1206,13 +1206,16 @@ bool System::command_info(const char * value, const int8_t id, JsonObject & outp
// System
node = output.createNestedObject("System Info");
node["version"] = EMSESP_APP_VERSION;
node["platform"] = EMSESP_PLATFORM;
node["uptime"] = uuid::log::format_timestamp_ms(uuid::get_uptime_ms(), 3);
node["uptime (seconds)"] = uuid::get_uptime_sec();
#ifndef EMSESP_STANDALONE
node["platform"] = ARDUINO_VERSION;
node["sdk"] = ESP.getSdkVersion();
node["free mem"] = getHeapMem();
node["max alloc"] = getMaxAllocMem();
node["used app"] = EMSESP::system_.appUsed(); // kilobytes
node["free app"] = EMSESP::system_.appFree(); // kilobytes
node["partition"] = esp_ota_get_running_partition()->label;
#endif
node["reset reason"] = EMSESP::system_.reset_reason(0) + " / " + EMSESP::system_.reset_reason(1);