Add "Unknown" to (not really) supported AniMe list

Intention is to allow users to at least control the power state of the
device (turn off) if the phyciscal display isn't yet supported.

Partial address of #354
This commit is contained in:
Luke D. Jones
2023-05-28 21:04:43 +12:00
parent fa671e53d8
commit 3a18506510
4 changed files with 21 additions and 1 deletions

View File

@@ -139,6 +139,7 @@ impl AnimeDiagonal {
match anime_type {
AnimeType::GA401 => self.to_ga401_packets(),
AnimeType::GA402 => self.to_ga402_packets(),
AnimeType::Unknown => self.to_unknown_packets(),
}
}
@@ -288,6 +289,11 @@ impl AnimeDiagonal {
AnimeDataBuffer::from_vec(crate::AnimeType::GA402, buf)
}
fn to_unknown_packets(&self) -> Result<AnimeDataBuffer> {
let buf = vec![0u8; AnimeType::Unknown.data_length()];
AnimeDataBuffer::from_vec(crate::AnimeType::Unknown, buf)
}
}
#[cfg(test)]