Merge pull request #10027 from s-hadinger/upgrade_v8_min

Add option `#define UPGRADE_V8_MIN` to drop support for upgrading before v8.0 (saves 1.3kb)
This commit is contained in:
Theo Arends 2020-12-01 11:01:41 +01:00 committed by GitHub
commit 8acf3d4198
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -1097,6 +1097,7 @@ void SettingsDelta(void)
if (Settings.version != VERSION) { // Fix version dependent changes
#ifdef ESP8266
#ifndef UPGRADE_V8_MIN
if (Settings.version < 0x07000002) {
Settings.web_color2[0][0] = Settings.web_color[0][0];
Settings.web_color2[0][1] = Settings.web_color[0][1];
@ -1200,6 +1201,11 @@ void SettingsDelta(void)
// SettingsUpdateText(SET_FRIENDLYNAME3, Settings.ex_friendlyname[2]);
// SettingsUpdateText(SET_FRIENDLYNAME4, Settings.ex_friendlyname[3]);
}
#else // UPGRADE_V8_MIN
if (Settings.version < 0x08000000) {
SettingsDefault();
}
#endif // UPGRADE_V8_MIN
if (Settings.version < 0x08020003) {
SettingsUpdateText(SET_TEMPLATE_NAME, Settings.user_template_name);
Settings.zb_channel = 0; // set channel to zero to force reinit of zigbee parameters