flip/flip.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
18 drone.flip_left().await?;
19 drone.flip_right().await?;
20
21 drone.flip_forward().await?;
22 drone.flip_back().await?;
23
24 drone.land().await?;
25
26 Ok(())
27}