Add support for facilities

This commit is contained in:
Mihai Dinculescu
2022-10-15 22:51:57 +01:00
parent 307b83ea95
commit 6be70c8566
23 changed files with 535 additions and 137 deletions

View File

@@ -33,12 +33,12 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
Some(Notification::Open) => {
println!("Open");
// The struct must be registered after the connection is successfully open
// After the connection is successfully open, we register the struct
client.register_object::<GpsData>()?;
}
Some(Notification::Data(data)) => {
Some(Notification::Object(data)) => {
if let Ok(gps_data) = GpsData::try_from(&data) {
println!("GPS Data: {gps_data:?}");
println!("{gps_data:?}");
}
}
_ => (),