@ -37,9 +37,9 @@ void LEDChaseEffect::update(void) {
// the first few updates, `pos2` will be out of bounds. Since it's an unsigned integer,
// the first few updates, `pos2` will be out of bounds. Since it's an unsigned integer,
// even when it would have a value below zero, it underflows and so one test is good for
// even when it would have a value below zero, it underflows and so one test is good for
// both ends of the range.
// both ends of the range.
: : LEDControl . setCrgbAt ( pos , { 0 , 0 , 0 } ) ;
: : LEDControl . setCrgbAt ( pos , CRGB ( 0 , 0 , 0 ) ) ;
if ( pos2 < LED_COUNT )
if ( pos2 < LED_COUNT )
: : LEDControl . setCrgbAt ( pos2 , { 0 , 0 , 0 } ) ;
: : LEDControl . setCrgbAt ( pos2 , CRGB ( 0 , 0 , 0 ) ) ;
// Next, we adjust the red light's position. If the direction hasn't changed (the red
// Next, we adjust the red light's position. If the direction hasn't changed (the red
// light isn't out of bounds), we also adjust the blue light's position to match the red
// light isn't out of bounds), we also adjust the blue light's position to match the red
@ -58,9 +58,9 @@ void LEDChaseEffect::update(void) {
// Last, we turn on the LEDs at their new positions. As before, the blue light (pos2) is
// Last, we turn on the LEDs at their new positions. As before, the blue light (pos2) is
// only set if it's in the valid LED range.
// only set if it's in the valid LED range.
: : LEDControl . setCrgbAt ( pos , { 0 , 0 , 255 } ) ;
: : LEDControl . setCrgbAt ( pos , CRGB ( 255 , 0 , 0 ) ) ;
if ( pos2 < LED_COUNT )
if ( pos2 < LED_COUNT )
: : LEDControl . setCrgbAt ( pos2 , { 255 , 0 , 0 } ) ;
: : LEDControl . setCrgbAt ( pos2 , CRGB ( 0 , 0 , 255 ) ) ;
}
}
}
}