diff --git a/src/main.rs b/src/main.rs index 204b252..3489ca9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,7 +7,7 @@ use rs_ws281x::{RawColor, Controller, ControllerBuilder, ChannelBuilder, StripTy use std::{thread, time}; pub const LED_SIZE: usize = 450; //450 -pub const BRIGHTNESS: u8 = 150; +pub const BRIGHTNESS: u8 = 100; pub const LOOP_WAIT: u64 = 250; fn main() { @@ -35,7 +35,7 @@ fn main() { //pattern parsing let mul_string = format_multiline(concat!( - "val 0 0 255\n", + "val 0 0 0\n", "val r 255" )); let res: Result>, ParseError> = mul_string.iter() @@ -51,9 +51,11 @@ fn main() { //pattern management loop { thread::sleep(time::Duration::from_millis(LOOP_WAIT)); + let c_lock = Arc::clone(&lock); + let mut lights = c_lock.write().unwrap(); for p in &pattern { - let c_lock = Arc::clone(&lock); - let mut lights = c_lock.write().unwrap(); + //let c_lock = Arc::clone(&lock); + //let mut lights = c_lock.write().unwrap(); p.execute(&mut lights); } }