diff --git a/usermods/seven_segment_display_reloaded/library.json b/usermods/seven_segment_display_reloaded/library.json deleted file mode 100644 index fdce8b5360..0000000000 --- a/usermods/seven_segment_display_reloaded/library.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name:": "seven_segment_display_reloaded" -} \ No newline at end of file diff --git a/usermods/seven_segment_display_reloaded/readme.md b/usermods/seven_segment_display_reloaded/readme.md deleted file mode 100644 index 94788df7e4..0000000000 --- a/usermods/seven_segment_display_reloaded/readme.md +++ /dev/null @@ -1,132 +0,0 @@ -# Seven Segment Display Reloaded - -Uses the overlay feature to create a configurable seven segment display. -Optimized for maximum configurability and use with seven segment clocks by parallyze (https://www.instructables.com/member/parallyze/instructables/) -Very loosely based on the existing usermod "seven segment display". - - -## Installation - -Add the compile-time option `-D USERMOD_SSDR` to your `platformio.ini` (or `platformio_override.ini`) or use `#define USERMOD_SSDR` in `my_config.h`. - -For the auto brightness option, the usermod SN_Photoresistor or BH1750_V2 has to be installed as well. See SN_Photoresistor/readme.md or BH1750_V2/readme.md for instructions. - -## Settings -All settings can be controlled via the usermod settings page. -Part of the settings can be controlled through MQTT with a raw payload or through a json request to /json/state. - -### enabled -Enables/disables this usermod - -### inverted -Enables the inverted mode in which the background should be enabled and the digits should be black (LEDs off) - -### Colon-blinking -Enables the blinking colon(s) if they are defined - -### Leading-Zero -Shows the leading zero of the hour if it exists (i.e. shows `07` instead of `7`) - -### enable-auto-brightness -Enables the auto brightness feature. Can be used only when the usermods SN_Photoresistor or BH1750_V2 are installed. - -### auto-brightness-min / auto-brightness-max -The lux value calculated from usermod SN_Photoresistor or BH1750_V2 will be mapped to the values defined here. -The mapping, 0 - 1000 lux, will be mapped to auto-brightness-min and auto-brightness-max - -WLED current protection will override the calculated value if it is too high. - -### Display-Mask -Defines the type of the time/date display. -For example "H:m" (default) -- H - 00-23 hours -- h - 01-12 hours -- k - 01-24 hours -- m - 00-59 minutes -- s - 00-59 seconds -- d - 01-31 day of month -- M - 01-12 month -- y - 21 last two positions of year -- Y - 2021 year -- : for a colon - -### LED-Numbers -- LED-Numbers-Hours -- LED-Numbers-Minutes -- LED-Numbers-Seconds -- LED-Numbers-Colons -- LED-Numbers-Day -- LED-Numbers-Month -- LED-Numbers-Year - -See following example for usage. - - -## Example - -Example of an LED definition: -``` - < A > -/\ /\ -F B -\/ \/ - < G > -/\ /\ -E C -\/ \/ - < D > -``` - -LEDs or Range of LEDs are separated by a comma "," - -Segments are separated by a semicolon ";" and are read as A;B;C;D;E;F;G - -Digits are separated by colon ":" -> A;B;C;D;E;F;G:A;B;C;D;E;F;G - -Ranges are defined as lower to higher (lower first) - -For example, a clock definition for the following clock (https://www.instructables.com/Lazy-7-Quick-Build-Edition/) is - -- hour "59,46;47-48;50-51;52-53;54-55;57-58;49,56:0,13;1-2;4-5;6-7;8-9;11-12;3,10" - -- minute "37-38;39-40;42-43;44,31;32-33;35-36;34,41:21-22;23-24;26-27;28,15;16-17;19-20;18,25" - -or - -- hour "6,7;8,9;11,12;13,0;1,2;4,5;3,10:52,53;54,55;57,58;59,46;47,48;50,51;49,56" - -- minute "15,28;16,17;19,20;21,22;23,24;26,27;18,25:31,44;32,33;35,36;37,38;39,40;42,43;34,41" - -depending on the orientation. - -# Example details: -hour "59,46;47-48;50-51;52-53;54-55;57-58;49,56:0,13;1-2;4-5;6-7;8-9;11-12;3,10" - -there are two digits separated by ":" - -- 59,46;47-48;50-51;52-53;54-55;57-58;49,56 -- 0,13;1-2;4-5;6-7;8-9;11-12;3,10 - -In the first digit, -the **segment A** consists of the LEDs number **59 and 46**., **segment B** consists of the LEDs number **47, 48** and so on - -The second digit starts again with **segment A** and LEDs **0 and 13**, **segment B** consists of the LEDs number **1 and 2** and so on - -### first digit of the hour -- Segment A: 59, 46 -- Segment B: 47, 48 -- Segment C: 50, 51 -- Segment D: 52, 53 -- Segment E: 54, 55 -- Segment F: 57, 58 -- Segment G: 49, 56 - -### second digit of the hour - -- Segment A: 0, 13 -- Segment B: 1, 2 -- Segment C: 4, 5 -- Segment D: 6, 7 -- Segment E: 8, 9 -- Segment F: 11, 12 -- Segment G: 3, 10 diff --git a/usermods/seven_segment_display_reloaded_v2/library.json b/usermods/seven_segment_display_reloaded_v2/library.json new file mode 100644 index 0000000000..9b8e4a4b50 --- /dev/null +++ b/usermods/seven_segment_display_reloaded_v2/library.json @@ -0,0 +1,3 @@ +{ + "name:": "seven_segment_display_reloaded_v2" +} \ No newline at end of file diff --git a/usermods/seven_segment_display_reloaded_v2/readme.md b/usermods/seven_segment_display_reloaded_v2/readme.md new file mode 100644 index 0000000000..c36965c2cf --- /dev/null +++ b/usermods/seven_segment_display_reloaded_v2/readme.md @@ -0,0 +1,281 @@ +# Seven Segment Display Reloaded + +Uses the overlay feature to create a configurable seven segment display. +Optimized for maximum configurability and use with seven segment clocks by [parallyze](https://www.instructables.com/member/parallyze/instructables/). +Very loosely based on the existing usermod "seven segment display". + +## Installation + +Add the compile-time option `-D USERMOD_SSDR` to your `platformio.ini` (or `platformio_override.ini`) or use `#define USERMOD_SSDR` in `my_config.h`. + +# Compiling + +To enable, add `seven_segment_display_reloaded_v2` to your `custom_usermods` (e.g. in `platformio_override.ini`) +```ini +[env:usermod_ssdr_d1_mini] +extends = env:d1_mini +custom_usermods = ${env:d1_mini.custom_usermods} seven_segment_display_reloaded_v2 +``` + +For the auto brightness option, the usermod **SN_Photoresistor** or **BH1750_V2** has to be installed as well. See [SN_Photoresistor/readme.md](SN_Photoresistor/readme.md) or [BH1750_V2/readme.md](BH1750_V2/readme.md) for instructions. + +## Available Compile-Time Parameters + +These parameters can be configured at compile time using `#define` statements in `my_config.h`. The following table summarizes the available options: + +| Parameter | Default Value | Description | +|-----------------------------------|---------------|-------------| +| SSDR_ENABLED | true | Enable SSDR usermod | +| SSDR_ENABLE_AUTO_BRIGHTNESS | false | Enable auto brightness (requires USERMOD_SN_PHOTORESISTOR) | +| SSDR_BRIGHTNESS_MIN | 0 | Minimum brightness value for auto brightness mapping | +| SSDR_BRIGHTNESS_MAX | 128 | Maximum brightness value for auto brightness mapping | +| SSDR_INVERTED | false | Inverted display (background on, digits off) | +| SSDR_COLONBLINK | true | Enable blinking colon(s) | +| SSDR_LEADING_ZERO | false | Show leading zero for hours (e.g., "07" instead of "7") | +| SSDR_DISPLAY_MASK | "H:m" | Display mask for time format (see below) | +| SSDR_HOURS | (see example) | LED definition for hours digits | +| SSDR_MINUTES | (see example) | LED definition for minutes digits | +| SSDR_SECONDS | "" | Reserved for seconds if needed | +| SSDR_COLONS | "266-275" | Segment range for colon separators | +| SSDR_LIGHT | "252-265" | Segment range for light indicator | +| SSDR_DAYS | "" | Reserved for day display if needed | +| SSDR_MONTHS | "" | Reserved for month display if needed | +| SSDR_YEARS | "" | Reserved for year display if needed | +| umSSDR_INVERT_AUTO_BRIGHTNESS | false | Invert brightness mapping (maps lux min to brightness max) | +| umSSDR_LUX_MIN | 0 | Minimum lux level for brightness mapping | +| umSSDR_LUX_MAX | 1000 | Maximum lux level for brightness mapping | + +Additionally, the usermod allows overriding the internal LED segment number mapping with the optional macro: +- umSSDR_NUMBERS + +## Settings + +All settings can be controlled via the usermod settings page. +Some settings can also be controlled through MQTT with a raw payload or via a JSON request to `/json/state`. + +### Parameters Controlled in the Settings Page + +- **enabled** + Enables/disables this usermod. + +- **inverted** + Enables the inverted mode in which the background is lit and the digits are off (black). + +- **Colon-blinking** + Enables the blinking colon(s) if they are defined. + +- **Leading-Zero** + Shows a leading zero for hours when applicable (e.g., "07" instead of "7"). + +- **enable-auto-brightness** + Enables the auto brightness feature. This works only when the usermod **SN_Photoresistor** or **BH1750_V2** is installed. + +- **auto-brightness-min / auto-brightness-max** + Maps the lux value from the SN_Photoresistor or BH1750_V2 to brightness values. + The mapping (default: 0–1000 lux) is mapped to the defined auto brightness limits. Note that WLED current protection might override the calculated value if it is too high. + +- **lux-min** + Defines the minimum lux level for brightness mapping. When the lux value is at or below this level, the display brightness is set to the minimum brightness. Default is `0` lux. + +- **lux-max** + Defines the maximum lux level for brightness mapping. When the lux value is at or above this level, the display brightness is set to the maximum brightness. Default is `1000` lux. + +- **invert-auto-brightness** + Inverts the mapping logic for brightness. When enabled (`true`), `lux-min` maps to the maximum brightness and `lux-max` maps to the minimum brightness. When disabled (`false`), `lux-min` maps to the minimum brightness and `lux-max` to the maximum brightness. + +- **Display-Mask** + Defines the layout for the time/date display. For example, `"H:m"` is the default. The mask characters include: + - **H** - 00–23 hours + - **h** - 01–12 hours + - **k** - 01–24 hours + - **m** - 00–59 minutes + - **s** - 00–59 seconds + - **d** - 01–31 day of month + - **M** - 01–12 month + - **y** - Last two digits of year + - **Y** - Full year (e.g., 2021) + - **L** - Light LED indicator + - **:** - Colon separator + +- **LED-Numbers** + LED segment definitions for various parts of the display: + - LED-Numbers-Hours + - LED-Numbers-Minutes + - LED-Numbers-Seconds + - LED-Numbers-Colons + - LED-Numbers-Light + - LED-Numbers-Day + - LED-Numbers-Month + - LED-Numbers-Year + +## Example LED Definitions + +The following is an example of an LED layout for a seven segment display. The diagram below shows the segment positions: + +``` + < A > +/\ /\ +F B +\/ \/ + < G > +/\ /\ +E C +\/ \/ + < D > +``` + +A digit segment can consist of single LED numbers and LED ranges, separated by commas (,) +An example would be 1,3,6-8,23,30-32. In this example the LEDs with the numbers 1,3,6,7,8,23,30,31 and 32 would make up a Segment. +Segments for each digit are separated by semicolons (;) and digits are separated by a colon (:). + +### Example for a Clock Display + +- **Hour Definition Example:** + + 59,46;47-48;50-51;52-53;54-55;57-58;49,56:0,13;1-2;4-5;6-7;8-9;11-12;3,10 + + The definition above represents two digits (separated by ":"): + + **First digit (of the hour):** + - Segment A: 59, 46 + - Segment B: 47, 48 + - Segment C: 50, 51 + - Segment D: 52, 53 + - Segment E: 54, 55 + - Segment F: 57, 58 + - Segment G: 49, 56 + + **Second digit (of the hour):** + - Segment A: 0, 13 + - Segment B: 1, 2 + - Segment C: 4, 5 + - Segment D: 6, 7 + - Segment E: 8, 9 + - Segment F: 11, 12 + - Segment G: 3, 10 + +- **Minute Definition Example:** + + 37-38;39-40;42-43;44,31;32-33;35-36;34,41:21-22;23-24;26-27;28,15;16-17;19-20;18,25 + + (Definitions can be adjusted according to the physical orientation of your LEDs.) + +## Additional Notes + +- **Dynamic Brightness Control:** +Auto brightness is computed using sensor readings from either the SN_Photoresistor or BH1750. The value is mapped between the defined brightness and lux limits, with an option to invert the mapping. + +- **Disabling LED Output:** +A public function `disableOutputFunction(bool state)` is provided to externally disable or enable the LED output. + +## Additional Projects + +### 1. Giant Hidden Shelf Edge Clock + +This project, available on [Thingiverse](https://www.thingiverse.com/thing:4207524), uses a large hidden shelf edge as the display for a clock. If you build the modified clock that also shows 24 hours, use the following settings in your configuration: + +my_config.h Settings: +-------------------------------- + +``` +#define USERMOD_SSDR + +#define umSSDR_ENABLED true // Enable SSDR usermod +#define umSSDR_ENABLE_AUTO_BRIGHTNESS false // Enable auto brightness (requires USERMOD_SN_PHOTORESISTOR) +#define umSSDR_INVERTED false // Inverted display +#define umSSDR_COLONBLINK true // Colon blink enabled +#define umSSDR_LEADING_ZERO false // Leading zero disabled +#define umSSDR_DISPLAY_MASK "H:mL" // Display mask for time format + +// Segment definitions for hours, minutes, seconds, colons, light, days, months, and years +#define umSSDR_HOURS "135-143;126-134;162-170;171-179;180-188;144-152;153-161:198-206;189-197;225-233;234-242;243-251;207-215;216-224" +#define umSSDR_MINUTES "9-17;0-8;36-44;45-53;54-62;18-26;27-35:72-80;63-71;99-107;108-116;117-125;81-89;90-98" +#define umSSDR_SECONDS "" +#define umSSDR_COLONS "266-275" // Segment range for colons +#define umSSDR_LIGHT "252-265" // Segment range for light indicator (added for this project) +#define umSSDR_DAYS "" // Reserved for days if needed +#define umSSDR_MONTHS "" // Reserved for months if needed +#define umSSDR_YEARS "" // Reserved for years if needed + +#define umSSDR_INVERT_AUTO_BRIGHTNESS true +#define umSSDR_LUX_MIN 50 +#define umSSDR_LUX_MAX 1000 + +// Brightness limits +#define umSSDR_BRIGHTNESS_MIN 0 // Minimum brightness +#define umSSDR_BRIGHTNESS_MAX 128 // Maximum brightness +``` + +-------------------------------- + +*Note:* For this project, the `umSSDR_LIGHT` parameter was added to provide a dedicated segment for a light indicator. + +--- + +### 2. EleksTube Retro Glows Analog Nixie Tube Clock (Non-IPS Version) + +The EleksTube project, available at [EleksTube Retro Glows Analog Nixie Tube Clock](https://elekstube.com/products/elekstube-r2-6-bit-electronic-led-luminous-retro-glows-analog-nixie-tube-clock). With the following settings, the SSDR usermod becomes more versatile and can be used with this clock as well: + +my_config.h Settings: +-------------------------------- + +``` +#define umSSDR_ENABLED true // Enable SSDR usermod +#define umSSDR_ENABLE_AUTO_BRIGHTNESS false // Enable auto brightness (requires USERMOD_SN_PHOTORESISTOR) +#define umSSDR_INVERTED false // Inverted display +#define umSSDR_COLONBLINK false // Colon blink disabled +#define umSSDR_LEADING_ZERO true // Leading zero enabled +#define umSSDR_DISPLAY_MASK "H:m:s" // Display mask for time format + +// Segment definitions for hours, minutes, seconds, colons, light, days, months, and years +#define umSSDR_HOURS "20,30;21,31;22,32;23,33;24,34;25,35;26,36;27,37;28,38;29,39:0,10;1,11;2,12;3,13;4,14;5,15;6,16;7,17;8,18;9,19" +#define umSSDR_MINUTES "60,70;61,71;62,72;63,73;64,74;65,75;66,76;67,77;68,78;69,79:40,50;41,51;42,52;43,53;44,54;45,55;46,56;47,57;48,58;49,59" +#define umSSDR_SECONDS "100,110;101,111;102,112;103,113;104,114;105,115;106,116;107,117;108,118;109,119:80,90;81,91;82,92;83,93;84,94;85,95;86,96;87,97;88,98;89,99" +#define umSSDR_COLONS "" // No colon segment mapping needed +#define umSSDR_LIGHT "" // No light indicator defined +#define umSSDR_DAYS "" // Reserved for days if needed +#define umSSDR_MONTHS "" // Reserved for months if needed +#define umSSDR_YEARS "" // Reserved for years if needed + +#define umSSDR_INVERT_AUTO_BRIGHTNESS true +#define umSSDR_LUX_MIN 50 +#define umSSDR_LUX_MAX 1000 + +// Brightness limits +#define umSSDR_BRIGHTNESS_MIN 0 // Minimum brightness +#define umSSDR_BRIGHTNESS_MAX 128 // Maximum brightness + +#define umSSDR_NUMBERS { \ + { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 }, /* 0 */ \ + { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* 1 */ \ + { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 }, /* 2 */ \ + { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, /* 3 */ \ + { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 }, /* 4 */ \ + { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 }, /* 5 */ \ + { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 }, /* 6 */ \ + { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 }, /* 7 */ \ + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }, /* 8 */ \ + { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 }, /* 9 */ \ + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } /* Blank */ \ +} +``` + +### 3. Lazy Clock(s) by paralyze +[Lazy 7 Quick build edition](https://www.instructables.com/Lazy-7-Quick-Build-Edition/). The SSDR usermod can be used to drive this and other clock designs by [paralyze](https://www.instructables.com/member/parallyze/) +For example the Lazy 7 Quick build edition has the following settings - depending on the orientation. + +- hour "59,46;47-48;50-51;52-53;54-55;57-58;49,56:0,13;1-2;4-5;6-7;8-9;11-12;3,10" + +- minute "37-38;39-40;42-43;44,31;32-33;35-36;34,41:21-22;23-24;26-27;28,15;16-17;19-20;18,25" + +or + +- hour "6,7;8,9;11,12;13,0;1,2;4,5;3,10:52,53;54,55;57,58;59,46;47,48;50,51;49,56" + +- minute "15,28;16,17;19,20;21,22;23,24;26,27;18,25:31,44;32,33;35,36;37,38;39,40;42,43;34,41" + +-------------------------------- + +With these modifications, the SSDR usermod becomes even more versatile, allowing it to be used on a wide variety of segment clocks and projects. + +*Note:* The ability to override the LED segment mapping via `umSSDR_NUMBERS` provides additional flexibility for adapting to different physical displays. diff --git a/usermods/seven_segment_display_reloaded/seven_segment_display_reloaded.cpp b/usermods/seven_segment_display_reloaded_v2/seven_segment_display_reloaded_v2.cpp similarity index 57% rename from usermods/seven_segment_display_reloaded/seven_segment_display_reloaded.cpp rename to usermods/seven_segment_display_reloaded_v2/seven_segment_display_reloaded_v2.cpp index 971a80c8d7..6a67b3a32d 100644 --- a/usermods/seven_segment_display_reloaded/seven_segment_display_reloaded.cpp +++ b/usermods/seven_segment_display_reloaded_v2/seven_segment_display_reloaded_v2.cpp @@ -12,24 +12,51 @@ class UsermodSSDR : public Usermod { //Runtime variables. unsigned long umSSDRLastRefresh = 0; unsigned long umSSDRResfreshTime = 3000; - bool umSSDRDisplayTime = false; - bool umSSDRInverted = false; - bool umSSDRColonblink = true; - bool umSSDRLeadingZero = false; - bool umSSDREnableLDR = false; - String umSSDRHours = ""; - String umSSDRMinutes = ""; - String umSSDRSeconds = ""; - String umSSDRColons = ""; - String umSSDRDays = ""; - String umSSDRMonths = ""; - String umSSDRYears = ""; uint16_t umSSDRLength = 0; - uint16_t umSSDRBrightnessMin = 0; - uint16_t umSSDRBrightnessMax = 255; - bool* umSSDRMask = 0; + // Configurable settings for the SSDR Usermod + // Enabled usermod + #ifndef umSSDR_ENABLED + #define umSSDR_ENABLED false + #endif + + #ifndef umSSDR_ENABLE_AUTO_BRIGHTNESS + #define umSSDR_ENABLE_AUTO_BRIGHTNESS false + #endif + + #ifndef umSSDR_BRIGHTNESS_MIN + #define umSSDR_BRIGHTNESS_MIN 0 + #endif + + #ifndef umSSDR_BRIGHTNESS_MAX + #define umSSDR_BRIGHTNESS_MAX 255 + #endif + + #ifndef umSSDR_INVERT_AUTO_BRIGHTNESS + #define umSSDR_INVERT_AUTO_BRIGHTNESS false + #endif + + #ifndef umSSDR_LUX_MIN + #define umSSDR_LUX_MIN 0 + #endif + #ifndef umSSDR_LUX_MAX + #define umSSDR_LUX_MAX 1000 + #endif + + #ifndef umSSDR_INVERTED + #define umSSDR_INVERTED false + #endif + + #ifndef umSSDR_COLONBLINK + #define umSSDR_COLONBLINK true + #endif + + #ifndef umSSDR_LEADING_ZERO + #define umSSDR_LEADING_ZERO false + #endif + + // Display mask for physical layout /*// H - 00-23 hours // h - 01-12 hours // k - 01-24 hours @@ -39,43 +66,112 @@ class UsermodSSDR : public Usermod { // M - 01-12 month // y - 21 last two positions of year // Y - 2021 year + // L - Light LED + // This option defines a separate LED (or set of LEDs) that can be controlled independently + // from the other clock display LEDs. It can be switched on or off to provide additional + // lighting for the display or serve as an ambient light source, without affecting the + // clock's visual display of time and date. // : for a colon */ - String umSSDRDisplayMask = "H:m"; //This should reflect physical equipment. + + #ifndef umSSDR_DISPLAY_MASK + #define umSSDR_DISPLAY_MASK "H:m" + #endif - /* Segment order, seen from the front: + #ifndef umSSDR_HOURS + #define umSSDR_HOURS "" + #endif - < A > - /\ /\ - F B - \/ \/ - < G > - /\ /\ - E C - \/ \/ - < D > + #ifndef umSSDR_MINUTES + #define umSSDR_MINUTES "" + #endif - */ + #ifndef umSSDR_SECONDS + #define umSSDR_SECONDS "" + #endif - uint8_t umSSDRNumbers[11][7] = { - // A B C D E F G - { 1, 1, 1, 1, 1, 1, 0 }, // 0 - { 0, 1, 1, 0, 0, 0, 0 }, // 1 - { 1, 1, 0, 1, 1, 0, 1 }, // 2 - { 1, 1, 1, 1, 0, 0, 1 }, // 3 - { 0, 1, 1, 0, 0, 1, 1 }, // 4 - { 1, 0, 1, 1, 0, 1, 1 }, // 5 - { 1, 0, 1, 1, 1, 1, 1 }, // 6 - { 1, 1, 1, 0, 0, 0, 0 }, // 7 - { 1, 1, 1, 1, 1, 1, 1 }, // 8 - { 1, 1, 1, 1, 0, 1, 1 }, // 9 - { 0, 0, 0, 0, 0, 0, 0 } // blank - }; + #ifndef umSSDR_COLONS + #define umSSDR_COLONS "" + #endif + #ifndef umSSDR_LIGHT + #define umSSDR_LIGHT "" + #endif + + #ifndef umSSDR_DAYS + #define umSSDR_DAYS "" + #endif + + #ifndef umSSDR_MONTHS + #define umSSDR_MONTHS "" + #endif + + #ifndef umSSDR_YEARS + #define umSSDR_YEARS "" + #endif + + #ifndef umSSDR_NUMBERS + /* Segment order, seen from the front: + < A > + /\ /\ + F B + \/ \/ + < G > + /\ /\ + E C + \/ \/ + < D > + */ + uint8_t umSSDRNumbers[11][7] = { + // A B C D E F G + { 1, 1, 1, 1, 1, 1, 0 }, // 0 + { 0, 1, 1, 0, 0, 0, 0 }, // 1 + { 1, 1, 0, 1, 1, 0, 1 }, // 2 + { 1, 1, 1, 1, 0, 0, 1 }, // 3 + { 0, 1, 1, 0, 0, 1, 1 }, // 4 + { 1, 0, 1, 1, 0, 1, 1 }, // 5 + { 1, 0, 1, 1, 1, 1, 1 }, // 6 + { 1, 1, 1, 0, 0, 0, 0 }, // 7 + { 1, 1, 1, 1, 1, 1, 1 }, // 8 + { 1, 1, 1, 1, 0, 1, 1 }, // 9 + { 0, 0, 0, 0, 0, 0, 0 } // blank + }; + #else + uint8_t umSSDRNumbers[11][10] = umSSDR_NUMBERS; + #endif + + bool umSSDRDisplayTime = umSSDR_ENABLED; + bool umSSDREnableLDR = umSSDR_ENABLE_AUTO_BRIGHTNESS; + uint16_t umSSDRBrightnessMin = umSSDR_BRIGHTNESS_MIN; + uint16_t umSSDRBrightnessMax = umSSDR_BRIGHTNESS_MAX; + bool umSSDRInvertAutoBrightness = umSSDR_INVERT_AUTO_BRIGHTNESS; + uint16_t umSSDRLuxMin = umSSDR_LUX_MIN; + uint16_t umSSDRLuxMax = umSSDR_LUX_MAX; + bool umSSDRInverted = umSSDR_INVERTED; + bool umSSDRColonblink = umSSDR_COLONBLINK; + bool umSSDRLeadingZero = umSSDR_LEADING_ZERO; + String umSSDRDisplayMask = umSSDR_DISPLAY_MASK; + String umSSDRHours = umSSDR_HOURS; + String umSSDRMinutes = umSSDR_MINUTES; + String umSSDRSeconds = umSSDR_SECONDS; + String umSSDRColons = umSSDR_COLONS; + String umSSDRLight = umSSDR_LIGHT; + String umSSDRDays = umSSDR_DAYS; + String umSSDRMonths = umSSDR_MONTHS; + String umSSDRYears = umSSDR_YEARS; + + bool* umSSDRMask = 0; + bool disableUmLedControl = false; + //String to reduce flash memory usage static const char _str_name[]; - static const char _str_ldrEnabled[]; static const char _str_timeEnabled[]; + static const char _str_ldrEnabled[]; + static const char _str_minBrightness[]; + static const char _str_maxBrightness[]; + static const char _str_luxMin[]; + static const char _str_luxMax[]; + static const char _str_invertAutoBrightness[]; static const char _str_inverted[]; static const char _str_colonblink[]; static const char _str_leadingZero[]; @@ -84,11 +180,10 @@ class UsermodSSDR : public Usermod { static const char _str_minutes[]; static const char _str_seconds[]; static const char _str_colons[]; + static const char _str_light[]; static const char _str_days[]; static const char _str_months[]; static const char _str_years[]; - static const char _str_minBrightness[]; - static const char _str_maxBrightness[]; #ifdef USERMOD_SN_PHOTORESISTOR Usermod_SN_Photoresistor *ptr; @@ -104,6 +199,7 @@ class UsermodSSDR : public Usermod { void _overlaySevenSegmentDraw() { int displayMaskLen = static_cast(umSSDRDisplayMask.length()); bool colonsDone = false; + bool lightDone = false; _setAllFalse(); for (int index = 0; index < displayMaskLen; index++) { int timeVar = 0; @@ -150,6 +246,12 @@ class UsermodSSDR : public Usermod { colonsDone = true; } break; + case 'L': + if (!lightDone) { // only call _showElements once + _showElements(&umSSDRLight, 0, 1, 0); + lightDone = true; + } + break; } } _setMaskToLeds(); @@ -165,9 +267,7 @@ class UsermodSSDR : public Usermod { } } - void _showElements(String *map, int timevar, bool isColon, bool removeZero - -) { + void _showElements(String *map, int timevar, bool isColon, bool removeZero) { if ((map != nullptr) && (*map != nullptr) && !(*map).equals("")) { int length = String(timevar).length(); bool addZero = false; @@ -179,13 +279,13 @@ class UsermodSSDR : public Usermod { if(addZero) { if(removeZero) { - timeArr[1] = 10; timeArr[0] = timevar; + timeArr[1] = 10; } else { - timeArr[1] = 0; timeArr[0] = timevar; + timeArr[1] = 0; } } else { int count = 0; @@ -196,7 +296,6 @@ class UsermodSSDR : public Usermod { }; } - int colonsLen = static_cast((*map).length()); int count = 0; int countSegments = 0; @@ -275,21 +374,29 @@ class UsermodSSDR : public Usermod { void _publishMQTTint_P(const char *subTopic, int value) { - if(mqtt == NULL) return; - - char buffer[64]; - char valBuffer[12]; - sprintf_P(buffer, PSTR("%s/%S/%S"), mqttDeviceTopic, _str_name, subTopic); - sprintf_P(valBuffer, PSTR("%d"), value); - mqtt->publish(buffer, 2, true, valBuffer); + #ifndef WLED_DISABLE_MQTT + if (WLED_MQTT_CONNECTED) { + if(mqtt == NULL) return; + + char buffer[64]; + char valBuffer[12]; + sprintf_P(buffer, PSTR("%s/%S/%S"), mqttDeviceTopic, _str_name, subTopic); + sprintf_P(valBuffer, PSTR("%d"), value); + mqtt->publish(buffer, 2, true, valBuffer); + } + #endif } void _publishMQTTstr_P(const char *subTopic, String Value) { - if(mqtt == NULL) return; - char buffer[64]; - sprintf_P(buffer, PSTR("%s/%S/%S"), mqttDeviceTopic, _str_name, subTopic); - mqtt->publish(buffer, 2, true, Value.c_str(), Value.length()); + #ifndef WLED_DISABLE_MQTT + if (WLED_MQTT_CONNECTED) { + if(mqtt == NULL) return; + char buffer[64]; + sprintf_P(buffer, PSTR("%s/%S/%S"), mqttDeviceTopic, _str_name, subTopic); + mqtt->publish(buffer, 2, true, Value.c_str(), Value.length()); + } + #endif } bool _cmpIntSetting_P(char *topic, char *payload, const char *setting, void *value) @@ -331,6 +438,11 @@ class UsermodSSDR : public Usermod { { _publishMQTTint_P(_str_timeEnabled, umSSDRDisplayTime); _publishMQTTint_P(_str_ldrEnabled, umSSDREnableLDR); + _publishMQTTint_P(_str_minBrightness, umSSDRBrightnessMin); + _publishMQTTint_P(_str_maxBrightness, umSSDRBrightnessMax); + _publishMQTTint_P(_str_luxMin, umSSDRLuxMin); + _publishMQTTint_P(_str_luxMax, umSSDRLuxMax); + _publishMQTTint_P(_str_invertAutoBrightness, umSSDRInvertAutoBrightness); _publishMQTTint_P(_str_inverted, umSSDRInverted); _publishMQTTint_P(_str_colonblink, umSSDRColonblink); _publishMQTTint_P(_str_leadingZero, umSSDRLeadingZero); @@ -339,13 +451,11 @@ class UsermodSSDR : public Usermod { _publishMQTTstr_P(_str_minutes, umSSDRMinutes); _publishMQTTstr_P(_str_seconds, umSSDRSeconds); _publishMQTTstr_P(_str_colons, umSSDRColons); + _publishMQTTstr_P(_str_light, umSSDRLight); _publishMQTTstr_P(_str_days, umSSDRDays); _publishMQTTstr_P(_str_months, umSSDRMonths); _publishMQTTstr_P(_str_years, umSSDRYears); _publishMQTTstr_P(_str_displayMask, umSSDRDisplayMask); - - _publishMQTTint_P(_str_minBrightness, umSSDRBrightnessMin); - _publishMQTTint_P(_str_maxBrightness, umSSDRBrightnessMax); } void _addJSONObject(JsonObject& root) { @@ -356,6 +466,11 @@ class UsermodSSDR : public Usermod { ssdrObj[FPSTR(_str_timeEnabled)] = umSSDRDisplayTime; ssdrObj[FPSTR(_str_ldrEnabled)] = umSSDREnableLDR; + ssdrObj[FPSTR(_str_minBrightness)] = umSSDRBrightnessMin; + ssdrObj[FPSTR(_str_maxBrightness)] = umSSDRBrightnessMax; + ssdrObj[FPSTR(_str_luxMin)] = umSSDRLuxMin; + ssdrObj[FPSTR(_str_luxMax)] = umSSDRLuxMax; + ssdrObj[FPSTR(_str_invertAutoBrightness)] = umSSDRInvertAutoBrightness; ssdrObj[FPSTR(_str_inverted)] = umSSDRInverted; ssdrObj[FPSTR(_str_colonblink)] = umSSDRColonblink; ssdrObj[FPSTR(_str_leadingZero)] = umSSDRLeadingZero; @@ -364,11 +479,10 @@ class UsermodSSDR : public Usermod { ssdrObj[FPSTR(_str_minutes)] = umSSDRMinutes; ssdrObj[FPSTR(_str_seconds)] = umSSDRSeconds; ssdrObj[FPSTR(_str_colons)] = umSSDRColons; + ssdrObj[FPSTR(_str_light)] = umSSDRLight; ssdrObj[FPSTR(_str_days)] = umSSDRDays; ssdrObj[FPSTR(_str_months)] = umSSDRMonths; ssdrObj[FPSTR(_str_years)] = umSSDRYears; - ssdrObj[FPSTR(_str_minBrightness)] = umSSDRBrightnessMin; - ssdrObj[FPSTR(_str_maxBrightness)] = umSSDRBrightnessMax; } public: @@ -403,24 +517,30 @@ class UsermodSSDR : public Usermod { if (!umSSDRDisplayTime || strip.isUpdating()) { return; } - #ifdef USERMOD_SN_PHOTORESISTOR - if(bri != 0 && umSSDREnableLDR && (millis() - umSSDRLastRefresh > umSSDRResfreshTime)) { + #if defined(USERMOD_SN_PHOTORESISTOR) || defined(USERMOD_BH1750) + if(bri != 0 && umSSDREnableLDR && (millis() - umSSDRLastRefresh > umSSDRResfreshTime) && !disableUmLedControl) { + float lux = -1; // Initialize lux with an invalid value + + #ifdef USERMOD_SN_PHOTORESISTOR if (ptr != nullptr) { - uint16_t lux = ptr->getLastLDRValue(); - uint16_t brightness = map(lux, 0, 1000, umSSDRBrightnessMin, umSSDRBrightnessMax); - if (bri != brightness) { - bri = brightness; - stateUpdated(1); - } + lux = ptr->getLastLDRValue(); } - umSSDRLastRefresh = millis(); - } - #endif - #ifdef USERMOD_BH1750 - if(bri != 0 && umSSDREnableLDR && (millis() - umSSDRLastRefresh > umSSDRResfreshTime)) { + #endif + + #ifdef USERMOD_BH1750 if (bh1750 != nullptr) { - float lux = bh1750->getIlluminance(); - uint16_t brightness = map(lux, 0, 1000, umSSDRBrightnessMin, umSSDRBrightnessMax); + lux = bh1750->getIlluminance(); + } + #endif + + if (lux >= 0) { // Ensure we got a valid lux value + uint16_t brightness; + if (!umSSDRInvertAutoBrightness) { + brightness = map(lux, umSSDRLuxMin, umSSDRLuxMax, umSSDRBrightnessMin, umSSDRBrightnessMax); + } else { + brightness = map(lux, umSSDRLuxMin, umSSDRLuxMax, umSSDRBrightnessMax, umSSDRBrightnessMin); + } + if (bri != brightness) { DEBUG_PRINTF("Adjusting brightness based on lux value: %.2f lx, new brightness: %d\n", lux, brightness); bri = brightness; @@ -433,11 +553,16 @@ class UsermodSSDR : public Usermod { } void handleOverlayDraw() { - if (umSSDRDisplayTime) { + if (umSSDRDisplayTime && !disableUmLedControl) { _overlaySevenSegmentDraw(); } } + //Can be used outside of this usermod + void disableOutputFunction(bool state) { + this->disableUmLedControl = state; + } + /* * addToJsonInfo() can be used to add custom entries to the /json/info part of the JSON API. * Creating an "u" object allows you to add custom key/value pairs to the Info section of the WLED web UI. @@ -448,17 +573,30 @@ class UsermodSSDR : public Usermod { if (user.isNull()) { user = root.createNestedObject(F("u")); } - JsonArray enabled = user.createNestedArray("Time enabled"); - enabled.add(umSSDRDisplayTime); - JsonArray invert = user.createNestedArray("Time inverted"); - invert.add(umSSDRInverted); - JsonArray blink = user.createNestedArray("Blinking colon"); - blink.add(umSSDRColonblink); - JsonArray zero = user.createNestedArray("Show the hour leading zero"); - zero.add(umSSDRLeadingZero); - JsonArray ldrEnable = user.createNestedArray("Auto Brightness enabled"); - ldrEnable.add(umSSDREnableLDR); - + + // Create a nested array for energy data + JsonArray ssr_json_seperator = user.createNestedArray(F("-----------------------------------")); + + JsonArray ssr_json = user.createNestedArray(F("Seven segment reloaded:")); + + if (!umSSDRDisplayTime) { + ssr_json.add(F("disabled")); // Indicate that the module is disabled + } else { + JsonArray invert = user.createNestedArray("Time inverted"); + invert.add(umSSDRInverted); + + JsonArray blink = user.createNestedArray("Blinking colon"); + blink.add(umSSDRColonblink); + + JsonArray zero = user.createNestedArray("Show hour leading zero"); + zero.add(umSSDRLeadingZero); + + JsonArray ldrEnable = user.createNestedArray(F("Auto Brightness enabled")); + ldrEnable.add(umSSDREnableLDR); + + JsonArray ldrInvert = user.createNestedArray(F("Auto Brightness inverted")); + ldrInvert.add(umSSDRInvertAutoBrightness); + } } /* @@ -483,56 +621,82 @@ class UsermodSSDR : public Usermod { JsonObject ssdrObj = user[FPSTR(_str_name)]; umSSDRDisplayTime = ssdrObj[FPSTR(_str_timeEnabled)] | umSSDRDisplayTime; umSSDREnableLDR = ssdrObj[FPSTR(_str_ldrEnabled)] | umSSDREnableLDR; + umSSDRBrightnessMin = ssdrObj[FPSTR(_str_minBrightness)] | umSSDRBrightnessMin; + umSSDRBrightnessMax = ssdrObj[FPSTR(_str_maxBrightness)] | umSSDRBrightnessMax; + umSSDRLuxMin = ssdrObj[FPSTR(_str_luxMin)] | umSSDRLuxMin; + umSSDRLuxMax = ssdrObj[FPSTR(_str_luxMax)] | umSSDRLuxMax; + umSSDRInvertAutoBrightness = ssdrObj[FPSTR(_str_invertAutoBrightness)] | umSSDRInvertAutoBrightness; umSSDRInverted = ssdrObj[FPSTR(_str_inverted)] | umSSDRInverted; umSSDRColonblink = ssdrObj[FPSTR(_str_colonblink)] | umSSDRColonblink; umSSDRLeadingZero = ssdrObj[FPSTR(_str_leadingZero)] | umSSDRLeadingZero; umSSDRDisplayMask = ssdrObj[FPSTR(_str_displayMask)] | umSSDRDisplayMask; + umSSDRHours = ssdrObj[FPSTR(_str_hours)] | umSSDRHours; + umSSDRMinutes = ssdrObj[FPSTR(_str_minutes)] | umSSDRMinutes; + umSSDRSeconds = ssdrObj[FPSTR(_str_seconds)] | umSSDRSeconds; + umSSDRColons = ssdrObj[FPSTR(_str_colons)] | umSSDRColons; + umSSDRLight = ssdrObj[FPSTR(_str_light)] | umSSDRLight; + umSSDRDays = ssdrObj[FPSTR(_str_days)] | umSSDRDays; + umSSDRMonths = ssdrObj[FPSTR(_str_months)] | umSSDRMonths; + umSSDRYears = ssdrObj[FPSTR(_str_years)] | umSSDRYears; } } void onMqttConnect(bool sessionPresent) { - char subBuffer[48]; - if (mqttDeviceTopic[0] != 0) - { - _updateMQTT(); - //subscribe for sevenseg messages on the device topic - sprintf_P(subBuffer, PSTR("%s/%S/+/set"), mqttDeviceTopic, _str_name); - mqtt->subscribe(subBuffer, 2); + if (!umSSDRDisplayTime) { + return; } + #ifndef WLED_DISABLE_MQTT + if (WLED_MQTT_CONNECTED) { + char subBuffer[48]; + if (mqttDeviceTopic[0] != 0) + { + _updateMQTT(); + //subscribe for sevenseg messages on the device topic + sprintf_P(subBuffer, PSTR("%s/%S/+/set"), mqttDeviceTopic, _str_name); + mqtt->subscribe(subBuffer, 2); + } - if (mqttGroupTopic[0] != 0) - { - //subscribe for sevenseg messages on the group topic - sprintf_P(subBuffer, PSTR("%s/%S/+/set"), mqttGroupTopic, _str_name); - mqtt->subscribe(subBuffer, 2); + if (mqttGroupTopic[0] != 0) + { + //subscribe for sevenseg messages on the group topic + sprintf_P(subBuffer, PSTR("%s/%S/+/set"), mqttGroupTopic, _str_name); + mqtt->subscribe(subBuffer, 2); + } } + #endif } bool onMqttMessage(char *topic, char *payload) { - //If topic begins with sevenSeg cut it off, otherwise not our message. - size_t topicPrefixLen = strlen_P(PSTR("/wledSS/")); - if (strncmp_P(topic, PSTR("/wledSS/"), topicPrefixLen) == 0) { - topic += topicPrefixLen; - } else { - return false; - } - //We only care if the topic ends with /set - size_t topicLen = strlen(topic); - if (topicLen > 4 && - topic[topicLen - 4] == '/' && - topic[topicLen - 3] == 's' && - topic[topicLen - 2] == 'e' && - topic[topicLen - 1] == 't') - { - //Trim /set and handle it - topic[topicLen - 4] = '\0'; - _handleSetting(topic, payload); + #ifndef WLED_DISABLE_MQTT + if (umSSDRDisplayTime) { + //If topic begins with sevenSeg cut it off, otherwise not our message. + size_t topicPrefixLen = strlen_P(PSTR("/wledSS/")); + if (strncmp_P(topic, PSTR("/wledSS/"), topicPrefixLen) == 0) { + topic += topicPrefixLen; + } else { + return false; + } + //We only care if the topic ends with /set + size_t topicLen = strlen(topic); + if (topicLen > 4 && + topic[topicLen - 4] == '/' && + topic[topicLen - 3] == 's' && + topic[topicLen - 2] == 'e' && + topic[topicLen - 1] == 't') + { + //Trim /set and handle it + topic[topicLen - 4] = '\0'; + _handleSetting(topic, payload); + } } return true; + #endif } void addToConfig(JsonObject &root) { _addJSONObject(root); + + _updateMQTT(); } bool readFromConfig(JsonObject &root) { @@ -543,23 +707,25 @@ class UsermodSSDR : public Usermod { DEBUG_PRINTLN(F(": No config found. (Using defaults.)")); return false; } - - umSSDRDisplayTime = (top[FPSTR(_str_timeEnabled)] | umSSDRDisplayTime); - umSSDREnableLDR = (top[FPSTR(_str_ldrEnabled)] | umSSDREnableLDR); - umSSDRInverted = (top[FPSTR(_str_inverted)] | umSSDRInverted); - umSSDRColonblink = (top[FPSTR(_str_colonblink)] | umSSDRColonblink); - umSSDRLeadingZero = (top[FPSTR(_str_leadingZero)] | umSSDRLeadingZero); - - umSSDRDisplayMask = top[FPSTR(_str_displayMask)] | umSSDRDisplayMask; - umSSDRHours = top[FPSTR(_str_hours)] | umSSDRHours; - umSSDRMinutes = top[FPSTR(_str_minutes)] | umSSDRMinutes; - umSSDRSeconds = top[FPSTR(_str_seconds)] | umSSDRSeconds; - umSSDRColons = top[FPSTR(_str_colons)] | umSSDRColons; - umSSDRDays = top[FPSTR(_str_days)] | umSSDRDays; - umSSDRMonths = top[FPSTR(_str_months)] | umSSDRMonths; - umSSDRYears = top[FPSTR(_str_years)] | umSSDRYears; - umSSDRBrightnessMin = top[FPSTR(_str_minBrightness)] | umSSDRBrightnessMin; - umSSDRBrightnessMax = top[FPSTR(_str_maxBrightness)] | umSSDRBrightnessMax; + umSSDRDisplayTime = (top[FPSTR(_str_timeEnabled)] | umSSDRDisplayTime); + umSSDREnableLDR = (top[FPSTR(_str_ldrEnabled)] | umSSDREnableLDR); + umSSDRInverted = (top[FPSTR(_str_inverted)] | umSSDRInverted); + umSSDRColonblink = (top[FPSTR(_str_colonblink)] | umSSDRColonblink); + umSSDRLeadingZero = (top[FPSTR(_str_leadingZero)] | umSSDRLeadingZero); + umSSDRDisplayMask = top[FPSTR(_str_displayMask)] | umSSDRDisplayMask; + umSSDRHours = top[FPSTR(_str_hours)] | umSSDRHours; + umSSDRMinutes = top[FPSTR(_str_minutes)] | umSSDRMinutes; + umSSDRSeconds = top[FPSTR(_str_seconds)] | umSSDRSeconds; + umSSDRColons = top[FPSTR(_str_colons)] | umSSDRColons; + umSSDRLight = top[FPSTR(_str_light)] | umSSDRLight; + umSSDRDays = top[FPSTR(_str_days)] | umSSDRDays; + umSSDRMonths = top[FPSTR(_str_months)] | umSSDRMonths; + umSSDRYears = top[FPSTR(_str_years)] | umSSDRYears; + umSSDRBrightnessMin = top[FPSTR(_str_minBrightness)] | umSSDRBrightnessMin; + umSSDRBrightnessMax = top[FPSTR(_str_maxBrightness)] | umSSDRBrightnessMax; + umSSDRLuxMin = top[FPSTR(_str_luxMin)] | umSSDRLuxMin; + umSSDRLuxMax = top[FPSTR(_str_luxMax)] | umSSDRLuxMax; + umSSDRInvertAutoBrightness = top[FPSTR(_str_invertAutoBrightness)] | umSSDRInvertAutoBrightness; DEBUG_PRINT(FPSTR(_str_name)); DEBUG_PRINTLN(F(" config (re)loaded.")); @@ -585,13 +751,16 @@ const char UsermodSSDR::_str_hours[] PROGMEM = "LED-Numbers-Hours"; const char UsermodSSDR::_str_minutes[] PROGMEM = "LED-Numbers-Minutes"; const char UsermodSSDR::_str_seconds[] PROGMEM = "LED-Numbers-Seconds"; const char UsermodSSDR::_str_colons[] PROGMEM = "LED-Numbers-Colons"; +const char UsermodSSDR::_str_light[] PROGMEM = "LED-Numbers-Light"; const char UsermodSSDR::_str_days[] PROGMEM = "LED-Numbers-Day"; const char UsermodSSDR::_str_months[] PROGMEM = "LED-Numbers-Month"; const char UsermodSSDR::_str_years[] PROGMEM = "LED-Numbers-Year"; const char UsermodSSDR::_str_ldrEnabled[] PROGMEM = "enable-auto-brightness"; const char UsermodSSDR::_str_minBrightness[] PROGMEM = "auto-brightness-min"; const char UsermodSSDR::_str_maxBrightness[] PROGMEM = "auto-brightness-max"; - +const char UsermodSSDR::_str_luxMin[] PROGMEM = "lux-min"; +const char UsermodSSDR::_str_luxMax[] PROGMEM = "lux-max"; +const char UsermodSSDR::_str_invertAutoBrightness[] PROGMEM = "invert-auto-brightness"; static UsermodSSDR seven_segment_display_reloaded; REGISTER_USERMOD(seven_segment_display_reloaded); \ No newline at end of file diff --git a/wled00/const.h b/wled00/const.h index 2b460f3f18..584f47b743 100644 --- a/wled00/const.h +++ b/wled00/const.h @@ -176,7 +176,7 @@ #define USERMOD_ID_SEVEN_SEGMENT_DISPLAY 21 //Usermod "usermod_v2_seven_segment_display.h" #define USERMOD_RGB_ROTARY_ENCODER 22 //Usermod "rgb-rotary-encoder.h" #define USERMOD_ID_QUINLED_AN_PENTA 23 //Usermod "quinled-an-penta.h" -#define USERMOD_ID_SSDR 24 //Usermod "usermod_v2_seven_segment_display_reloaded.h" +#define USERMOD_ID_SSDR 24 //Usermod "seven_segment_display_reloaded_v2.cpp" #define USERMOD_ID_CRONIXIE 25 //Usermod "usermod_cronixie.h" #define USERMOD_ID_WIZLIGHTS 26 //Usermod "wizlights.h" #define USERMOD_ID_WORDCLOCK 27 //Usermod "usermod_v2_word_clock.h"