emergency_stop/emergency_stop.rs
1extern crate tello_edu;
2
3use tello_edu::{Tello, Result};
4
5#[tokio::main]
6async fn main() {
7 fly().await.unwrap();
8}
9
10async fn fly() -> Result<()> {
11 let drone = Tello::new()
12 .wait_for_wifi().await?;
13
14 let drone = drone.connect().await?;
15
16 drone.take_off().await?;
17 drone.emergency_stop().await?; // warning! this will make the drone drop like a brick
18
19 Ok(())
20}