fix bug when CUSTOM is chosen as board profile

This commit is contained in:
proddy
2021-03-27 12:48:02 +01:00
parent 0c8dd1d8cf
commit 7fe4b99cef

View File

@@ -69,7 +69,9 @@ StateUpdateResult WebSettings::update(JsonObject & root, WebSettings & settings)
std::vector<uint8_t> data; // led, dallas, rx, tx, button
if (!System::load_board_profile(data, settings.board_profile.c_str())) {
// invalid board configuration, override the default in case it has been misspelled
settings.board_profile = "S32";
if (!settings.board_profile.equals("CUSTOM")) {
settings.board_profile = "S32";
}
}
uint8_t default_led_gpio = data[0];
uint8_t default_dallas_gpio = data[1];