Compare commits
1 commit
9d39ce125a
...
0c828a8cf1
Author | SHA1 | Date | |
---|---|---|---|
0c828a8cf1 |
1 changed files with 1 additions and 1 deletions
|
@ -32,12 +32,12 @@ fn main() {
|
||||||
});
|
});
|
||||||
loop {
|
loop {
|
||||||
thread::sleep(time::Duration::from_millis(250));
|
thread::sleep(time::Duration::from_millis(250));
|
||||||
let mut lights = lock.write().unwrap();
|
|
||||||
let pattern = format_multiline("val 255 150 0");
|
let pattern = format_multiline("val 255 150 0");
|
||||||
pattern.iter()
|
pattern.iter()
|
||||||
.map(|x: &Vec<String>| parse_line((*x).clone()))
|
.map(|x: &Vec<String>| parse_line((*x).clone()))
|
||||||
.for_each(|res: Result<Box<dyn Pattern>, ParseError>| {
|
.for_each(|res: Result<Box<dyn Pattern>, ParseError>| {
|
||||||
if res.is_ok() {
|
if res.is_ok() {
|
||||||
|
let mut lights = lock.write().unwrap();
|
||||||
res.unwrap().execute(&mut lights);
|
res.unwrap().execute(&mut lights);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue