From f4ea26749c375fea612be71ff8ce646e4d28ee84 Mon Sep 17 00:00:00 2001 From: Paul C Diem Date: Sun, 19 Apr 2020 08:19:05 -0500 Subject: [PATCH] Fix fixed color bug introduced by pallete code --- tasmota/xdrv_04_light.ino | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tasmota/xdrv_04_light.ino b/tasmota/xdrv_04_light.ino index 1c5751829..70d5b06d5 100644 --- a/tasmota/xdrv_04_light.ino +++ b/tasmota/xdrv_04_light.ino @@ -2384,9 +2384,6 @@ bool LightColorEntry(char *buffer, uint32_t buffer_length) } } else { value = atoi(buffer); -#ifdef USE_LIGHT_PALETTE - value--; -#endif // USE_LIGHT_PALETTE } #ifdef USE_LIGHT_PALETTE if (Light.palette_count) value = value % Light.palette_count; @@ -2417,6 +2414,7 @@ bool LightColorEntry(char *buffer, uint32_t buffer_length) } #ifdef USE_LIGHT_PALETTE else if (Light.palette_count) { + value--; Light.wheel = value; memcpy_P(&Light.entry_color, &Light.palette[value * LST_MAX], LST_MAX); entry_type = 1; // Hexadecimal