From 6504ac8cb70d1bab6d8f5258a9eea7628205a04f Mon Sep 17 00:00:00 2001 From: proddy Date: Sun, 1 Sep 2024 14:12:54 +0200 Subject: [PATCH] make psram boolean --- src/web/WebStatusService.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/web/WebStatusService.cpp b/src/web/WebStatusService.cpp index 4dab1d55c..a1994a9c6 100644 --- a/src/web/WebStatusService.cpp +++ b/src/web/WebStatusService.cpp @@ -118,13 +118,11 @@ void WebStatusService::hardwareStatus(AsyncWebServerRequest * request) { root["fs_used"] = FSused; root["fs_free"] = EMSESP::system_.FStotal() - FSused; root["free_caps"] = heap_caps_get_free_size(MALLOC_CAP_8BIT) / 1024; // includes heap and psram - - root["psram"] = EMSESP::system_.PSram(); + root["psram"] = (EMSESP::system_.PSram() > 0); // boolean if (EMSESP::system_.PSram()) { root["psram_size"] = EMSESP::system_.PSram(); root["free_psram"] = ESP.getFreePsram() / 1024; } - root["model"] = EMSESP::system_.getBBQKeesGatewayDetails(); // check for a factory partition first @@ -139,7 +137,7 @@ void WebStatusService::hardwareStatus(AsyncWebServerRequest * request) { root["has_partition"] = false; } - // Matches RestartMonitor.tsx + // Matches status codes in RestartMonitor.tsx if (EMSESP::system_.restart_pending()) { root["status"] = "restarting"; EMSESP::system_.restart_requested(true); // tell emsesp loop to start restart