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