mirror of https://github.com/arendst/Tasmota.git
Add ability to define more subversions in user overrides and remove ram/flash usage to store all versions.
This commit is contained in:
parent
4a44b9fc5f
commit
2e89370f1e
|
@ -31,6 +31,7 @@
|
|||
\*********************************************************************************************/
|
||||
|
||||
#define CODE_IMAGE 0
|
||||
#define CODE_IMAGE_STR "tasmota"
|
||||
|
||||
#define USE_LIGHT // Enable light control
|
||||
#define USE_ENERGY_SENSOR // Use energy sensors (+14k code)
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
// Structs
|
||||
#include "settings.h"
|
||||
|
||||
const char kCodeImage[] PROGMEM = "tasmota|minimal|sensors|knx|lite|display|ir";
|
||||
const char my_image[] PROGMEM = "(" CODE_IMAGE_STR ")";
|
||||
|
||||
/*********************************************************************************************\
|
||||
* Global variables
|
||||
|
@ -159,7 +159,6 @@ myio my_module; // Active copy of Module GPIOs (17 x
|
|||
gpio_flag my_module_flag; // Active copy of Template GPIO flags
|
||||
StateBitfield global_state; // Global states (currently Wifi and Mqtt) (8 bits)
|
||||
char my_version[33]; // Composed version string
|
||||
char my_image[33]; // Code image and/or commit
|
||||
char my_hostname[33]; // Composed Wifi hostname
|
||||
char mqtt_client[TOPSZ]; // Composed MQTT Clientname
|
||||
char mqtt_topic[TOPSZ]; // Composed MQTT topic
|
||||
|
@ -200,8 +199,6 @@ void setup(void)
|
|||
if (VERSION & 0xff) { // Development or patched version 6.3.0.10
|
||||
snprintf_P(my_version, sizeof(my_version), PSTR("%s.%d"), my_version, VERSION & 0xff);
|
||||
}
|
||||
char code_image[20];
|
||||
snprintf_P(my_image, sizeof(my_image), PSTR("(%s)"), GetTextIndexed(code_image, sizeof(code_image), CODE_IMAGE, kCodeImage));
|
||||
|
||||
SettingsLoad();
|
||||
SettingsDelta();
|
||||
|
|
|
@ -79,6 +79,8 @@ extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack
|
|||
|
||||
#undef CODE_IMAGE
|
||||
#define CODE_IMAGE 2
|
||||
#undef CODE_IMAGE_STR
|
||||
#define CODE_IMAGE_STR "sensors"
|
||||
|
||||
#undef USE_DISCOVERY // Disable mDNS (+8k code or +23.5k code with core 2_5_x, +0.3k mem)
|
||||
|
||||
|
@ -228,6 +230,8 @@ extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack
|
|||
|
||||
#undef CODE_IMAGE
|
||||
#define CODE_IMAGE 3
|
||||
#undef CODE_IMAGE_STR
|
||||
#define CODE_IMAGE_STR "knx"
|
||||
|
||||
#ifndef USE_KNX
|
||||
#define USE_KNX // Enable KNX IP Protocol Support (+23k code, +3k3 mem)
|
||||
|
@ -248,6 +252,8 @@ extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack
|
|||
|
||||
#undef CODE_IMAGE
|
||||
#define CODE_IMAGE 5
|
||||
#undef CODE_IMAGE_STR
|
||||
#define CODE_IMAGE_STR "display"
|
||||
|
||||
#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)
|
||||
|
@ -313,6 +319,8 @@ extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack
|
|||
|
||||
#undef CODE_IMAGE
|
||||
#define CODE_IMAGE 6
|
||||
#undef CODE_IMAGE_STR
|
||||
#define CODE_IMAGE_STR "ir"
|
||||
|
||||
#undef USE_EMULATION
|
||||
#undef USE_EMULATION_HUE // Disable Hue emulation - only for lights and relays
|
||||
|
@ -406,6 +414,8 @@ extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack
|
|||
|
||||
#undef CODE_IMAGE
|
||||
#define CODE_IMAGE 4
|
||||
#undef CODE_IMAGE_STR
|
||||
#define CODE_IMAGE_STR "lite"
|
||||
|
||||
#undef APP_SLEEP
|
||||
#define APP_SLEEP 1 // Default to sleep = 1 for FIRMWARE_LITE
|
||||
|
@ -511,6 +521,8 @@ extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack
|
|||
|
||||
#undef CODE_IMAGE
|
||||
#define CODE_IMAGE 1
|
||||
#undef CODE_IMAGE_STR
|
||||
#define CODE_IMAGE_STR "minimal"
|
||||
|
||||
#undef FIRMWARE_LITE // Disable tasmota-lite with no sensors
|
||||
#undef FIRMWARE_SENSORS // Disable tasmota-sensors with useful sensors enabled
|
||||
|
|
Loading…
Reference in New Issue