From 46efd4190f523d435fa1b2515d1c217081dbfa62 Mon Sep 17 00:00:00 2001 From: Some Otters Date: Mon, 22 Dec 2025 10:59:17 +0000 Subject: [PATCH] slashctl: Add "static" LED profile See https://gitlab.com/asus-linux/reverse-engineering/-/blob/master/slash-bar/packets.txt?ref_type=heads . Tested working on a GU605CR --- rog-slash/src/data.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rog-slash/src/data.rs b/rog-slash/src/data.rs index 89d9841f..f7414754 100644 --- a/rog-slash/src/data.rs +++ b/rog-slash/src/data.rs @@ -86,6 +86,7 @@ impl FromStr for SlashType { #[cfg_attr(feature = "dbus", derive(Type, Value, OwnedValue))] #[derive(Debug, Default, PartialEq, Eq, Copy, Clone, Deserialize, Serialize)] pub enum SlashMode { + Static = 0x06, Bounce = 0x10, Slash = 0x12, Loading = 0x13, @@ -109,6 +110,7 @@ impl FromStr for SlashMode { fn from_str(s: &str) -> Result { match s { + "Static" => Ok(SlashMode::Static), "Bounce" => Ok(SlashMode::Bounce), "Slash" => Ok(SlashMode::Slash), "Loading" => Ok(SlashMode::Loading), @@ -132,6 +134,7 @@ impl FromStr for SlashMode { impl Display for SlashMode { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let str = match &self { + SlashMode::Static => String::from("Static"), SlashMode::Bounce => String::from("Bounce"), SlashMode::Slash => String::from("Slash"), SlashMode::Loading => String::from("Loading"), @@ -153,8 +156,9 @@ impl Display for SlashMode { } impl SlashMode { - pub fn list() -> [String; 15] { + pub fn list() -> [String; 16] { [ + SlashMode::Static.to_string(), SlashMode::Bounce.to_string(), SlashMode::Slash.to_string(), SlashMode::Loading.to_string(),