mirror of
https://github.com/cccb/servicepoint.git
synced 2025-01-18 18:10:14 +01:00
updated hello display example
This commit is contained in:
parent
922fab6457
commit
005bc6d297
8
hello_display/Cargo.lock
generated
8
hello_display/Cargo.lock
generated
|
@ -6,8 +6,6 @@ version = 3
|
||||||
name = "airportdisplay"
|
name = "airportdisplay"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
|
||||||
"bytes",
|
|
||||||
"codepage-437",
|
"codepage-437",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -29,12 +27,6 @@ dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "bytes"
|
|
||||||
version = "1.2.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "codepage-437"
|
name = "codepage-437"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|
|
@ -2,8 +2,8 @@ use anyhow::Result;
|
||||||
use airportdisplay::{
|
use airportdisplay::{
|
||||||
Command,
|
Command,
|
||||||
Display,
|
Display,
|
||||||
Text,
|
text::Text,
|
||||||
TextBuffer,
|
text::Buffer,
|
||||||
};
|
};
|
||||||
|
|
||||||
fn main() -> Result<()> {
|
fn main() -> Result<()> {
|
||||||
|
@ -11,8 +11,8 @@ fn main() -> Result<()> {
|
||||||
let display = Display::open("172.23.42.29:2342".into())?;
|
let display = Display::open("172.23.42.29:2342".into())?;
|
||||||
|
|
||||||
let text = Command::Text(Text::Buffer(
|
let text = Command::Text(Text::Buffer(
|
||||||
TextBuffer::from(
|
Buffer::from(
|
||||||
"♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥\n♥ mauuu ♥\n♥ mau mauuuunz! ♥\n♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥".into())));
|
"♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥\n♥ mauuu ♥\n♥ mau mauuuunz! ♥\n♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥".to_string())));
|
||||||
|
|
||||||
display.send(Command::Clear)?;
|
display.send(Command::Clear)?;
|
||||||
display.send(text)?;
|
display.send(text)?;
|
||||||
|
|
Loading…
Reference in a new issue