Skip to content

Commit

Permalink
add version to settings file
Browse files Browse the repository at this point in the history
  • Loading branch information
proddy committed Dec 25, 2022
1 parent 067129f commit 84589a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/web/WebSettingsService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ WebSettingsService::WebSettingsService(AsyncWebServer * server, FS * fs, Securit
}

void WebSettings::read(WebSettings & settings, JsonObject & root) {
root["version"] = settings.version;
root["locale"] = settings.locale;
root["tx_mode"] = settings.tx_mode;
root["ems_bus_id"] = settings.ems_bus_id;
Expand Down Expand Up @@ -82,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"] || "";
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
Expand Down

0 comments on commit 84589a4

Please sign in to comment.