From f218660b71831d189e09bc5a1d9c4d3eab508571 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sat, 5 Feb 2022 15:50:04 +0100 Subject: [PATCH] Revert CalVer in favour of SemVer --- FIRMWARE.md | 2 +- README.md | 2 +- tasmota/language/it_IT.h | 2 +- tasmota/language/pl_PL.h | 2 +- tasmota/settings.h | 2 +- tasmota/support.ino | 21 +++++++++++---------- tasmota/tasmota_template.h | 4 ++-- tasmota/xdrv_86_esp32_sonoff_spm.ino | 4 ++-- 8 files changed, 20 insertions(+), 19 deletions(-) diff --git a/FIRMWARE.md b/FIRMWARE.md index 7373dd131..610cc6fba 100644 --- a/FIRMWARE.md +++ b/FIRMWARE.md @@ -18,7 +18,7 @@ See [CHANGELOG.md](https://github.com/arendst/Tasmota/blob/development/tasmota/C ## Development -[![Dev Version](https://img.shields.io/badge/development%20version-v2022.01.x-blue.svg)](https://github.com/arendst/Tasmota) +[![Dev Version](https://img.shields.io/badge/development%20version-v10.1.x.x-blue.svg)](https://github.com/arendst/Tasmota) [![Download Dev](https://img.shields.io/badge/download-development-yellow.svg)](http://ota.tasmota.com/tasmota/) [![Tasmota CI](https://github.com/arendst/Tasmota/workflows/Tasmota%20CI/badge.svg)](https://github.com/arendst/Tasmota/actions?query=workflow%3A%22Tasmota+CI%22) [![Tasmota ESP32 CI](https://github.com/arendst/Tasmota/workflows/Tasmota%20ESP32%20CI/badge.svg)](https://github.com/arendst/Tasmota/actions?query=workflow%3A%22Tasmota+ESP32+CI%22) diff --git a/README.md b/README.md index abdc78f58..8dfa92741 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Easy initial installation of Tasmota can be performed using the [Tasmota WebInst ## Development -[![Dev Version](https://img.shields.io/badge/development%20version-v2022.01.x-blue.svg)](https://github.com/arendst/Tasmota) +[![Dev Version](https://img.shields.io/badge/development%20version-v10.1.x.x-blue.svg)](https://github.com/arendst/Tasmota) [![Download Dev](https://img.shields.io/badge/download-development-yellow.svg)](http://ota.tasmota.com/tasmota/) [![Tasmota CI](https://github.com/arendst/Tasmota/actions/workflows/build_all_the_things.yml/badge.svg)](https://github.com/arendst/Tasmota/actions/workflows/build_all_the_things.yml) [![Build_development](https://github.com/arendst/Tasmota/actions/workflows/Tasmota_build_devel.yml/badge.svg)](https://github.com/arendst/Tasmota/actions/workflows/Tasmota_build_devel.yml) diff --git a/tasmota/language/it_IT.h b/tasmota/language/it_IT.h index 0b5d65a70..9a5c7a78c 100644 --- a/tasmota/language/it_IT.h +++ b/tasmota/language/it_IT.h @@ -28,7 +28,7 @@ * Use online command StateText to translate ON, OFF, HOLD and TOGGLE. * Use online command Prefix to translate cmnd, stat and tele. * - * Updated until v9.5.0.9 - Last update 04.02.2022 + * Updated until v10.1.0.6 - Last update 04.02.2022 \*********************************************************************/ #define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English) diff --git a/tasmota/language/pl_PL.h b/tasmota/language/pl_PL.h index c95053824..1b83b5639 100644 --- a/tasmota/language/pl_PL.h +++ b/tasmota/language/pl_PL.h @@ -28,7 +28,7 @@ * Use online command StateText to translate ON, OFF, HOLD and TOGGLE. * Use online command Prefix to translate cmnd, stat and tele. * - * Updated until v2022.1.4 - Last update 04.02.2022 + * Updated until v10.1.0.7 - Last update 04.02.2022 \*********************************************************************/ //#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English) diff --git a/tasmota/settings.h b/tasmota/settings.h index fffc9eaa0..e8dafb9fc 100644 --- a/tasmota/settings.h +++ b/tasmota/settings.h @@ -163,7 +163,7 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu uint32_t tuya_allow_dimmer_0 : 1; // bit 17 (v10.0.0.3) - SetOption131 - (Tuya) Allow save dimmer = 0 receved by MCU uint32_t tls_use_fingerprint : 1; // bit 18 (v10.0.0.4) - SetOption132 - (TLS) Use fingerprint validation instead of CA based uint32_t shift595_invert_outputs : 1; // bit 19 (v10.0.0.4) - SetOption133 - (Shift595) Invert outputs of 74x595 shift registers - uint32_t pwm_force_same_phase : 1; // bit 20 (2022.01.3) - SetOption134 - (PWM) force PWM lights to start at same phase, default is to spread phases to minimze overlap (also needed for H-bridge) + uint32_t pwm_force_same_phase : 1; // bit 20 (v10.1.0.6) - SetOption134 - (PWM) force PWM lights to start at same phase, default is to spread phases to minimze overlap (also needed for H-bridge) uint32_t spare21 : 1; // bit 21 uint32_t spare22 : 1; // bit 22 uint32_t spare23 : 1; // bit 23 diff --git a/tasmota/support.ino b/tasmota/support.ino index 225b1bb3e..c9ca9b3c3 100644 --- a/tasmota/support.ino +++ b/tasmota/support.ino @@ -687,19 +687,20 @@ bool NewerVersion(char* version_str) { // Loop through the version string, splitting on '.' seperators. for (char *str = strtok_r(version_dup, ".", &str_ptr); str && i < sizeof(VERSION); str = strtok_r(nullptr, ".", &str_ptr), i++) { int field = atoi(str); - if ((0 == i) && (field > 2021) && (field < 2099)) { // New versions look like 2022.01.1 - version = ((field / 100) << 8) + (field - 2000); - i++; - } else { - // The fields in a version string can only range from 0-255. - if ((field < 0) || (field > 255)) { // Old version look like 10.1.0.1 - return false; - } - // Shuffle the accumulated bytes across, and add the new byte. + // The fields in a version string can only range from 0-255. + if ((field < 0) || (field > 255)) { + return false; + } + // Shuffle the accumulated bytes across, and add the new byte. + version = (version << 8) + field; + // Check alpha delimiter after 1.2.3 only + if ((2 == i) && isalpha(str[strlen(str)-1])) { + field = str[strlen(str)-1] & 0x1f; version = (version << 8) + field; + i++; } } - // A version string should have 2-4 fields. e.g. 1.2, 1.2.3, or 1.2.3.1 (Now 2022.01 or 2022.01.1) + // A version string should have 2-4 fields. e.g. 1.2, 1.2.3, or 1.2.3a (= 1.2.3.1). // If not, then don't consider it a valid version string. if ((i < 2) || (i > sizeof(VERSION))) { return false; diff --git a/tasmota/tasmota_template.h b/tasmota/tasmota_template.h index 7c6b8576d..615c48630 100644 --- a/tasmota/tasmota_template.h +++ b/tasmota/tasmota_template.h @@ -199,7 +199,7 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu uint32_t udisplay_driver : 1; // bit 2 (v9.3.1.2) - Option_A3 - (Display) Universal display driver uint32_t enable_ccloader : 1; // bit 3 (v9.4.0.5) - Option_A4 - (Zigbee) Enable CCLoader using Zigbee Rx/Tx/Rst Gpios uint32_t rotary_mi_desk : 1; // bit 4 (v9.5.0.5) - Option_A5 - (Rotary) Enable Mi Desk emulation - uint32_t linkind_support : 1; // bit 5 (v2022.01.1) - Option_A6 - (Light) LinkInd support + uint32_t linkind_support : 1; // bit 5 (v10.1.0.4) - Option_A6 - (Light) LinkInd support uint32_t spare06 : 1; // bit 6 uint32_t spare07 : 1; // bit 7 uint32_t spare08 : 1; // bit 8 @@ -244,7 +244,7 @@ enum SupportedEmulationModules { #define MAX_OPTIONS_E 1 // Increase if more emulated modules are supported from kModuleEmulationList const uint8_t kModuleEmulationList[] PROGMEM = { - PWM_DIMMER // (v2022.01.1) - Option_E1 - (Light) USE_PWM_DIMMER support + PWM_DIMMER // (v10.1.0.4) - Option_E1 - (Light) USE_PWM_DIMMER support }; #endif // ESP32 diff --git a/tasmota/xdrv_86_esp32_sonoff_spm.ino b/tasmota/xdrv_86_esp32_sonoff_spm.ino index 642b853ac..6eb17826b 100644 --- a/tasmota/xdrv_86_esp32_sonoff_spm.ino +++ b/tasmota/xdrv_86_esp32_sonoff_spm.ino @@ -192,8 +192,8 @@ TasmotaSerial *SspmSerial; typedef union { uint16_t data; struct { - uint16_t dump : 1; // bit 0 (2022.01.3) - SSPMDump - Short receive dump (0) or full receive dump (1) - uint16_t display : 1; // bit 1 (2022.01.3) - SSPMDisplay - GUI display all relays (0) or only powered on relays (1) + uint16_t dump : 1; // bit 0 (v10.1.0.6) - SSPMDump - Short receive dump (0) or full receive dump (1) + uint16_t display : 1; // bit 1 (v10.1.0.6) - SSPMDisplay - GUI display all relays (0) or only powered on relays (1) uint16_t spare02 : 1; // bit 2 uint16_t spare03 : 1; // bit 3 uint16_t spare04 : 1; // bit 4