diff --git a/firmware/20230519_firmware.ino.bin b/firmware/20230519_firmware.ino.bin index fc01ed4..92f5f18 100644 Binary files a/firmware/20230519_firmware.ino.bin and b/firmware/20230519_firmware.ino.bin differ diff --git a/firmware/20230519_firmware.spiffs.bin b/firmware/20230519_firmware.spiffs.bin index 21f8694..ad0fb9f 100644 Binary files a/firmware/20230519_firmware.spiffs.bin and b/firmware/20230519_firmware.spiffs.bin differ diff --git a/firmware/20230519_firmware_dev.ino.bin b/firmware/20230519_firmware_dev.ino.bin index 6538497..c5cae4e 100644 Binary files a/firmware/20230519_firmware_dev.ino.bin and b/firmware/20230519_firmware_dev.ino.bin differ diff --git a/firmware/config.h b/firmware/config.h index 34cf6bb..6ff048b 100644 --- a/firmware/config.h +++ b/firmware/config.h @@ -1,4 +1,6 @@ +#define VERSION_STR "2.0.0" + #define USE_STATIC_IP //! uncomment to enable Static IP Adress #define SERIAL_BAUD_RATE 115200 @@ -7,7 +9,8 @@ //#define DEVELOPMENT -#define LIGHT_NAME_STR "Lumini/Lominie Pixie30/P30 light control" // default light name +#define LIGHT_NAME "Lumini/Lominie Pixie30/P30 light control" // default light name +#define LIGHT_NAME_DEV_POSTFIX " (DEV)" #define LIGHTS_COUNT 4 // do not modify because luminie p30 only has 4 channel, never set above 80 diff --git a/firmware/data/index_template_bottom.html b/firmware/data/index_template_bottom.html index 98b621e..985a4fd 100644 --- a/firmware/data/index_template_bottom.html +++ b/firmware/data/index_template_bottom.html @@ -25,5 +25,6 @@ +

{{VERSION_STR}}

diff --git a/firmware/data/index_template_top.html b/firmware/data/index_template_top.html index 5deb421..551633c 100644 --- a/firmware/data/index_template_top.html +++ b/firmware/data/index_template_top.html @@ -14,7 +14,7 @@
-

{{LIGHT_NAME}}

+

{{LIGHT_NAME}}{{LIGHT_NAME_DEV_POSTFIX}}

diff --git a/firmware/firmware.ino b/firmware/firmware.ino index 9b93a75..61042be 100644 --- a/firmware/firmware.ino +++ b/firmware/firmware.ino @@ -13,12 +13,6 @@ //********* preprocessor block *********// -#ifdef DEVELOPMENT -#define LIGHT_NAME "Lumini/Lominie Pixie30/P30 light control (DEV)" -#else -#define LIGHT_NAME LIGHT_NAME_STR -#endif - //********* Config block *********// // blue, warmwhite, purple, white&red&green @@ -39,7 +33,7 @@ IPAddress dns (192, 168, 0, 1); //********************************// -#define LIGHT_VERSION 2.1 +#define LIGHT_VERSION 2.1 // diyHue light version #define LAST_STATE_STARTUP_LIGHT_LAST_STATE 0 #define LAST_STATE_STARTUP_LIGHT_ON_STATE 1 diff --git a/firmware/html/index_template_bottom.html b/firmware/html/index_template_bottom.html index ba771d0..1447848 100644 --- a/firmware/html/index_template_bottom.html +++ b/firmware/html/index_template_bottom.html @@ -28,5 +28,6 @@
+

{{VERSION_STR}}

diff --git a/firmware/html/index_template_top.html b/firmware/html/index_template_top.html index 9392287..72631cd 100644 --- a/firmware/html/index_template_top.html +++ b/firmware/html/index_template_top.html @@ -14,7 +14,7 @@
-

{{LIGHT_NAME}}

+

{{LIGHT_NAME}}{{LIGHT_NAME_DEV_POSTFIX}}

diff --git a/firmware/webserver.ino b/firmware/webserver.ino index 2a550a1..3970b8a 100644 --- a/firmware/webserver.ino +++ b/firmware/webserver.ino @@ -534,7 +534,13 @@ String genLightControlHTML() String replacePlaceholder(String http_content) { + http_content.replace("{{VERSION_STR}}", (String)VERSION_STR); http_content.replace("{{LIGHT_NAME}}", (String)LIGHT_NAME); +#ifdef DEVELOPMENT + http_content.replace("{{LIGHT_NAME_DEV_POSTFIX}}", (String)LIGHT_NAME_DEV_POSTFIX); +#else + http_content.replace("{{LIGHT_NAME_DEV_POSTFIX}}", (String)" "); +#endif http_content.replace("{{LIGHT_COUNT}}", (String)LIGHTS_COUNT);