From ee0e612c0497304318b5a347c56872e85ea82e2d Mon Sep 17 00:00:00 2001 From: Denis Benato Date: Sat, 13 Dec 2025 13:35:56 +0100 Subject: [PATCH] Feat: add AniMe support for G835LW --- CHANGELOG.md | 6 ++++++ rog-anime/src/data.rs | 27 ++++++++++++++++++++------- rog-anime/src/usb.rs | 17 +++++++---------- simulators/src/animatrix/mod.rs | 14 +++++++++----- 4 files changed, 42 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba72b566..9e13d283 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## [Unreleased] +## [6.2.0] + +## Changed +- Added aura support for FX607V: thanks @jomp16 +- Added testing support for G835LW + ## [6.1.22] ### Changed diff --git a/rog-anime/src/data.rs b/rog-anime/src/data.rs index 9dab8816..b9f6dc47 100644 --- a/rog-anime/src/data.rs +++ b/rog-anime/src/data.rs @@ -64,6 +64,7 @@ pub enum AnimeType { GA402, GU604, G635L, + G835LW, #[default] Unsupported, } @@ -72,11 +73,12 @@ impl FromStr for AnimeType { type Err = AnimeError; fn from_str(s: &str) -> std::result::Result { - Ok(match s { - "ga401" | "GA401" => Self::GA401, - "ga402" | "GA402" => Self::GA402, - "gu604" | "GU604" => Self::GU604, - "g635L" | "G635L" => Self::G635L, + Ok(match s.to_uppercase().as_str() { + "GA401" => Self::GA401, + "GA402" => Self::GA402, + "GU604" => Self::GU604, + "G635L" => Self::G635L, + "G835LW" => Self::G835LW, _ => Self::Unsupported, }) } @@ -102,6 +104,7 @@ impl AnimeType { pub fn width(&self) -> usize { match self { AnimeType::GU604 => 70, + AnimeType::G835LW => 74, _ => 74, } } @@ -111,6 +114,7 @@ impl AnimeType { match self { AnimeType::GA401 => 36, AnimeType::GU604 => 43, + AnimeType::G835LW => 39, _ => 39, } } @@ -120,6 +124,7 @@ impl AnimeType { match self { AnimeType::GA401 => PANE_LEN * 2, AnimeType::GU604 => PANE_LEN * 3, + AnimeType::G835LW => PANE_LEN * 3, _ => PANE_LEN * 3, } } @@ -184,7 +189,11 @@ impl TryFrom for AnimePacketType { let mut buffers = match anime.anime { AnimeType::GA401 => vec![[0; 640]; 2], - AnimeType::GA402 | AnimeType::GU604 | AnimeType::G635L | AnimeType::Unsupported => { + AnimeType::GA402 + | AnimeType::GU604 + | AnimeType::G635L + | AnimeType::G835LW + | AnimeType::Unsupported => { vec![[0; 640]; 3] } }; @@ -197,7 +206,11 @@ impl TryFrom for AnimePacketType { if matches!( anime.anime, - AnimeType::GA402 | AnimeType::GU604 | AnimeType::Unsupported + AnimeType::GA402 + | AnimeType::GU604 + | AnimeType::G635L + | AnimeType::G835LW + | AnimeType::Unsupported ) { buffers[2][..7].copy_from_slice(&USB_PREFIX3); } diff --git a/rog-anime/src/usb.rs b/rog-anime/src/usb.rs index c413d8c9..2e78767a 100644 --- a/rog-anime/src/usb.rs +++ b/rog-anime/src/usb.rs @@ -245,16 +245,13 @@ pub fn get_anime_type() -> AnimeType { let dmi = DMIID::new().unwrap_or_default(); let board_name = dmi.board_name; - if board_name.contains("GA401I") || board_name.contains("GA401Q") { - AnimeType::GA401 - } else if board_name.contains("GA402R") || board_name.contains("GA402X") { - AnimeType::GA402 - } else if board_name.contains("GU604V") { - AnimeType::GU604 - } else if board_name.contains("G635L") { - AnimeType::G635L - } else { - AnimeType::Unsupported + match board_name.to_uppercase().as_str() { + "GA401I" | "GA401Q" => AnimeType::GA401, + "GA402R" | "GA402X" => AnimeType::GA402, + "GU604V" => AnimeType::GU604, + "G635L" => AnimeType::G635L, + "G835LW" => AnimeType::G835LW, + _ => AnimeType::Unsupported, } } diff --git a/simulators/src/animatrix/mod.rs b/simulators/src/animatrix/mod.rs index e94d4455..78143ae2 100644 --- a/simulators/src/animatrix/mod.rs +++ b/simulators/src/animatrix/mod.rs @@ -43,10 +43,12 @@ impl AniMatrix { vertical: 2, horizontal: 5, }, - AnimeType::GA402 | AnimeType::G635L | AnimeType::Unsupported => LedShape { - vertical: 2, - horizontal: 5, - }, + AnimeType::GA402 | AnimeType::G635L | AnimeType::G835LW | AnimeType::Unsupported => { + LedShape { + vertical: 2, + horizontal: 5, + } + } AnimeType::GU604 => LedShape { vertical: 2, horizontal: 5, @@ -56,7 +58,9 @@ impl AniMatrix { // Do a hard mapping of each (derived from wireshardk captures) let rows = match model { AnimeType::GA401 => GA401.to_vec(), - AnimeType::GA402 | AnimeType::G635L | AnimeType::Unsupported => GA402.to_vec(), + AnimeType::GA402 | AnimeType::G635L | AnimeType::G835LW | AnimeType::Unsupported => { + GA402.to_vec() + } AnimeType::GU604 => GU604.to_vec(), };