Move DBUS and keyboard reads on to tokio

This greatly improves throughput of per-key LED effects.
Also add a cool-down timer in the main loop to adjust
thread speed and prevent it running at maximum speed.
This commit is contained in:
Luke
2020-04-26 22:28:25 +12:00
parent 13e736dbed
commit 8200dc85e6
8 changed files with 182 additions and 157 deletions

View File

@@ -46,7 +46,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// It takes each interrupt at least 1ms. 10ms to write complete block. Plus any extra
// penalty time such as read waits
let time = time::Duration::from_millis(1); // aim for 60 per second
let time = time::Duration::from_millis(10); // aim for 100 per second
let row = KeyColourArray::get_init_msg();
let msg =