diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index 05c30b6a5..a7f9c7d22 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -50,7 +50,12 @@ #define PROJECT "tasmota" // PROJECT is used as the default topic delimiter // 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_STATE true // [SetOption0] Save changed power state to Flash (false = disable, true = enable) diff --git a/tasmota/settings.ino b/tasmota/settings.ino index dffd27964..d7ede5f25 100644 --- a/tasmota/settings.ino +++ b/tasmota/settings.ino @@ -768,12 +768,7 @@ void SettingsDefaultSet2(void) // flag.interlock |= 0; Settings.interlock[0] = 0xFF; // Legacy support using all relays in one interlock group Settings.module = MODULE; -#ifdef ESP8266 - Settings.fallback_module = SONOFF_BASIC; -#else // ESP32 - Settings.fallback_module = WEMOS; -#endif // ESP8266 - ESP32 - Settings.fallback_module = MODULE; + Settings.fallback_module = FALLBACK_MODULE; ModuleDefault(WEMOS); // 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)); @@ -1466,11 +1461,7 @@ void SettingsDelta(void) } #endif if (Settings.version < 0x08030106) { -#ifdef ESP8266 - Settings.fallback_module = SONOFF_BASIC; -#else // ESP32 - Settings.fallback_module = WEMOS; -#endif // ESP8266 - ESP32 + Settings.fallback_module = FALLBACK_MODULE; } Settings.version = VERSION; diff --git a/tasmota/tasmota_globals.h b/tasmota/tasmota_globals.h index c2acc6911..363933095 100644 --- a/tasmota/tasmota_globals.h +++ b/tasmota/tasmota_globals.h @@ -287,6 +287,9 @@ const char kWebColors[] PROGMEM = #ifndef MODULE #define MODULE SONOFF_BASIC // [Module] Select default model #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 #define ARDUINO_CORE_RELEASE "STAGE" @@ -301,6 +304,9 @@ const char kWebColors[] PROGMEM = #ifndef MODULE #define MODULE WEMOS // [Module] Select default model #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 #define ARDUINO_CORE_RELEASE "STAGE"