mirror of
https://codeberg.org/Fl1tzi/microdeck.git
synced 2024-05-08 14:40:44 +00:00
clear image instead of shutting down the device
This commit is contained in:
parent
41420d3080
commit
2b9daeb220
|
@ -192,7 +192,9 @@ impl Device {
|
|||
self.selected_space = Some(name)
|
||||
}
|
||||
self.drop();
|
||||
self.device.reset().await.unwrap();
|
||||
for key in 0..self.device.kind().key_count() {
|
||||
self.device.clear_button_image(key).await.unwrap();
|
||||
}
|
||||
self.init_modules().await;
|
||||
}
|
||||
|
||||
|
|
11
src/helper.rs
Normal file
11
src/helper.rs
Normal file
|
@ -0,0 +1,11 @@
|
|||
// various functions useful for internal parsing or other things
|
||||
|
||||
/// Error for any kind of parsing
|
||||
pub enum ParseError {
|
||||
/// Generic error -> something is wrong
|
||||
UnexpectedValue
|
||||
}
|
||||
|
||||
pub fn hex_to_rgb(hex: String) -> Result<image::Rgb<u8>, ParseError> {
|
||||
|
||||
}
|
Loading…
Reference in a new issue