Update to match firmware's expectation of protocol
This commit is contained in:
parent
8b17d1a9ca
commit
9444bdd9b7
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
/target
|
/target
|
||||||
|
/.idea
|
||||||
|
|||||||
10
src/main.rs
10
src/main.rs
@ -72,9 +72,17 @@ fn main() -> Result<(), Error> {
|
|||||||
writer.write(&[0x42])?;
|
writer.write(&[0x42])?;
|
||||||
writer.flush()?;
|
writer.flush()?;
|
||||||
} else {
|
} else {
|
||||||
// name of card
|
// converted mana cost
|
||||||
|
writer.write(&[20])?;
|
||||||
|
|
||||||
|
// colors
|
||||||
|
writer.write(&[0b11111])?;
|
||||||
|
|
||||||
|
// length of card name
|
||||||
writer.write(&[0])?;
|
writer.write(&[0])?;
|
||||||
|
|
||||||
|
// name of card
|
||||||
|
|
||||||
let img = image::open(&args[1])?;
|
let img = image::open(&args[1])?;
|
||||||
let img = img.crop_imm(28, 28, img.width() - 56, img.height() - 56);
|
let img = img.crop_imm(28, 28, img.width() - 56, img.height() - 56);
|
||||||
let img = img.resize_exact(240, 320, FilterType::Gaussian);
|
let img = img.resize_exact(240, 320, FilterType::Gaussian);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user