send Movement from accel main thread

This commit is contained in:
Vladan Popovic 2022-07-11 16:16:30 +02:00
parent 7bfd37b799
commit df46a56cc3
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ pub fn main(sender: SyncSender<Msg>) -> Result<(), anyhow::Error> {
println!("entering ACCELERATOR sender loop ..."); println!("entering ACCELERATOR sender loop ...");
for i in 0..20 { for i in 0..20 {
println!("sending ACCELERATOR message ({}) of 20 ...", i); println!("sending ACCELERATOR message ({}) of 20 ...", i);
let _ = sender.send(Msg::Location("{\"velocity\": 21.43, \"altitude\": 367}".to_string()))?; let _ = sender.send(Msg::Movement("{\"velocity\": 21.43, \"altitude\": 367}".to_string()))?;
thread::sleep(Duration::from_millis(2000)); thread::sleep(Duration::from_millis(2000));
} }
Ok(()) Ok(())