output also the flash size

This commit is contained in:
proddy
2025-01-11 19:01:03 +01:00
parent c810d58064
commit 37c4be321f

View File

@@ -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
@@ -1536,6 +1536,7 @@ bool System::command_info(const char * value, const int8_t id, JsonObject output
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