mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-28 05:06:32 +00:00
Fix WS2812 StepPixels range check
This commit is contained in:
parent
3cb48f1f08
commit
e1c88eb5e1
@ -667,8 +667,8 @@ void CmndPixels(void)
|
|||||||
|
|
||||||
void CmndStepPixels(void)
|
void CmndStepPixels(void)
|
||||||
{
|
{
|
||||||
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= WS2812_MAX_LEDS)) {
|
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= 255)) {
|
||||||
Settings->light_step_pixels = XdrvMailbox.payload;
|
Settings->light_step_pixels = (XdrvMailbox.payload > WS2812_MAX_LEDS) ? WS2812_MAX_LEDS : XdrvMailbox.payload;
|
||||||
Ws2812Clear();
|
Ws2812Clear();
|
||||||
Light.update = true;
|
Light.update = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user