Crate crazyflie_link[][src]

Expand description

This Crate implement the Crazyflie radio link connection using Crazyradio. It allows to scan for Crazyflies and to open a safe bidirectional radio connection using a Crazyradio.

The entry point to this Crate is the LinkContext, it keeps track of Crazyradio dongles and provides functions to open a link Connection.

Since this crate spawns async tasks, it needs to know about what async executor to use. The async_executors crate is used to support the common async executors and should be passed to the context constructor.

A connection can then be used to send and receive packet with the Crazyflie.

Example:

// Create a link Context
let context = crazyflie_link::LinkContext::new(async_executors::AsyncStd);

// Scan for Crazyflies
let cf_found = context.scan([0xe7; 5]).await?;

if !cf_found.is_empty() {
    let connection = context.open_link(&cf_found[0]).await?;
    let packet = connection.recv_packet().await?;
    println!("Packet received: {:?}", packet);
}

Structs

Link connection

Context for the link connections

CRTP data packet

Enums

Describe the current link connection status