mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
output also the flash size
This commit is contained in:
@@ -1517,7 +1517,7 @@ bool System::command_info(const char * value, const int8_t id, JsonObject output
|
|||||||
|
|
||||||
// System
|
// System
|
||||||
node = output["system"].to<JsonObject>();
|
node = output["system"].to<JsonObject>();
|
||||||
// prevent false negative in Unity tests every time the version changes
|
// prevent false-negatives in Unity tests every time the version changes
|
||||||
#if defined(EMSESP_UNITY)
|
#if defined(EMSESP_UNITY)
|
||||||
node["version"] = "dev";
|
node["version"] = "dev";
|
||||||
#else
|
#else
|
||||||
@@ -1526,16 +1526,17 @@ bool System::command_info(const char * value, const int8_t id, JsonObject output
|
|||||||
node["uptime"] = uuid::log::format_timestamp_ms(uuid::get_uptime_ms(), 3);
|
node["uptime"] = uuid::log::format_timestamp_ms(uuid::get_uptime_ms(), 3);
|
||||||
node["uptimeSec"] = uuid::get_uptime_sec();
|
node["uptimeSec"] = uuid::get_uptime_sec();
|
||||||
#ifndef EMSESP_STANDALONE
|
#ifndef EMSESP_STANDALONE
|
||||||
node["platform"] = EMSESP_PLATFORM;
|
node["platform"] = EMSESP_PLATFORM;
|
||||||
node["cpuType"] = ESP.getChipModel();
|
node["cpuType"] = ESP.getChipModel();
|
||||||
node["arduino"] = ARDUINO_VERSION;
|
node["arduino"] = ARDUINO_VERSION;
|
||||||
node["sdk"] = ESP.getSdkVersion();
|
node["sdk"] = ESP.getSdkVersion();
|
||||||
node["freeMem"] = getHeapMem();
|
node["freeMem"] = getHeapMem();
|
||||||
node["maxAlloc"] = getMaxAllocMem();
|
node["maxAlloc"] = getMaxAllocMem();
|
||||||
node["freeCaps"] = heap_caps_get_free_size(MALLOC_CAP_8BIT) / 1024; // includes heap and psram
|
node["freeCaps"] = heap_caps_get_free_size(MALLOC_CAP_8BIT) / 1024; // includes heap and psram
|
||||||
node["usedApp"] = EMSESP::system_.appUsed(); // kilobytes
|
node["usedApp"] = EMSESP::system_.appUsed(); // kilobytes
|
||||||
node["freeApp"] = EMSESP::system_.appFree(); // kilobytes
|
node["freeApp"] = EMSESP::system_.appFree(); // kilobytes
|
||||||
node["partition"] = esp_ota_get_running_partition()->label; // active partition
|
node["partition"] = esp_ota_get_running_partition()->label; // active partition
|
||||||
|
node["flash_chip_size"] = ESP.getFlashChipSize() / 1024; // kilobytes
|
||||||
#endif
|
#endif
|
||||||
node["resetReason"] = EMSESP::system_.reset_reason(0) + " / " + EMSESP::system_.reset_reason(1);
|
node["resetReason"] = EMSESP::system_.reset_reason(0) + " / " + EMSESP::system_.reset_reason(1);
|
||||||
#ifndef EMSESP_STANDALONE
|
#ifndef EMSESP_STANDALONE
|
||||||
|
|||||||
Reference in New Issue
Block a user