From fe13a649321417cd5679c28c7d566f2d7442b933 Mon Sep 17 00:00:00 2001 From: DanielR92 Date: Fri, 23 Aug 2024 20:30:22 +0200 Subject: [PATCH] fix Systeminfo --- src/web/RestApi.h | 4 ++-- src/web/html/system.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/web/RestApi.h b/src/web/RestApi.h index cb846fb5..b3d9df1f 100644 --- a/src/web/RestApi.h +++ b/src/web/RestApi.h @@ -822,6 +822,8 @@ class RestApi { void getChipInfo(JsonObject obj) { obj[F("cpu_freq")] = ESP.getCpuFreqMHz(); obj[F("sdk")] = ESP.getSdkVersion(); + obj[F("temp_sensor_c")] = ah::readTemperature(); + #if defined(ESP32) obj[F("revision")] = ESP.getChipRevision(); obj[F("model")] = ESP.getChipModel(); @@ -878,8 +880,6 @@ class RestApi { obj[F("par_size_app0")] = ESP.getFreeSketchSpace(); obj[F("par_used_app0")] = ESP.getSketchSize(); - obj[F("temp_sensor_c")] = ah::readTemperature(); - #if defined(ESP32) obj[F("heap_total")] = ESP.getHeapSize(); diff --git a/src/web/html/system.html b/src/web/html/system.html index 407de425..daaa5e05 100644 --- a/src/web/html/system.html +++ b/src/web/html/system.html @@ -45,7 +45,7 @@ tr("Version", obj.generic.version + " - " + obj.generic.build), tr("Chip", "CPU: " + obj.chip.cpu_freq + "MHz, " + obj.chip.cores + " Core(s)"), tr("Chip Model", obj.chip.model), - tr("Chip temp.", obj.chip.temp_sensor_c), + tr("Chip temp.", obj.chip.temp_sensor_c + "°C"), ] document.getElementById("info").append(