Updated SDK
Some checks failed
CI / Rust checks (push) Failing after 6s

This commit is contained in:
2024-10-20 12:01:48 +02:00
parent 856656e23b
commit bee3553d9e
9 changed files with 499 additions and 338 deletions

View File

@@ -24,41 +24,41 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
Some(Notification::AirportList(data)) => {
for record in data {
// The returned list is quite large, so we look for a particular record
if record.icao == "EGSC" {
println!("{record:?}");
// there's no need to unsubscribe
// because this is a one-off request, not a subscription
}
// if record.icao == "EGSC" {
// println!("{record:?}");
// // there's no need to unsubscribe
// // because this is a one-off request, not a subscription
// }
}
}
Some(Notification::WaypointList(data)) => {
for record in data {
// The returned list is quite large, so we look for a particular record
if record.icao == "BRAIN" {
println!("{record:?}");
// we've got the entry we're interesting in - we can unsubscribe now
client.unsubscribe_to_facilities(FacilityType::Waypoint)?;
}
// if record.icao == "BRAIN" {
// println!("{record:?}");
// // we've got the entry we're interesting in - we can unsubscribe now
// client.unsubscribe_to_facilities(FacilityType::Waypoint)?;
// }
}
}
Some(Notification::NdbList(data)) => {
for record in data {
// The returned list is quite large, so we look for a particular record
if record.icao == "CAM" {
println!("{record:?}");
// we've got the entry we're interesting in - we can unsubscribe now
client.unsubscribe_to_facilities(FacilityType::NDB)?;
}
// if record.icao == "CAM" {
// println!("{record:?}");
// // we've got the entry we're interesting in - we can unsubscribe now
// client.unsubscribe_to_facilities(FacilityType::NDB)?;
// }
}
}
Some(Notification::VorList(data)) => {
for record in data {
// The returned list is quite large, so we look for a particular record
if record.icao == "LON" {
println!("{record:?}");
// we've got the entry we're interesting in - we can unsubscribe now
client.unsubscribe_to_facilities(FacilityType::VOR)?;
}
// if record.icao == "LON" {
// println!("{record:?}");
// // we've got the entry we're interesting in - we can unsubscribe now
// client.unsubscribe_to_facilities(FacilityType::VOR)?;
// }
}
}
_ => (),