mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
only override board profile for BBQKees boards
This commit is contained in:
@@ -107,11 +107,15 @@ StateUpdateResult WebSettings::update(JsonObject root, WebSettings & settings) {
|
|||||||
settings.board_profile = root["board_profile"] | EMSESP_DEFAULT_BOARD_PROFILE; // this is set at compile time in platformio.ini, other it's "default"
|
settings.board_profile = root["board_profile"] | EMSESP_DEFAULT_BOARD_PROFILE; // this is set at compile time in platformio.ini, other it's "default"
|
||||||
String old_board_profile = settings.board_profile;
|
String old_board_profile = settings.board_profile;
|
||||||
|
|
||||||
// The optional NVS boot value has priority and overrides any board_profile setting. Note, we never set the NVS boot value in the code - this is done on initial pre-loading
|
// The optional NVS boot value has priority and overrides any board_profile setting.
|
||||||
// Note: The board profile is dynamically changed for the session, but the value in the settings file on the FS remains untouched
|
// We only do this for BBQKees boards
|
||||||
String nvs_boot = EMSESP::nvs_.getString("boot");
|
// Note 1: we never set the NVS boot value in the code - this is done on initial pre-loading
|
||||||
if (!nvs_boot.isEmpty()) {
|
// Note 2: The board profile is dynamically changed for the session, but the value in the settings file on the FS remains untouched
|
||||||
settings.board_profile = nvs_boot;
|
if (!EMSESP::system_.getBBQKeesGatewayDetails().isEmpty()) {
|
||||||
|
String nvs_boot = EMSESP::nvs_.getString("boot");
|
||||||
|
if (!nvs_boot.isEmpty()) {
|
||||||
|
settings.board_profile = nvs_boot;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// load the board profile from the settings, if it's not "default"
|
// load the board profile from the settings, if it's not "default"
|
||||||
|
|||||||
Reference in New Issue
Block a user