mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
chore: add implementation planning for G635L/G835L support
This commit is contained in:
@@ -44,6 +44,8 @@ impl AnimeDiagonal {
|
||||
/// Generate the base image from inputs. The result can be displayed as is
|
||||
/// or updated via scale, position, or angle then displayed again after
|
||||
/// `update()`.
|
||||
///
|
||||
/// TODO: G835L and G635L only supports grayscale
|
||||
#[inline]
|
||||
pub fn from_png(
|
||||
path: &Path,
|
||||
@@ -381,4 +383,50 @@ impl AnimeDiagonal {
|
||||
|
||||
AnimeDataBuffer::from_vec(crate::AnimeType::GA402, buf)
|
||||
}
|
||||
|
||||
// TODO: Implement `to_g635l_packets` and `to_g835l_packets` functions
|
||||
// IMPORTANT NOTE: G635L and G835L ONLY SUPPORT GRAYSCALE
|
||||
//
|
||||
// fn to_g835l_packets(buf: &[u8]) -> Result<AnimeDataBuffer> {
|
||||
// let mut buf = vec![0u8; AnimeType::GU604.data_length()];
|
||||
|
||||
// let mut start_index: usize = 0;
|
||||
|
||||
// fn copy_slice(
|
||||
// buf: &mut [u8],
|
||||
// anime: &AnimeDiagonal,
|
||||
// x: usize,
|
||||
// y: usize,
|
||||
// start_index: &mut usize,
|
||||
// len: usize,
|
||||
// ) {
|
||||
// buf[*start_index..*start_index + len].copy_from_slice(&anime.get_row(x, y, len));
|
||||
// *start_index += len;
|
||||
// }
|
||||
|
||||
// let b = &mut buf;
|
||||
// let a = &self;
|
||||
|
||||
// copy_slice(b, a, 40, 0, &mut start_index, 21);
|
||||
// copy_slice(b, a, 41, 0, &mut start_index, 21);
|
||||
// copy_slice(b, a, 42, 0, &mut start_index, 20);
|
||||
// copy_slice(b, a, 43, 0, &mut start_index, 20);
|
||||
// copy_slice(b, a, 44, 0, &mut start_index, 19);
|
||||
// copy_slice(b, a, 45, 0, &mut start_index, 19);
|
||||
// copy_slice(b, a, 46, 0, &mut start_index, 18);
|
||||
// copy_slice(b, a, 47, 0, &mut start_index, 18);
|
||||
// copy_slice(b, a, 48, 0, &mut start_index, 17);
|
||||
// copy_slice(b, a, 49, 0, &mut start_index, 17);
|
||||
// copy_slice(b, a, 50, 0, &mut start_index, 16);
|
||||
// copy_slice(b, a, 51, 0, &mut start_index, 16);
|
||||
// copy_slice(b, a, 52, 0, &mut start_index, 15);
|
||||
// copy_slice(b, a, 53, 0, &mut start_index, 15);
|
||||
// copy_slice(b, a, 54, 0, &mut start_index, 14);
|
||||
// copy_slice(b, a, 55, 0, &mut start_index, 14);
|
||||
// copy_slice(b, a, 56, 0, &mut start_index, 13);
|
||||
// copy_slice(b, a, 57, 0, &mut start_index, 13);
|
||||
// copy_slice(b, a, 58, 0, &mut start_index, 12);
|
||||
|
||||
// AnimeDataBuffer::from_vec(crate::AnimeType::G835L, buf)
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user