mirror of https://github.com/arendst/Tasmota.git
Make FALLBACK_MODULE configurable
Make FALLBACK_MODULE configurable (#8464)
This commit is contained in:
parent
83bbe757db
commit
5ec694b3f3
|
@ -50,7 +50,12 @@
|
||||||
#define PROJECT "tasmota" // PROJECT is used as the default topic delimiter
|
#define PROJECT "tasmota" // PROJECT is used as the default topic delimiter
|
||||||
|
|
||||||
// If not selected the default will be SONOFF_BASIC
|
// If not selected the default will be SONOFF_BASIC
|
||||||
//#define MODULE SONOFF_BASIC // [Module] Select default model from tasmota_template.h
|
//#define MODULE SONOFF_BASIC // [Module] Select default module from tasmota_template.h
|
||||||
|
#ifdef ESP8266
|
||||||
|
#define FALLBACK_MODULE SONOFF_BASIC // [Module2] Select default module on fast reboot where USER_MODULE is user template
|
||||||
|
#else // ESP32
|
||||||
|
#define FALLBACK_MODULE WEMOS // [Module2] Select default module on fast reboot where USER_MODULE is user template
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SAVE_DATA 1 // [SaveData] Save changed parameters to Flash (0 = disable, 1 - 3600 seconds)
|
#define SAVE_DATA 1 // [SaveData] Save changed parameters to Flash (0 = disable, 1 - 3600 seconds)
|
||||||
#define SAVE_STATE true // [SetOption0] Save changed power state to Flash (false = disable, true = enable)
|
#define SAVE_STATE true // [SetOption0] Save changed power state to Flash (false = disable, true = enable)
|
||||||
|
|
|
@ -768,12 +768,7 @@ void SettingsDefaultSet2(void)
|
||||||
// flag.interlock |= 0;
|
// flag.interlock |= 0;
|
||||||
Settings.interlock[0] = 0xFF; // Legacy support using all relays in one interlock group
|
Settings.interlock[0] = 0xFF; // Legacy support using all relays in one interlock group
|
||||||
Settings.module = MODULE;
|
Settings.module = MODULE;
|
||||||
#ifdef ESP8266
|
Settings.fallback_module = FALLBACK_MODULE;
|
||||||
Settings.fallback_module = SONOFF_BASIC;
|
|
||||||
#else // ESP32
|
|
||||||
Settings.fallback_module = WEMOS;
|
|
||||||
#endif // ESP8266 - ESP32
|
|
||||||
Settings.fallback_module = MODULE;
|
|
||||||
ModuleDefault(WEMOS);
|
ModuleDefault(WEMOS);
|
||||||
// for (uint32_t i = 0; i < ARRAY_SIZE(Settings.my_gp.io); i++) { Settings.my_gp.io[i] = GPIO_NONE; }
|
// for (uint32_t i = 0; i < ARRAY_SIZE(Settings.my_gp.io); i++) { Settings.my_gp.io[i] = GPIO_NONE; }
|
||||||
SettingsUpdateText(SET_FRIENDLYNAME1, PSTR(FRIENDLY_NAME));
|
SettingsUpdateText(SET_FRIENDLYNAME1, PSTR(FRIENDLY_NAME));
|
||||||
|
@ -1466,11 +1461,7 @@ void SettingsDelta(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (Settings.version < 0x08030106) {
|
if (Settings.version < 0x08030106) {
|
||||||
#ifdef ESP8266
|
Settings.fallback_module = FALLBACK_MODULE;
|
||||||
Settings.fallback_module = SONOFF_BASIC;
|
|
||||||
#else // ESP32
|
|
||||||
Settings.fallback_module = WEMOS;
|
|
||||||
#endif // ESP8266 - ESP32
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Settings.version = VERSION;
|
Settings.version = VERSION;
|
||||||
|
|
|
@ -287,6 +287,9 @@ const char kWebColors[] PROGMEM =
|
||||||
#ifndef MODULE
|
#ifndef MODULE
|
||||||
#define MODULE SONOFF_BASIC // [Module] Select default model
|
#define MODULE SONOFF_BASIC // [Module] Select default model
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef FALLBACK_MODULE
|
||||||
|
#define FALLBACK_MODULE SONOFF_BASIC // [Module2] Select default module on fast reboot where USER_MODULE is user template
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef ARDUINO_ESP8266_RELEASE
|
#ifndef ARDUINO_ESP8266_RELEASE
|
||||||
#define ARDUINO_CORE_RELEASE "STAGE"
|
#define ARDUINO_CORE_RELEASE "STAGE"
|
||||||
|
@ -301,6 +304,9 @@ const char kWebColors[] PROGMEM =
|
||||||
#ifndef MODULE
|
#ifndef MODULE
|
||||||
#define MODULE WEMOS // [Module] Select default model
|
#define MODULE WEMOS // [Module] Select default model
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef FALLBACK_MODULE
|
||||||
|
#define FALLBACK_MODULE WEMOS // [Module2] Select default module on fast reboot where USER_MODULE is user template
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef ARDUINO_ESP32_RELEASE
|
#ifndef ARDUINO_ESP32_RELEASE
|
||||||
#define ARDUINO_CORE_RELEASE "STAGE"
|
#define ARDUINO_CORE_RELEASE "STAGE"
|
||||||
|
|
Loading…
Reference in New Issue