From 3efb84fb93e98ea588fc78e60c53bda7e8f1de6e Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sun, 12 Aug 2018 14:05:15 +0200 Subject: [PATCH] Change version representation Change version representation from 1.1.1a to 1.1.1.1 for better change reference --- sonoff/_changelog.ino | 5 ++++- sonoff/sonoff.ino | 10 ++-------- sonoff/sonoff_version.h | 25 +++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 sonoff/sonoff_version.h diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index d5e8a8b73..1aa01acaf 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -1,4 +1,7 @@ -/* 6.1.1c +/* 6.1.1.4 + * Change version representation from 1.1.1a to 1.1.1.1 for better change reference + * + * 6.1.1c * Add iFan02 Fanspeed + and Fanspeed - command options (#3415) * Fix some Pow R2 and S31 checksum errors (#3425) * Change CounterType 1 from milliseconds to microseconds (#3437) diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index 945306a63..de476f6a3 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -25,10 +25,9 @@ - Select IDE Tools - Flash Size: "1M (no SPIFFS)" ====================================================*/ -#define VERSION 0x06010103 // 6.1.1c - // Location specific includes #include // Arduino_Esp8266 version information (ARDUINO_ESP8266_RELEASE and ARDUINO_ESP8266_RELEASE_2_3_0) +#include "sonoff_version.h" // Sonoff-Tasmota version information #include "sonoff.h" // Enumeration used in user_config.h #include "user_config.h" // Fixed user configurable options #ifdef USE_CONFIG_OVERRIDE @@ -2455,12 +2454,7 @@ void setup() Serial.println(); seriallog_level = LOG_LEVEL_INFO; // Allow specific serial messages until config loaded - snprintf_P(my_version, sizeof(my_version), PSTR("%d.%d.%d"), VERSION >> 24 & 0xff, VERSION >> 16 & 0xff, VERSION >> 8 & 0xff); - if (VERSION & 0x1f) { - idx = strlen(my_version); - my_version[idx] = 96 + (VERSION & 0x1f); - my_version[idx +1] = 0; - } + snprintf_P(my_version, sizeof(my_version), PSTR("%d.%d.%d.%d"), VERSION >> 24 & 0xff, VERSION >> 16 & 0xff, VERSION >> 8 & 0xff, VERSION & 0xff); #ifdef BE_MINIMAL snprintf_P(my_version, sizeof(my_version), PSTR("%s-" D_JSON_MINIMAL), my_version); #endif // BE_MINIMAL diff --git a/sonoff/sonoff_version.h b/sonoff/sonoff_version.h new file mode 100644 index 000000000..9ce29bcea --- /dev/null +++ b/sonoff/sonoff_version.h @@ -0,0 +1,25 @@ +/* + sonoff_version.h - Version header file for Sonoff-Tasmota + + Copyright (C) 2018 Theo Arends + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#ifndef _SONOFF_VERSION_H_ +#define _SONOFF_VERSION_H_ + +#define VERSION 0x06010104 + +#endif // _SONOFF_VERSION_H_