Support upgrade/downgrade between versions #832

This commit is contained in:
Proddy
2022-12-25 16:47:17 +01:00
parent 8000497302
commit 9b3b7fc8ff
6 changed files with 83 additions and 90 deletions

View File

@@ -83,7 +83,7 @@ void WebSettings::read(WebSettings & settings, JsonObject & root) {
StateUpdateResult WebSettings::update(JsonObject & root, WebSettings & settings) {
// load the version of the settings
// will be picked up in System::check_upgrade()
settings.version = root["version"] || EMSESP_DEFAULT_VERSION;
settings.version = root["version"] | EMSESP_DEFAULT_VERSION;
// load default GPIO configuration based on board profile
std::vector<int8_t> data; // // led, dallas, rx, tx, button, phy_type, eth_power, eth_phy_addr, eth_clock_mode