BBQKees board settings/fuse, remove esp32 cpu temperature, dev17

This commit is contained in:
MichaelDvP
2025-08-28 09:13:50 +02:00
parent 3b4e09208e
commit 3c4278029f
10 changed files with 589 additions and 558 deletions

View File

@@ -112,13 +112,13 @@ StateUpdateResult WebSettings::update(JsonObject root, WebSettings & settings) {
// We only do this for BBQKees boards
// Note 1: we never set the NVS boot value in the code - this is done on initial pre-loading
// Note 2: The board profile is dynamically changed for the session, but the value in the settings file on the FS remains untouched
if (!EMSESP::system_.getBBQKeesGatewayDetails().isEmpty()) {
String nvs_boot = EMSESP::nvs_.getString("boot");
if (!nvs_boot.isEmpty()) {
if (EMSESP::system_.getBBQKeesGatewayDetails(FUSE_VALUE::MFG).startsWith("BBQKees")) {
String bbq_board = EMSESP::system_.getBBQKeesGatewayDetails(FUSE_VALUE::BOARD);
if (!bbq_board.isEmpty()) {
#if defined(EMSESP_DEBUG)
EMSESP::logger().debug("Overriding board profile with NVS boot value %s", nvs_boot.c_str());
EMSESP::logger().info("Overriding board profile with fuse value %s", bbq_board.c_str());
#endif
settings.board_profile = nvs_boot;
settings.board_profile = bbq_board;
}
}

View File

@@ -130,8 +130,8 @@ void WebStatusService::systemStatus(AsyncWebServerRequest * request) {
root["free_psram"] = ESP.getFreePsram() / 1024;
}
root["model"] = EMSESP::system_.getBBQKeesGatewayDetails();
#if CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32
root["temperature"] = Helpers::transformNumFloat(EMSESP::system_.temperature(), 0, EMSESP::system_.fahrenheit() ? 2 : 0); // only 2 decimal places
#if CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2
root["temperature"] = (int)Helpers::transformNumFloat(EMSESP::system_.temperature(), 0, EMSESP::system_.fahrenheit() ? 2 : 0); // only 2 decimal places
#endif
// check for a factory partition first