From 82eb79ce401a229472edd0c424dad1ae938c8a6c Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Thu, 17 Nov 2022 08:37:12 +0100 Subject: [PATCH] fix factory partition detection --- lib/framework/SystemStatus.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/framework/SystemStatus.cpp b/lib/framework/SystemStatus.cpp index 08e604f1a..b8323a04f 100644 --- a/lib/framework/SystemStatus.cpp +++ b/lib/framework/SystemStatus.cpp @@ -1,4 +1,5 @@ #include +#include #include "../../src/emsesp_stub.hpp" // proddy added @@ -31,6 +32,8 @@ void SystemStatus::systemStatus(AsyncWebServerRequest * request) { root["psram_size"] = emsesp::EMSESP::system_.PSram(); root["free_psram"] = ESP.getFreePsram() / 1024; } + const esp_partition_t * factory_partition = esp_partition_find_first(ESP_PARTITION_TYPE_APP, ESP_PARTITION_SUBTYPE_APP_FACTORY, NULL); + root["has_loader"] = factory_partition != NULL; response->setLength(); request->send(response);