chore: code clean up and remove planning comments

This commit is contained in:
Ghoul
2026-01-23 00:06:53 +05:00
parent f92545b0bb
commit 3b5e82d6c5
2 changed files with 6 additions and 27 deletions

View File

@@ -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),
}

View File

@@ -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)