diff --git a/firmware/rust1/src/bin/heizung.rs b/firmware/rust1/src/bin/heizung.rs index 6b1fc1e004b94e9b54e22781a4aa359c32383bb5..b3b46b766da7aa1056a80af0774266a0e0955634 100644 --- a/firmware/rust1/src/bin/heizung.rs +++ b/firmware/rust1/src/bin/heizung.rs @@ -332,7 +332,6 @@ async fn reset_soon(delay: Duration) { /// Input a value 0 to 255 to get a color value /// The colours are a transition r - g - b - back to r. fn wheel(mut wheel_pos: u8) -> RGB8 { - //return (0, 255, 0).into(); wheel_pos = 255 - wheel_pos; if wheel_pos < 85 { return (255 - wheel_pos * 3, 0, wheel_pos * 3).into(); @@ -368,7 +367,9 @@ async fn ws2812_task(pio: PIO1, pin: PIN_2, dma: DMA_CH3) { for j in 0..(256 * 5) { //debug!("New Colors:"); for i in 0..NUM_LEDS { - data[i] = wheel((((i * 256) as u16 / NUM_LEDS as u16 + j as u16) & 255) as u8); + let mut color = wheel((((i * 256) as u16 / NUM_LEDS as u16 + j as u16) & 255) as u8); + color /= 8; + data[i] = color; //debug!("R: {} G: {} B: {}", data[i].r, data[i].g, data[i].b); } ws2812.write(&data).await;