mirror of https://github.com/arendst/Tasmota.git
Add config version tag
- Add config version tag - Bump version 8.2.0.4
This commit is contained in:
parent
bb54c870f7
commit
d3b2f8c489
|
@ -52,7 +52,7 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
|
|||
|
||||
## Changelog
|
||||
|
||||
### Version 8.2.0.3
|
||||
### Version 8.2.0.4
|
||||
|
||||
- Change HM-10 sensor type detection and add features (#7962)
|
||||
- Change light scheme 2,3,4 cycle time speed from 24,48,72,... seconds to 4,6,12,24,36,48,... seconds (#8034)
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
## Unreleased (development)
|
||||
|
||||
### 8.2.0.4 20200417
|
||||
|
||||
- Add config version tag
|
||||
|
||||
### 8.2.0.3 20200329
|
||||
|
||||
- Change light scheme 2,3,4 cycle time speed from 24,48,72,... seconds to 4,6,12,24,36,48,... seconds (#8034)
|
||||
|
|
|
@ -524,8 +524,9 @@ struct SYSCFG {
|
|||
uint8_t zb_channel; // F32
|
||||
uint8_t zb_free_byte; // F33
|
||||
uint16_t pms_wake_interval; // F34
|
||||
uint8_t config_version; // F36
|
||||
|
||||
uint8_t free_f36[130]; // F36 - Decrement if adding new Setting variables just above and below
|
||||
uint8_t free_f37[129]; // F37 - Decrement if adding new Setting variables just above and below
|
||||
|
||||
// Only 32 bit boundary variables below
|
||||
uint16_t pulse_counter_debounce_low; // FB8
|
||||
|
|
|
@ -1337,6 +1337,15 @@ void SettingsDelta(void)
|
|||
}
|
||||
#endif // ESP8266
|
||||
|
||||
if (Settings.version < 0x08020004) {
|
||||
#ifdef ESP8266
|
||||
Settings.config_version = 0; // ESP8266 (Has been 0 for long time)
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
Settings.config_version = 1; // ESP32
|
||||
#endif // ESP32
|
||||
}
|
||||
|
||||
Settings.version = VERSION;
|
||||
SettingsSave(1);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#ifndef _TASMOTA_VERSION_H_
|
||||
#define _TASMOTA_VERSION_H_
|
||||
|
||||
const uint32_t VERSION = 0x08020003;
|
||||
const uint32_t VERSION = 0x08020004;
|
||||
|
||||
// Lowest compatible version
|
||||
const uint32_t VERSION_COMPATIBLE = 0x07010006;
|
||||
|
|
|
@ -2509,6 +2509,16 @@ void HandleUploadLoop(void)
|
|||
} else {
|
||||
valid_settings = (settings_buffer[0] == CONFIG_FILE_SIGN);
|
||||
}
|
||||
|
||||
if (valid_settings) {
|
||||
#ifdef ESP8266
|
||||
valid_settings = (0 == settings_buffer[0xF36]); // Settings.config_version
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
valid_settings = (1 == settings_buffer[0xF36]); // Settings.config_version
|
||||
#endif // ESP32
|
||||
}
|
||||
|
||||
if (valid_settings) {
|
||||
SettingsDefaultSet2();
|
||||
memcpy((char*)&Settings +16, settings_buffer +16, sizeof(Settings) -16);
|
||||
|
|
Loading…
Reference in New Issue