diff --git a/src/device.rs b/src/device.rs index f5f5a42..e2c7a0d 100644 --- a/src/device.rs +++ b/src/device.rs @@ -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; } diff --git a/src/helper.rs b/src/helper.rs new file mode 100644 index 0000000..bef6eb2 --- /dev/null +++ b/src/helper.rs @@ -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, ParseError> { + +}