From 3b5e82d6c5024cf631cce8fb1af98001830e400b Mon Sep 17 00:00:00 2001 From: Ghoul Date: Fri, 23 Jan 2026 00:06:53 +0500 Subject: [PATCH] chore: code clean up and remove planning comments --- rog-anime/src/image.rs | 13 +++---------- simulators/src/animatrix/mod.rs | 20 +++----------------- 2 files changed, 6 insertions(+), 27 deletions(-) diff --git a/rog-anime/src/image.rs b/rog-anime/src/image.rs index d2ad5517..6e9a719c 100644 --- a/rog-anime/src/image.rs +++ b/rog-anime/src/image.rs @@ -121,8 +121,6 @@ impl AnimeImage { match anime_type { AnimeType::GA401 => 0.8, AnimeType::GU604 => 0.78, - // TODO: Measure physical display and calculate correct value - AnimeType::G835L => 0.77, _ => 0.77, } } @@ -139,12 +137,8 @@ impl AnimeImage { fn scale_y(anime_type: AnimeType) -> f32 { match anime_type { AnimeType::GA401 => 0.3, - AnimeType::GU604 => 0.28, - // TODO: Calculate correct values for G635L and G835L. - // Known values for G835L diagonal W*H is 68*34 - AnimeType::G635L => 0.28, - AnimeType::G835L => 0.28, - _ => 0.283, + AnimeType::GA402 => 0.283, + _ => 0.28, } } @@ -167,7 +161,7 @@ impl AnimeImage { /// \ | /// |----|\ | /// ^ ------+ - /// first_x (grows as y increases) + /// first_x /// ``` /// /// For G835L (inverted pattern - triangle grows then rectangle shifts): @@ -276,7 +270,6 @@ impl AnimeImage { // 33.0 = Longest row LED count (physical) plus half-pixel offset AnimeType::GA401 => (33.0 + 0.5) * Self::scale_x(anime_type), AnimeType::GU604 => (38.0 + 0.5) * Self::scale_x(anime_type), - // G835L: max X span is 33.5 LEDs (-0.5..33.0) AnimeType::G835L => (33.0 + 0.5) * Self::scale_x(anime_type), _ => (35.0 + 0.5) * Self::scale_x(anime_type), } diff --git a/simulators/src/animatrix/mod.rs b/simulators/src/animatrix/mod.rs index f8daa4ea..0317a616 100644 --- a/simulators/src/animatrix/mod.rs +++ b/simulators/src/animatrix/mod.rs @@ -42,23 +42,9 @@ pub struct AniMatrix { impl AniMatrix { pub fn new(model: AnimeType) -> Self { - let led_shape = match model { - // TODO: Verify how this reacts on G635L and G835L - // These are all doing the same thing. Can be simplified - AnimeType::GA401 => LedShape { - vertical: 2, - horizontal: 5, - }, - AnimeType::GA402 | AnimeType::G635L | AnimeType::G835L | AnimeType::Unsupported => { - LedShape { - vertical: 2, - horizontal: 5, - } - } - AnimeType::GU604 => LedShape { - vertical: 2, - horizontal: 5, - }, + let led_shape = LedShape { + vertical: 2, + horizontal: 5, }; // Do a hard mapping of each (derived from wireshardk captures)