pub struct Drone { /* private fields */ }
Implementations§
Source§impl Drone
impl Drone
Sourcepub fn get_speed_x(&mut self) -> i32
pub fn get_speed_x(&mut self) -> i32
X axis speed
Sourcepub fn get_speed_y(&mut self) -> i32
pub fn get_speed_y(&mut self) -> i32
Y axis speed
Sourcepub fn get_speed_z(&mut self) -> i32
pub fn get_speed_z(&mut self) -> i32
Z axis speed
Sourcepub fn get_acceleration_x(&mut self) -> f64
pub fn get_acceleration_x(&mut self) -> f64
X axis acceleration
Sourcepub fn get_acceleration_y(&mut self) -> f64
pub fn get_acceleration_y(&mut self) -> f64
Y axis acceleration
Sourcepub fn get_acceleration_z(&mut self) -> f64
pub fn get_acceleration_z(&mut self) -> f64
Z axis acceleration
Sourcepub fn get_lowest_temperature(&mut self) -> i32
pub fn get_lowest_temperature(&mut self) -> i32
Get lowest temperature
Sourcepub fn get_highest_temperature(&mut self) -> i32
pub fn get_highest_temperature(&mut self) -> i32
Get highest temperature
Sourcepub fn get_temperature(&mut self) -> i32
pub fn get_temperature(&mut self) -> i32
Get average temperature
Sourcepub fn get_height(&mut self) -> i32
pub fn get_height(&mut self) -> i32
Get current height in cm
Sourcepub fn get_distance_tof(&mut self) -> i32
pub fn get_distance_tof(&mut self) -> i32
Get current distance value from TOF in cm
Sourcepub fn get_barometer(&mut self) -> f64
pub fn get_barometer(&mut self) -> f64
Get current barometer measurement in cm -> absolute height
Sourcepub fn get_flight_time(&mut self) -> i32
pub fn get_flight_time(&mut self) -> i32
Get the time the motors have been active in seconds
pub fn get_battery(&mut self) -> i32
Source§impl Drone
impl Drone
pub fn connect(&mut self)
pub fn send_keepalive(&mut self)
pub fn turn_motor_on(&mut self)
pub fn turn_motor_off(&mut self)
pub fn initiate_throw_takeoff(&mut self)
pub fn takeoff(&mut self)
pub fn land(&mut self)
pub fn streamon(&mut self)
pub fn streamoff(&mut self)
pub fn emergency(&mut self)
Sourcepub fn move_any(&mut self, direction: &str, x: i32)
pub fn move_any(&mut self, direction: &str, x: i32)
Move in any chosen direction\n direction: up, down, left, right, forward or back\n x: 20-500
Sourcepub fn move_right(&mut self, x: i32)
pub fn move_right(&mut self, x: i32)
Move right x: 20-500 in cm
Sourcepub fn move_forward(&mut self, x: i32)
pub fn move_forward(&mut self, x: i32)
Move forward x: 20-500 in cm
Sourcepub fn rotate_clockwise(&mut self, x: i32)
pub fn rotate_clockwise(&mut self, x: i32)
Rotate x degree clockwise
Sourcepub fn rotate_counter_clockwise(&mut self, x: i32)
pub fn rotate_counter_clockwise(&mut self, x: i32)
Rotate x degree counter-clockwise
Sourcepub fn flip_right(&mut self)
pub fn flip_right(&mut self)
Flip right
Sourcepub fn flip_forward(&mut self)
pub fn flip_forward(&mut self)
Flip forward
Sourcepub fn go_xyz_speed(&mut self, x: i32, y: i32, z: i32, speed: i32)
pub fn go_xyz_speed(&mut self, x: i32, y: i32, z: i32, speed: i32)
Fly to xyz relative to current position\n Speed in cm/s\n Argument ranges:\n x: -500 - 500\n y: -500 - 500\n z: -500 - 500\n speed 10 - 100
Sourcepub fn curve_xyz_speed(
&mut self,
x1: i32,
y1: i32,
z1: i32,
x2: i32,
y2: i32,
z2: i32,
speed: i32,
)
pub fn curve_xyz_speed( &mut self, x1: i32, y1: i32, z1: i32, x2: i32, y2: i32, z2: i32, speed: i32, )
Fly to x2 y2 z2 in a curve via x1 y1 z1, speed is travelling speed in cm/s\n Both points relative to current position\n Argument value ranges:\n x1: -500 - 500\n y1: -500 - 500\n z1: -500 - 500\n x2: -500 - 500\n y2: -500 - 500\n z2: -500 - 500\n speed: 10 - 60
Sourcepub fn send_rc_control(
&mut self,
left_right_velocity: i32,
forward_backward_velocity: i32,
up_down_velocity: i32,
yaw_velocity: i32,
)
pub fn send_rc_control( &mut self, left_right_velocity: i32, forward_backward_velocity: i32, up_down_velocity: i32, yaw_velocity: i32, )
Send RC control via four channels. Command is sent every self.TIME_BTW_RC_CONTROL_COMMANDS seconds. Argument parameters: left_right_velocity: -100~100 (left/right) forward_backward_velocity: -100~100 (forward/backward) up_down_velocity: -100~100 (up/down) yaw_velocity: -100~100 (yaw)
Sourcepub fn set_wifi_credentials(&mut self, ssid: &str, password: &str)
pub fn set_wifi_credentials(&mut self, ssid: &str, password: &str)
Set the WiFi SSID and Password for the Tello, will cause a reboot
Sourcepub fn connect_to_wifi(&mut self, ssid: &str, password: &str)
pub fn connect_to_wifi(&mut self, ssid: &str, password: &str)
Only works on Tello-EDU Connects to a WiFi with the SSID and Password
Sourcepub fn set_network_ports(
&mut self,
state_packet_port: i32,
video_stream_port: i32,
)
pub fn set_network_ports( &mut self, state_packet_port: i32, video_stream_port: i32, )
Can change the ports of the Tello drone’s state and video packets Not supported in this library
Sourcepub fn set_video_bitrate(&mut self, bitrate: i32)
pub fn set_video_bitrate(&mut self, bitrate: i32)
Sets the bitrate of the video stream\n Only supports MBPS as i32 in the range of [0, 5] where 0 is auto
Sourcepub fn set_video_resolution(&mut self, resolution: &str)
pub fn set_video_resolution(&mut self, resolution: &str)
Sets the resolution of the video stream\n ‘low’ for 480P\n ‘high’ for 720P\n
Sourcepub fn set_video_fps(&mut self, fps: &str)
pub fn set_video_fps(&mut self, fps: &str)
Set the frames per second of the video stream\n ‘low’ for 5 fps\n ‘middle’ for 15 fps\n ‘high’ for 30 fps\n
Sourcepub fn set_video_direction(&mut self, direction: i32)
pub fn set_video_direction(&mut self, direction: i32)
Selects one of 2 cameras for streaming\n Forward camera is the regular 1080x720 colour camera\n Downward camera is a grey-only 320x240 IR-sensitive camera\n
Source§impl Drone
impl Drone
Sourcepub fn go_xyz_speed_mid(&mut self, x: i32, y: i32, z: i32, mid: i32)
pub fn go_xyz_speed_mid(&mut self, x: i32, y: i32, z: i32, mid: i32)
Fly to xyz relative to mission pad with id: mid\n Speed in cm/s\n Argument value ranges:\n x: -500 - 500\n y: -500 - 500\n z: -500 - 500\n mid: 1 - 8
Sourcepub fn curve_xyz_speed_mid(
&mut self,
x1: i32,
y1: i32,
z1: i32,
x2: i32,
y2: i32,
z2: i32,
speed: i32,
mid: i32,
)
pub fn curve_xyz_speed_mid( &mut self, x1: i32, y1: i32, z1: i32, x2: i32, y2: i32, z2: i32, speed: i32, mid: i32, )
Fly to x2 y2 z2 in a curve via x1 y1 z1, speed is travelling speed in cm/s\n Both points relative to mission pad with id: mid\n Argument value ranges:\n x1: -500 - 500\n y1: -500 - 500\n z1: -500 - 500\n x2: -500 - 500\n y2: -500 - 500\n z2: -500 - 500\n speed: 10 - 60
pub fn enable_mission_pads(&mut self)
pub fn disable_mission_pads(&mut self)
pub fn set_mission_pad_detection_direction(&mut self, direction: i32)
Source§impl Drone
impl Drone
pub fn query_speed(&mut self) -> i32
pub fn query_battery(&mut self) -> i32
pub fn query_flight_time(&mut self) -> i32
pub fn query_height(&mut self) -> i32
pub fn query_temperature(&mut self) -> i32
Sourcepub fn query_attitude(&mut self) -> HashMap<String, i32>
pub fn query_attitude(&mut self) -> HashMap<String, i32>
Query IMU attitude data\n Using get_pitch, get_roll and get_yaw is usually faster\n Returns Map with {‘pitch’: i32, ‘roll’: int, ‘yaw’: i32}