sforkowany z mirror/meshtastic-firmware
commit
84b9028ecb
|
@ -1169,6 +1169,16 @@ void handleReport(HTTPRequest *req, HTTPResponse *res)
|
|||
|
||||
res->println("},");
|
||||
|
||||
res->println("\"memory\": {");
|
||||
res->printf("\"heap_total\": %u,\n", ESP.getHeapSize());
|
||||
res->printf("\"heap_free\": %u,\n", ESP.getFreeHeap());
|
||||
res->printf("\"psram_total\": %s,\n", ESP.getPsramSize());
|
||||
res->printf("\"psram_free\": %s,\n", ESP.getFreePsram());
|
||||
res->print("\"spiffs_total\" : " + String(SPIFFS.totalBytes()) + ",");
|
||||
res->print("\"spiffs_used\" : " + String(SPIFFS.usedBytes()) + ",");
|
||||
res->print("\"spiffs_free\" : " + String(SPIFFS.totalBytes() - SPIFFS.usedBytes()));
|
||||
res->println("},");
|
||||
|
||||
res->println("\"power\": {");
|
||||
#define BoolToString(x) ((x) ? "true" : "false")
|
||||
res->printf("\"battery_percent\": %u,\n", powerStatus->getBatteryChargePercent());
|
||||
|
|
Ładowanie…
Reference in New Issue