mirror of
https://github.com/xoseperez/espurna.git
synced 2026-03-19 22:57:08 +01:00
light: fix rgb hex parser swapped blue and green values (#2474)
This was causing WebUI colorpicker to jump between positions in rgb mode, after the websocket immediately reported back rgb tuple containing different values
This commit is contained in:
@@ -988,8 +988,8 @@ void _lightFromHexPayload(const char* payload, size_t len) {
|
||||
uint8_t values[4] {0, 0, 0, 0};
|
||||
if (hexDecode(payload, len, values, sizeof(values))) {
|
||||
_light_mapping.red(values[0]);
|
||||
_light_mapping.blue(values[1]);
|
||||
_light_mapping.green(values[2]);
|
||||
_light_mapping.green(values[1]);
|
||||
_light_mapping.blue(values[2]);
|
||||
if (WithBrightness) {
|
||||
lightBrightness(values[3]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user