mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-25 11:46:31 +00:00
Add config version tag
- Add config version tag - Bump version 8.2.0.4
This commit is contained in:
parent
ee47415579
commit
1e1a2c1807
@ -516,7 +516,6 @@ struct SYSCFG {
|
||||
uint8_t wifi_bssid[6]; // F0A
|
||||
uint8_t as3935_sensor_cfg[5]; // F10
|
||||
As3935IntCfg as3935_functions; // F15
|
||||
//uint8_t free_f35;
|
||||
As3935Param as3935_parameter; // F16
|
||||
uint64_t zb_ext_panid; // F18
|
||||
uint64_t zb_precfgkey_l; // F20
|
||||
@ -525,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[70]; // F36 - Decrement if adding new Setting variables just above and below
|
||||
uint8_t free_f37[69]; // F37 - Decrement if adding new Setting variables just above and below
|
||||
|
||||
// Only 32 bit boundary variables below
|
||||
uint8_t time_output_delay; // F7C
|
||||
|
@ -1365,6 +1365,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…
x
Reference in New Issue
Block a user