Crate tello_edu

Source
Expand description

A library for controlling and interacting with the Tello EDU drone using asynchronous Rust and Tokio.

All operations are implemented as awaitable futures, completed when the drone sends acknowledgment of the command message.

use tello_edu::{Tello, Result};
 
#[tokio::main]
async fn main() {
    fly().await.unwrap();
}
 
async fn fly() -> Result<()> {
    // create a new drone in the `NoWifi` state 
    let drone = Tello::new();
 
    // wait until the host computer joins the drone's Wifi network
    // (joining the network is not automatic - how it happens is up to you)
    let drone = drone.wait_for_wifi().await?;
 
    // establish connection and put the drone in "command" mode
    let drone = drone.connect().await?;
 
    // fly!
    drone.take_off().await?;
    drone.turn_clockwise(360).await?;
    drone.land().await?;
 
    Ok(())
}

Structs§

Duration
A Duration type to represent a span of time, typically used for system timeouts.
Tello
For interacting with the Tello EDU drone using the simple text-based UDP protocol.
TelloOptions
Tello drone connection and other usage options.
TelloState
The live state of the drone.

Enums§

TelloCommand
TelloError

Constants§

VIDEO_HEIGHT
VIDEO_WIDTH

Type Aliases§

Result
TelloCommandSender
TelloStateReceiver
TelloVideoReceiver