mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 18:56:38 +00:00
Add hexadecimal RGB color entry on RGBCW leds
5.12.0i * Add hexadecimal RGB color entry on RGBCW leds (#2304)
This commit is contained in:
parent
883fa4ce8d
commit
dd59560200
@ -7,6 +7,7 @@
|
||||
* Add Home Assistant MQTT Discovery for Buttons and change SetOption19 response (#2277)
|
||||
* Add support for SGP30 gas and air quality sensor (#2307)
|
||||
* Add multiple color entry support for command Led like Led2 120000 001200 000012 setting led2 as Red, Led3 as Green and Led4 as Blue (#2303)
|
||||
* Add hexadecimal RGB color entry on RGBCW leds (#2304)
|
||||
* Change webpage parameter communication
|
||||
* Change Timer parameter Device to more obvious Output
|
||||
* Change max number of commands in Backlog from 15 to 30 and ignore commands overflowing
|
||||
|
@ -991,11 +991,10 @@ boolean LightColorEntry(char *buffer, uint8_t buffer_length)
|
||||
light_entry_color[i++] = atoi(str);
|
||||
}
|
||||
}
|
||||
// entry_type = (light_subtype == i) ? 2 : 0; // Decimal
|
||||
entry_type = 2; // Decimal
|
||||
}
|
||||
else if ((2 * light_subtype) == buffer_length) { // Hexadecimal entry
|
||||
for (byte i = 0; i < light_subtype; i++) {
|
||||
else if (((2 * light_subtype) == buffer_length) || (buffer_length > 3)) { // Hexadecimal entry
|
||||
for (byte i = 0; i < buffer_length / 2; i++) {
|
||||
strlcpy(scolor, buffer + (i *2), 3);
|
||||
light_entry_color[i] = (uint8_t)strtol(scolor, &p, 16);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user