add new compression commands to BitmapLinearWin

This commit is contained in:
Vinzenz Schroeter 2024-05-16 23:03:07 +02:00
parent 6834bb084b
commit da4df32878
8 changed files with 84 additions and 60 deletions

View file

@ -3,7 +3,7 @@ use std::time::Duration;
use clap::Parser;
use servicepoint2::{Command, Connection, Origin, PIXEL_HEIGHT, PIXEL_WIDTH, PixelGrid};
use servicepoint2::{Command, CompressionCode, Connection, Origin, PIXEL_HEIGHT, PIXEL_WIDTH, PixelGrid};
#[derive(Parser, Debug)]
struct Cli {
@ -24,7 +24,7 @@ fn main() {
pixels.set((y + x_offset) % PIXEL_WIDTH as usize, y, true);
}
connection
.send(Command::BitmapLinearWin(Origin::top_left(), pixels.clone()).into())
.send(Command::BitmapLinearWin(Origin::top_left(), pixels.clone(), CompressionCode::Lzma).into())
.unwrap();
thread::sleep(Duration::from_millis(14));
}