Fix brightness setting ignoring the first 6 leds

Fixes #230
This commit is contained in:
Ivan Voskoboinyk
2022-07-29 15:29:16 +00:00
parent 14f0693511
commit fbb025875b

View File

@@ -272,7 +272,7 @@ impl CtrlAnime {
/// Write only a data packet. This will modify the leds brightness using the
/// global brightness set in config.
fn write_data_buffer(&self, mut buffer: AnimeDataBuffer) -> Result<(), RogError> {
for led in buffer.data_mut()[7..].iter_mut() {
for led in buffer.data_mut().iter_mut() {
let mut bright = *led as f32 * self.config.brightness;
if bright > 254.0 {
bright = 254.0;