Refactor code to reduce LedWriter to single thread

- Fixes race conditions (mostly) between awaits
- Fixes possible deadlock of mode changes when effect is running
- Fixes sending kill signal to effect clients
This commit is contained in:
Luke
2020-05-03 17:03:21 +12:00
parent 23d84b063f
commit 89c868ce95
8 changed files with 274 additions and 234 deletions

View File

@@ -1,7 +1,7 @@
use rog_aura::{AuraDbusWriter, Key, KeyColourArray};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let writer = AuraDbusWriter::new()?;
let mut writer = AuraDbusWriter::new()?;
let mut per_key_led = Vec::new();
let mut key_colours = KeyColourArray::new();