add c api
This commit is contained in:
parent
01d1f1dad0
commit
98e8a6d639
14 changed files with 832 additions and 23 deletions
|
@ -3,8 +3,7 @@ use std::time::Duration;
|
|||
|
||||
use clap::Parser;
|
||||
|
||||
use servicepoint2::Command::BitmapLinearWin;
|
||||
use servicepoint2::{Connection, Origin, PixelGrid, PIXEL_HEIGHT, PIXEL_WIDTH};
|
||||
use servicepoint2::{Command, Connection, Origin, PIXEL_HEIGHT, PIXEL_WIDTH, PixelGrid};
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
struct Cli {
|
||||
|
@ -25,7 +24,7 @@ fn main() {
|
|||
pixels.set((y + x_offset) % PIXEL_WIDTH as usize, y, true);
|
||||
}
|
||||
connection
|
||||
.send(BitmapLinearWin(Origin::top_left(), pixels.clone()))
|
||||
.send(Command::BitmapLinearWin(Origin::top_left(), pixels.clone()))
|
||||
.unwrap();
|
||||
thread::sleep(Duration::from_millis(14));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue