This commit is contained in:
jane 2021-12-26 21:49:43 -05:00
parent c781a73d51
commit e22f4fba92
2 changed files with 3 additions and 3 deletions

View file

@ -4,7 +4,7 @@ use rs_ws281x::WS2811Error;
// use std::{thread, time};
pub fn run_lights(controller: &mut Controller, values: &[RawColor; crate::LED_SIZE]) -> Result<(), WS2811Error> {
// println!("Value: {:?}", values[0]);
println!("Value: {:?}", values[0]);
//thread::sleep(time::Duration::from_millis(10));
let channels: Vec<usize> = controller.channels();
let strip = controller.leds_mut(channels[0]);

View file

@ -42,10 +42,10 @@ impl<'a> Pattern<'a> for Value {
for i in 0..crate::LED_SIZE {
let mut color: RawColor = (*values)[i];
if self.r.is_some() {
color[0] = self.r.unwrap();
color[2] = self.r.unwrap();
}
if self.g.is_some() {
color[0] = self.g.unwrap();
color[1] = self.g.unwrap();
}
if self.b.is_some() {
color[0] = self.b.unwrap();