diff --git a/tasmota/include/tasmota.h b/tasmota/include/tasmota.h index 40a8a3050..ec68438ba 100644 --- a/tasmota/include/tasmota.h +++ b/tasmota/include/tasmota.h @@ -27,12 +27,6 @@ #define XFUNC_PTR_IN_ROM // Enable for keeping tables in ROM (PROGMEM) which seem to have access issues on some flash types #define MQTT_DATA_STRING // Use heap instead of fixed memory for TasmotaGlobal.mqtt_data -/*********************************************************************************************\ - * Default image -\*********************************************************************************************/ - -#define CODE_IMAGE_STR "tasmota" - /*********************************************************************************************\ * Power Type \*********************************************************************************************/ diff --git a/tasmota/include/tasmota_configurations.h b/tasmota/include/tasmota_configurations.h index c8beda51b..819e35f84 100644 --- a/tasmota/include/tasmota_configurations.h +++ b/tasmota/include/tasmota_configurations.h @@ -27,8 +27,9 @@ #ifdef FIRMWARE_SENSORS -#undef CODE_IMAGE_STR -#define CODE_IMAGE_STR "sensors" +#ifndef CODE_IMAGE_STR + #define CODE_IMAGE_STR "sensors" +#endif #undef USE_DISCOVERY // Disable mDNS (+8k code or +23.5k code with core 2_5_x, +0.3k mem) @@ -254,8 +255,9 @@ #ifdef FIRMWARE_KNX_NO_EMULATION -#undef CODE_IMAGE_STR -#define CODE_IMAGE_STR "knx" +#ifndef CODE_IMAGE_STR + #define CODE_IMAGE_STR "knx" +#endif #ifndef USE_KNX #define USE_KNX // Enable KNX IP Protocol Support (+23k code, +3k3 mem) @@ -280,8 +282,9 @@ #ifdef FIRMWARE_DISPLAYS -#undef CODE_IMAGE_STR -#define CODE_IMAGE_STR "display" +#ifndef CODE_IMAGE_STR + #define CODE_IMAGE_STR "display" +#endif #undef USE_EMULATION // Disable Belkin WeMo and Hue Bridge emulation for Alexa (-16k code, -2k mem) #undef USE_EMULATION_HUE // Disable Hue Bridge emulation for Alexa (+14k code, +2k mem common) @@ -366,8 +369,9 @@ #ifdef FIRMWARE_IR -#undef CODE_IMAGE_STR -#define CODE_IMAGE_STR "ir" +#ifndef CODE_IMAGE_STR + #define CODE_IMAGE_STR "ir" +#endif #undef USE_EMULATION #undef USE_EMULATION_HUE // Disable Hue emulation - only for lights and relays @@ -501,8 +505,9 @@ #ifdef FIRMWARE_ZBBRIDGE // ******************************************************************* -#undef CODE_IMAGE_STR -#define CODE_IMAGE_STR "zbbridge" +#ifndef CODE_IMAGE_STR + #define CODE_IMAGE_STR "zbbridge" +#endif #undef MODULE #define MODULE SONOFF_ZB_BRIDGE // [Module] Select default module from tasmota_template.h @@ -664,8 +669,9 @@ #ifdef FIRMWARE_LITE -#undef CODE_IMAGE_STR -#define CODE_IMAGE_STR "lite" +#ifndef CODE_IMAGE_STR + #define CODE_IMAGE_STR "lite" +#endif #undef APP_SLEEP #define APP_SLEEP 1 // Default to sleep = 1 for FIRMWARE_LITE @@ -818,8 +824,9 @@ #ifndef FIRMWARE_MINICUSTOM #ifdef FIRMWARE_MINIMAL -#undef CODE_IMAGE_STR -#define CODE_IMAGE_STR "minimal" +#ifndef CODE_IMAGE_STR + #define CODE_IMAGE_STR "minimal" +#endif #define FIRMWARE_MINIMAL_ONLY @@ -953,8 +960,9 @@ #ifdef FIRMWARE_MINICUSTOM #define FIRMWARE_MINIMAL -#undef CODE_IMAGE_STR -#define CODE_IMAGE_STR "mini-custom" +#ifndef CODE_IMAGE_STR + #define CODE_IMAGE_STR "mini-custom" +#endif #undef FIRMWARE_LITE // Disable tasmota-lite with no sensors #undef FIRMWARE_SENSORS // Disable tasmota-sensors with useful sensors enabled @@ -1093,4 +1101,12 @@ #define USE_TLS // flag indicates we need to include TLS code #endif // USE_MQTT_TLS +/*********************************************************************************************\ + * Default image +\*********************************************************************************************/ + +#ifndef CODE_IMAGE_STR + #define CODE_IMAGE_STR "tasmota" +#endif + #endif // _TASMOTA_CONFIGURATIONS_H_ diff --git a/tasmota/include/tasmota_configurations_ESP32.h b/tasmota/include/tasmota_configurations_ESP32.h index 69de06a24..e6ba3e188 100644 --- a/tasmota/include/tasmota_configurations_ESP32.h +++ b/tasmota/include/tasmota_configurations_ESP32.h @@ -31,8 +31,9 @@ #ifdef FIRMWARE_SAFEBOOT -#undef CODE_IMAGE_STR -#define CODE_IMAGE_STR "safeboot" +#ifndef CODE_IMAGE_STR + #define CODE_IMAGE_STR "safeboot" +#endif #undef FIRMWARE_LITE // Disable tasmota-lite with no sensors #undef FIRMWARE_SENSORS // Disable tasmota-sensors with useful sensors enabled @@ -194,8 +195,9 @@ #ifdef FIRMWARE_WEBCAM -#undef CODE_IMAGE_STR -#define CODE_IMAGE_STR "webcam" +#ifndef CODE_IMAGE_STR + #define CODE_IMAGE_STR "webcam" +#endif #define USE_WEBCAM #define ENABLE_RTSPSERVER @@ -238,8 +240,9 @@ #ifdef FIRMWARE_BLUETOOTH -#undef CODE_IMAGE_STR -#define CODE_IMAGE_STR "bluetooth" +#ifndef CODE_IMAGE_STR + #define CODE_IMAGE_STR "bluetooth" +#endif #undef MODULE #define MODULE WEMOS // [Module] Select default module from tasmota_template.h @@ -275,8 +278,9 @@ #ifdef FIRMWARE_LVGL -#undef CODE_IMAGE_STR -#define CODE_IMAGE_STR "lvgl-haspmota" +#ifndef CODE_IMAGE_STR + #define CODE_IMAGE_STR "lvgl-haspmota" +#endif #undef MODULE #define MODULE WEMOS // [Module] Select default module from tasmota_template.h @@ -472,8 +476,9 @@ #ifdef FIRMWARE_ZBBRDGPRO -#undef CODE_IMAGE_STR -#define CODE_IMAGE_STR "zbbrdgpro" +#ifndef CODE_IMAGE_STR + #define CODE_IMAGE_STR "zbbrdgpro" +#endif #undef MODULE #define MODULE WEMOS // [Module] Select default module from tasmota_template.h @@ -522,8 +527,9 @@ #ifdef FIRMWARE_NSPANEL -#undef CODE_IMAGE_STR -#define CODE_IMAGE_STR "nspanel" +#ifndef CODE_IMAGE_STR + #define CODE_IMAGE_STR "nspanel" +#endif #undef MODULE #define MODULE WEMOS // [Module] Select default module from tasmota_template.h @@ -541,6 +547,10 @@ #ifdef FIRMWARE_TASMOTA32 +#ifndef CODE_IMAGE_STR + #define CODE_IMAGE_STR "tasmota32" +#endif + #define USE_INFLUXDB // Enable influxdb support (+5k code) #define USE_ENHANCED_GUI_WIFI_SCAN