From bb87f99ee0245d32b9805e05a05d936e808d59dc Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Fri, 17 Aug 2018 11:10:21 +0200 Subject: [PATCH] Fix version numbering Fix version numbering --- README.md | 2 +- sonoff/sonoff.h | 9 +++------ sonoff/sonoff.ino | 5 ++++- sonoff/sonoff_version.h | 7 ++++++- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 2496aa320..a204356e9 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ If you like **Sonoff-Tasmota**, give it a star, or fork it and contribute! ### Development [![Build Status](https://img.shields.io/travis/arendst/Sonoff-Tasmota.svg)](https://travis-ci.org/arendst/Sonoff-Tasmota) -Current version is **6.1.1c** - See [sonoff/_releasenotes.ino](https://github.com/arendst/Sonoff-Tasmota/blob/development/sonoff/_releasenotes.ino) for release information and [sonoff/_changelog.ino](https://github.com/arendst/Sonoff-Tasmota/blob/development/sonoff/_changelog.ino) for change information. +Current version is **6.1.1.x** - See [sonoff/_releasenotes.ino](https://github.com/arendst/Sonoff-Tasmota/blob/development/sonoff/_releasenotes.ino) for release information and [sonoff/_changelog.ino](https://github.com/arendst/Sonoff-Tasmota/blob/development/sonoff/_changelog.ino) for change information. ### Disclaimer :warning: **DANGER OF ELECTROCUTION** :warning: diff --git a/sonoff/sonoff.h b/sonoff/sonoff.h index 00c1e1c59..bb00402dd 100644 --- a/sonoff/sonoff.h +++ b/sonoff/sonoff.h @@ -20,11 +20,6 @@ #ifndef _SONOFF_H_ #define _SONOFF_H_ -#define D_PROGRAMNAME "Sonoff-Tasmota" -#define D_AUTHOR "Theo Arends" -//#define D_WEBLINK "https://github.com/arendst/Sonoff-Tasmota" -#define D_WEBLINK "https://bit.ly/tasmota" - /*********************************************************************************************\ * Power Type \*********************************************************************************************/ @@ -201,7 +196,9 @@ enum LichtSubtypes {LST_NONE, LST_SINGLE, LST_COLDWARM, LST_RGB, LST_RGBW, LST_R enum LichtSchemes {LS_POWER, LS_WAKEUP, LS_CYCLEUP, LS_CYCLEDN, LS_RANDOM, LS_MAX}; enum XsnsFunctions {FUNC_PRE_INIT, FUNC_INIT, FUNC_LOOP, FUNC_EVERY_50_MSECOND, FUNC_EVERY_SECOND, FUNC_PREP_BEFORE_TELEPERIOD, FUNC_JSON_APPEND, FUNC_WEB_APPEND, FUNC_SAVE_BEFORE_RESTART, - FUNC_COMMAND, FUNC_MQTT_SUBSCRIBE, FUNC_MQTT_INIT, FUNC_MQTT_DATA, FUNC_SET_POWER, FUNC_SHOW_SENSOR, FUNC_RULES_PROCESS, FUNC_FREE_MEM}; + FUNC_COMMAND, FUNC_MQTT_SUBSCRIBE, FUNC_MQTT_INIT, FUNC_MQTT_DATA, FUNC_SET_POWER, FUNC_SHOW_SENSOR, FUNC_RULES_PROCESS, FUNC_FREE_MEM, + FUNC_DISPLAY_POWER, FUNC_DISPLAY_CLEAR, FUNC_DISPLAY_INIT_PARTIAL, FUNC_DISPLAY_INIT_FULL, FUNC_DISPLAY_DRAW_HLINE, FUNC_DISPLAY_DRAW_VLINE, FUNC_DISPLAY_DRAW_CIRCLE, + FUNC_DISPLAY_FILL_CIRCLE, FUNC_DISPLAY_DRAW_RECTANGLE, FUNC_DISPLAY_FILL_RECTANGLE, FUNC_DISPLAY_DRAW_FRAME, FUNC_DISPLAY_FONT_SIZE, FUNC_DISPLAY_DRAW_STRING, FUNC_DISPLAY_ONOFF }; const uint8_t kDefaultRfCode[9] PROGMEM = { 0x21, 0x16, 0x01, 0x0E, 0x03, 0x48, 0x2E, 0x1A, 0x00 }; diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index de476f6a3..1762839eb 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -2454,7 +2454,10 @@ 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.%d"), VERSION >> 24 & 0xff, VERSION >> 16 & 0xff, VERSION >> 8 & 0xff, VERSION & 0xff); + snprintf_P(my_version, sizeof(my_version), PSTR("%d.%d.%d"), VERSION >> 24 & 0xff, VERSION >> 16 & 0xff, VERSION >> 8 & 0xff); + if (VERSION & 0xff) { + snprintf_P(my_version, sizeof(my_version), PSTR("%s.%d"), my_version, 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 index a0b150f7f..ab25cd1ef 100644 --- a/sonoff/sonoff_version.h +++ b/sonoff/sonoff_version.h @@ -20,6 +20,11 @@ #ifndef _SONOFF_VERSION_H_ #define _SONOFF_VERSION_H_ -#define VERSION 0x06010106 +#define VERSION 0x06010106 + +#define D_PROGRAMNAME "Sonoff-Tasmota" +#define D_AUTHOR "Theo Arends" +//#define D_WEBLINK "https://github.com/arendst/Sonoff-Tasmota" +#define D_WEBLINK "https://bit.ly/tasmota" #endif // _SONOFF_VERSION_H_