t2
This commit is contained in:
parent
c781a73d51
commit
e22f4fba92
2 changed files with 3 additions and 3 deletions
|
@ -4,7 +4,7 @@ use rs_ws281x::WS2811Error;
|
||||||
// use std::{thread, time};
|
// use std::{thread, time};
|
||||||
|
|
||||||
pub fn run_lights(controller: &mut Controller, values: &[RawColor; crate::LED_SIZE]) -> Result<(), WS2811Error> {
|
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));
|
//thread::sleep(time::Duration::from_millis(10));
|
||||||
let channels: Vec<usize> = controller.channels();
|
let channels: Vec<usize> = controller.channels();
|
||||||
let strip = controller.leds_mut(channels[0]);
|
let strip = controller.leds_mut(channels[0]);
|
||||||
|
|
|
@ -42,10 +42,10 @@ impl<'a> Pattern<'a> for Value {
|
||||||
for i in 0..crate::LED_SIZE {
|
for i in 0..crate::LED_SIZE {
|
||||||
let mut color: RawColor = (*values)[i];
|
let mut color: RawColor = (*values)[i];
|
||||||
if self.r.is_some() {
|
if self.r.is_some() {
|
||||||
color[0] = self.r.unwrap();
|
color[2] = self.r.unwrap();
|
||||||
}
|
}
|
||||||
if self.g.is_some() {
|
if self.g.is_some() {
|
||||||
color[0] = self.g.unwrap();
|
color[1] = self.g.unwrap();
|
||||||
}
|
}
|
||||||
if self.b.is_some() {
|
if self.b.is_some() {
|
||||||
color[0] = self.b.unwrap();
|
color[0] = self.b.unwrap();
|
||||||
|
|
Loading…
Reference in a new issue