use std::{thread::sleep, time::Duration}; use px4sim::prelude::{get_boot_time, DroneData, DroneSimulator}; fn main() { let boot_time = get_boot_time(); let sim = DroneSimulator::new(6, boot_time, Some(("/home/balint/workspaces/px4", "10016"))); loop { match sim.last() { Some(data) => println!("Got {data:?}"), None => {} } sim.send(DroneData::new() + DroneData::noise()).unwrap(); sleep(Duration::from_millis(20)); } }