Move led_writer to a main loop due to strange mpsc behaviour

This commit is contained in:
Luke
2020-06-11 20:09:18 +12:00
parent 93c6b28409
commit bf3588e516
10 changed files with 65 additions and 63 deletions

View File

@@ -89,6 +89,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
writer.write_colour_block(&colours)?;
// can change 100 times per second, so need to slow it down
std::thread::sleep(std::time::Duration::from_millis(60));
std::thread::sleep(std::time::Duration::from_millis(30));
}
}

View File

@@ -23,6 +23,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
}
writer.write_colour_block(&key_colours)?;
std::thread::sleep(std::time::Duration::from_millis(250));
std::thread::sleep(std::time::Duration::from_millis(30));
}
}