Skip to content

Commit

Permalink
sendESPInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesgiguere committed Jan 26, 2024
1 parent 028592b commit 8cd284f
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/gpio_viewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#endif
#include <esp_partition.h>

// #define Version15
#define Version15

#ifdef Version15
const char *release = "1.5.0-unstable, please use a stable version";
Expand Down Expand Up @@ -234,20 +234,20 @@ class GPIOViewer
jsonResponse += "\"cores_count\": \"" + String(ESP.getChipCores()) + "\",";
jsonResponse += "\"chip_revision\": \"" + String(ESP.getChipRevision()) + "\",";
jsonResponse += "\"cpu_frequency\": \"" + String(ESP.getCpuFreqMHz()) + "\",";
jsonResponse += "\"cycle_count\": \"" + String(ESP.getCycleCount()) + "\",";
jsonResponse += "\"cycle_count\": " + String(ESP.getCycleCount()) + ",";
jsonResponse += "\"mac\": \"" + String(ESP.getEfuseMac()) + "\",";
jsonResponse += "\"flash_mode\": \"" + String(flashMode) + "\",";
jsonResponse += "\"flash_chip_size\": \"" + String(ESP.getFlashChipSize()) + "\",";
jsonResponse += "\"flash_chip_speed\": \"" + String(ESP.getFlashChipSpeed()) + "\",";
jsonResponse += "\"heap_size\": \"" + String(ESP.getHeapSize()) + "\",";
jsonResponse += "\"heap_max_alloc\": \"" + String(ESP.getMaxAllocHeap()) + "\",";
jsonResponse += "\"psram_size\": \"" + String(ESP.getPsramSize()) + "\",";
jsonResponse += "\"free_psram\": \"" + String(ESP.getFreePsram()) + "\",";
jsonResponse += "\"psram_max_alloc\": \"" + String(ESP.getMaxAllocPsram()) + "\",";
jsonResponse += "\"free_heap\": \"" + String(ESP.getFreeHeap()) + "\",";
jsonResponse += "\"flash_mode\": " + String(flashMode) + ",";
jsonResponse += "\"flash_chip_size\": " + String(ESP.getFlashChipSize()) + ",";
jsonResponse += "\"flash_chip_speed\": " + String(ESP.getFlashChipSpeed()) + ",";
jsonResponse += "\"heap_size\": " + String(ESP.getHeapSize()) + ",";
jsonResponse += "\"heap_max_alloc\": " + String(ESP.getMaxAllocHeap()) + ",";
jsonResponse += "\"psram_size\": " + String(ESP.getPsramSize()) + ",";
jsonResponse += "\"free_psram\": " + String(ESP.getFreePsram()) + ",";
jsonResponse += "\"psram_max_alloc\": " + String(ESP.getMaxAllocPsram()) + ",";
jsonResponse += "\"free_heap\": " + String(ESP.getFreeHeap()) + ",";
jsonResponse += "\"up_time\": \"" + String(millis()) + "\",";
jsonResponse += "\"sketch_size\": \"" + String(ESP.getSketchSize()) + "\",";
jsonResponse += "\"free_sketch\": \"" + String(ESP.getFreeSketchSpace()) + "\"";
jsonResponse += "\"sketch_size\": " + String(ESP.getSketchSize()) + ",";
jsonResponse += "\"free_sketch\": " + String(ESP.getFreeSketchSpace()) + "";

jsonResponse += '}';
request->send(200, "application/json", jsonResponse);
Expand Down

0 comments on commit 8cd284f

Please sign in to comment.