Crates.io | f1-telemetry-client |
lib.rs | f1-telemetry-client |
version | 0.1.1 |
source | src |
created_at | 2020-10-28 11:36:10.097983 |
updated_at | 2020-10-28 14:54:40.191749 |
description | Telemetry client for F1 game by Codemasters |
homepage | |
repository | |
max_upload_size | |
id | 306298 |
size | 102,911 |
🏎️ Telemetry client for F1 game by Codemasters 🏎️
use f1_telemetry_client::{Telemetry, packet::Packet};
use async_std::task;
fn main() {
task::block_on(async {
let telemetry = Telemetry::new("192.168.1.11", 20777).await.unwrap();
loop {
match telemetry.next().await {
Ok(packet) => {
match packet {
Packet::F12020(result) => {
println!("Result {:?}", result);
}
_ => unimplemented!(),
}
},
Err(e) => {
eprintln!("Error {}", e)
}
}
}
})
}
MIT @Aldi Priya Perdana