application: fix overflow warning
This commit is contained in:
parent
937c9fd25c
commit
901e5468e8
|
@ -360,7 +360,7 @@ static void clock_hours(void)
|
|||
for (uint16_t i=0; i<512; i++) { // fade hour marks in and out
|
||||
uint8_t brightness = (i>255 ? 512-i-1 : i); // get fade brightness
|
||||
for (uint8_t hour=0; hour<12; hour++) { // set all hour colors
|
||||
uint16_t led = LED_WS2812B_LEDS*hour/12; // get LED four hour mark
|
||||
uint16_t led = (uint16_t)(LED_WS2812B_LEDS*hour)/12; // get LED four hour mark
|
||||
clock_leds[led*3+0] = brightness; // set brightness
|
||||
clock_leds[led*3+1] = brightness; // set brightness
|
||||
clock_leds[led*3+2] = brightness; // set brightness
|
||||
|
|
Loading…
Reference in New Issue