1use tokio::sync::mpsc;
2
3#[derive(Debug)]
4pub enum TelloCommand {
5 TakeOff,
6 Land,
7 StopAndHover,
8 EmergencyStop,
9 RemoteControl { left_right: i8, forwards_backwards: i8, up_down: i8, yaw: i8 },
10 FlipLeft,
11 FlipRight,
12 FlipForward,
13 FlipBack
14}
15
16
17pub type TelloCommandSender = mpsc::UnboundedSender<TelloCommand>;
18pub type TelloCommandReceiver = mpsc::UnboundedReceiver<TelloCommand>;
19
20pub fn make_tello_command_channel() -> (TelloCommandSender, TelloCommandReceiver) {
21 mpsc::unbounded_channel()
22}
23