diff --git a/README.md b/README.md index 19bf193a6..5c369b928 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ If you like **Sonoff-Tasmota**, give it a star, or fork it and contribute! [![GitHub stars](https://img.shields.io/github/stars/arendst/Sonoff-Tasmota.svg?style=social&label=Star)](https://github.com/arendst/Sonoff-Tasmota/stargazers) [![GitHub forks](https://img.shields.io/github/forks/arendst/Sonoff-Tasmota.svg?style=social&label=Fork)](https://github.com/arendst/Sonoff-Tasmota/network) -### Development: +### Development [![Build Status](https://img.shields.io/travis/arendst/Sonoff-Tasmota.svg)](https://travis-ci.org/arendst/Sonoff-Tasmota) Current version is **5.13.0a** - See [sonoff/_releasenotes.ino](https://github.com/arendst/Sonoff-Tasmota/blob/development/sonoff/_releasenotes.ino) for change information. diff --git a/sonoff/_releasenotes.ino b/sonoff/_releasenotes.ino index 3bb2238c9..0bbf1e7bf 100644 --- a/sonoff/_releasenotes.ino +++ b/sonoff/_releasenotes.ino @@ -1,5 +1,6 @@ /* 5.13.0a * Fix JSON buffers size too small for execution in some situations (#2580) + * Add define MODULE for user selecting default model (#569, #2589) * * 5.13.0 20180430 * Change platformio option sonoff-ds18x20 to sonoff-allsensors enabling ds18x20 and all other sensors in one image diff --git a/sonoff/sonoff.h b/sonoff/sonoff.h index 296046c85..a2eecea4f 100644 --- a/sonoff/sonoff.h +++ b/sonoff/sonoff.h @@ -52,8 +52,6 @@ typedef unsigned long power_t; // Power (Relay) type #define MAX_KNX_CB 10 // Max number of KNX Group Addresses to write that can be set #define MAX_RULE_SIZE 512 // Max number of characters in rules -#define MODULE SONOFF_BASIC // [Module] Select default model - #define MQTT_TOKEN_PREFIX "%prefix%" // To be substituted by mqtt_prefix[x] #define MQTT_TOKEN_TOPIC "%topic%" // To be substituted by mqtt_topic, mqtt_grptopic, mqtt_buttontopic, mqtt_switchtopic diff --git a/sonoff/sonoff_post.h b/sonoff/sonoff_post.h index 1d6ba7878..ef1dfbfd9 100644 --- a/sonoff/sonoff_post.h +++ b/sonoff/sonoff_post.h @@ -46,6 +46,10 @@ void KNX_CB_Action(message_t const &msg, void *arg); * Default global defines \*********************************************************************************************/ +#ifndef MODULE +#define MODULE SONOFF_BASIC // [Module] Select default model +#endif + #define USE_DHT // Default DHT11 sensor needs no external library /*********************************************************************************************\ diff --git a/sonoff/user_config.h b/sonoff/user_config.h index 6bfa6e1cd..83b9a346f 100644 --- a/sonoff/user_config.h +++ b/sonoff/user_config.h @@ -48,6 +48,7 @@ // -- Project ------------------------------------- #define PROJECT "sonoff" // PROJECT is used as the default topic delimiter +#define MODULE SONOFF_BASIC // [Module] Select default model from sonoff_template.h (Should not be changed) #define SAVE_DATA 1 // [SaveData] Save changed parameters to Flash (0 = disable, 1 - 3600 seconds) #define SAVE_STATE 1 // [SetOption0] Save changed power state to Flash (0 = disable, 1 = enable)