diff --git a/src/platform/smart_leds_lib.rs b/src/platform/smart_leds_lib.rs index f6ca3ec..83a5e50 100644 --- a/src/platform/smart_leds_lib.rs +++ b/src/platform/smart_leds_lib.rs @@ -69,7 +69,9 @@ impl>, S: Surface, const PIXEL_NUM: usize> Dis fn end_frame(&mut self) { let b = brightness_for_mw(self.pixbuf.as_milliwatts(), 255, self.max_mw); - let _ = self.target.write(brightness(self.pixbuf.iter().cloned(), b)); + if let Err(_) = self.target.write(brightness(self.pixbuf.iter().cloned(), b).map(|x| { rgb::Bgr::new(x.r, x.g, x.b)})) { + panic!("Could not write frame"); + } } fn render_frame(&mut self) {