Add option #define UPGRADE_V8_MIN to drop support for upgrading before v8.0 (saves 1.3kb)

This option is not enabled by default except for ZBBridge, whose version was always at least v8.0.
This commit is contained in:
Stephan Hadinger 2020-11-30 21:43:57 +01:00
parent a178ef459b
commit 40e70d7938
4 changed files with 6 additions and 0 deletions

View File

@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file.
- Support for multiple WeMo devices by Magic73 (#9208) - Support for multiple WeMo devices by Magic73 (#9208)
- Fallback NTP server from x.pool.ntp.org if no ntpservers are configured - Fallback NTP server from x.pool.ntp.org if no ntpservers are configured
- TyuaMcu update 2/3 by Federico Leoni (#10004) - TyuaMcu update 2/3 by Federico Leoni (#10004)
- Add option `#define UPGRADE_V8_MIN` to drop support for upgrading before v8.0 (saves 1.3kb)
### Breaking Changed ### Breaking Changed
- KNX DPT9 (16-bit float) to DPT14 (32-bit float) by Adrian Scillato (#9811, #9888) - KNX DPT9 (16-bit float) to DPT14 (32-bit float) by Adrian Scillato (#9811, #9888)

View File

@ -45,6 +45,7 @@
#define CFG_HOLDER 4617 // [Reset 1] Change this value (max 32000) to load SECTION1 configuration parameters to flash #define CFG_HOLDER 4617 // [Reset 1] Change this value (max 32000) to load SECTION1 configuration parameters to flash
// If following define is disabled it increases configuration corruption detection BUT // If following define is disabled it increases configuration corruption detection BUT
// it only allows firmware upgrades starting from version 6.6.0.11 // it only allows firmware upgrades starting from version 6.6.0.11
// #define UPGRADE_V8_MIN // do not support upgrading from version below 8.0.0
// -- Project ------------------------------------- // -- Project -------------------------------------
#define PROJECT "tasmota" // PROJECT is used as the default topic delimiter #define PROJECT "tasmota" // PROJECT is used as the default topic delimiter

View File

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

View File

@ -458,6 +458,8 @@
#define USE_DOMOTICZ // Enable Domoticz #define USE_DOMOTICZ // Enable Domoticz
#undef USE_HOME_ASSISTANT // Disable Home Assistant #undef USE_HOME_ASSISTANT // Disable Home Assistant
#define UPGRADE_V8_MIN // do not support upgrading from version below 8.0.0
// -- MQTT - TLS - AWS IoT ------------------------ // -- MQTT - TLS - AWS IoT ------------------------
#ifdef USE_ZBBRIDGE_TLS // Enable TLS for ZbBridge #ifdef USE_ZBBRIDGE_TLS // Enable TLS for ZbBridge
#define USE_MQTT_TLS // Use TLS for MQTT connection (+34.5k code, +7.0k mem and +4.8k additional during connection handshake) #define USE_MQTT_TLS // Use TLS for MQTT connection (+34.5k code, +7.0k mem and +4.8k additional during connection handshake)