Struct e_drone_rpi::Drone [−][src]
Fields
time_start: Instant
time_transfer: Instant
time_receive: Instant
receiver: Receiver
buffer: [u8; 1024]
port: Result<Uart, Error>
Implementations
impl Drone
[src]
pub fn new() -> Drone
[src]
pub fn new_path(port_name: &str) -> Drone
[src]
pub fn is_connected(&mut self) -> bool
[src]
pub fn check(&mut self) -> Data
[src]
pub fn get_time_passed_from_start(&self) -> u128
[src]
pub fn get_time_passed_from_last_transfer(&self) -> u128
[src]
pub fn get_time_passed_from_last_receive(&self) -> u128
[src]
pub fn sleep(&self, time_sleep_ms: u64)
[src]
pub fn send(&mut self, slice_data: &[u8]) -> bool
[src]
pub fn request(&mut self, target: DeviceType, data_type: DataType) -> bool
[src]
pub fn command(
&mut self,
target: DeviceType,
command_type: CommandType,
option: u8
) -> bool
[src]
&mut self,
target: DeviceType,
command_type: CommandType,
option: u8
) -> bool
pub fn flight_event(&mut self, event: FlightEvent) -> bool
[src]
pub fn takeoff(&mut self) -> bool
[src]
pub fn landing(&mut self) -> bool
[src]
pub fn stop(&mut self) -> bool
[src]
pub fn set_default(&mut self) -> bool
[src]
pub fn set_mode_control_flight(&mut self) -> bool
[src]
pub fn headless(&mut self, headless: Headless) -> bool
[src]
pub fn clear_bias(&mut self) -> bool
[src]
pub fn clear_trim(&mut self) -> bool
[src]
pub fn trim(&mut self, roll: i16, pitch: i16, yaw: i16, throttle: i16) -> bool
[src]
pub fn control(&mut self, roll: i8, pitch: i8, yaw: i8, throttle: i8) -> bool
[src]
pub fn control_request(
&mut self,
roll: i8,
pitch: i8,
yaw: i8,
throttle: i8,
data_type: DataType
) -> bool
[src]
&mut self,
roll: i8,
pitch: i8,
yaw: i8,
throttle: i8,
data_type: DataType
) -> bool
pub fn control_position(
&mut self,
x: f32,
y: f32,
z: f32,
velocity: f32,
heading: i16,
rotational_velocity: i16
) -> bool
[src]
&mut self,
x: f32,
y: f32,
z: f32,
velocity: f32,
heading: i16,
rotational_velocity: i16
) -> bool
pub fn battle_ir_message(&mut self, ir_message: u8) -> bool
[src]
pub fn battle_light_event_command(
&mut self,
target: DeviceType,
event: u8,
interval: u16,
repeat: u8,
r: u8,
g: u8,
b: u8,
command_type: CommandType,
option: u8
) -> bool
[src]
&mut self,
target: DeviceType,
event: u8,
interval: u16,
repeat: u8,
r: u8,
g: u8,
b: u8,
command_type: CommandType,
option: u8
) -> bool
pub fn battle_ir_message_light_event_command(
&mut self,
target: DeviceType,
ir_message: u8,
event: u8,
interval: u16,
repeat: u8,
r: u8,
g: u8,
b: u8,
command_type: CommandType,
option: u8
) -> bool
[src]
&mut self,
target: DeviceType,
ir_message: u8,
event: u8,
interval: u16,
repeat: u8,
r: u8,
g: u8,
b: u8,
command_type: CommandType,
option: u8
) -> bool
pub fn light_manual(
&mut self,
target: DeviceType,
flags: u16,
brightness: u8
) -> bool
[src]
&mut self,
target: DeviceType,
flags: u16,
brightness: u8
) -> bool
pub fn light_mode(
&mut self,
target: DeviceType,
mode: u8,
interval: u16
) -> bool
[src]
&mut self,
target: DeviceType,
mode: u8,
interval: u16
) -> bool
pub fn light_event(
&mut self,
target: DeviceType,
event: u8,
interval: u16,
repeat: u8
) -> bool
[src]
&mut self,
target: DeviceType,
event: u8,
interval: u16,
repeat: u8
) -> bool
pub fn light_mode_color(
&mut self,
target: DeviceType,
mode: u8,
interval: u16,
r: u8,
g: u8,
b: u8
) -> bool
[src]
&mut self,
target: DeviceType,
mode: u8,
interval: u16,
r: u8,
g: u8,
b: u8
) -> bool
pub fn light_event_color(
&mut self,
target: DeviceType,
event: u8,
interval: u16,
repeat: u8,
r: u8,
g: u8,
b: u8
) -> bool
[src]
&mut self,
target: DeviceType,
event: u8,
interval: u16,
repeat: u8,
r: u8,
g: u8,
b: u8
) -> bool
pub fn light_default(
&mut self,
target: DeviceType,
mode: u8,
interval: u16,
r: u8,
g: u8,
b: u8
) -> bool
[src]
&mut self,
target: DeviceType,
mode: u8,
interval: u16,
r: u8,
g: u8,
b: u8
) -> bool
pub fn buzzer_stop(&mut self, target: DeviceType) -> bool
[src]
pub fn buzzer_scale(
&mut self,
target: DeviceType,
scale: Scale,
time: u16
) -> bool
[src]
&mut self,
target: DeviceType,
scale: Scale,
time: u16
) -> bool
pub fn buzzer_scale_reserve(
&mut self,
target: DeviceType,
scale: Scale,
time: u16
) -> bool
[src]
&mut self,
target: DeviceType,
scale: Scale,
time: u16
) -> bool
pub fn buzzer_hz(&mut self, target: DeviceType, hz: u16, time: u16) -> bool
[src]
pub fn buzzer_hz_reserve(
&mut self,
target: DeviceType,
hz: u16,
time: u16
) -> bool
[src]
&mut self,
target: DeviceType,
hz: u16,
time: u16
) -> bool
pub fn buzzer_mute(&mut self, target: DeviceType, time: u16) -> bool
[src]
pub fn buzzer_mute_reserve(&mut self, target: DeviceType, time: u16) -> bool
[src]
pub fn vibrator(&mut self, on: u16, off: u16, time: u16) -> bool
[src]
pub fn vibrator_reserve(&mut self, on: u16, off: u16, time: u16) -> bool
[src]
pub fn draw_clear_all(&mut self, pixel: Pixel) -> bool
[src]
pub fn draw_clear(
&mut self,
x: i16,
y: i16,
width: i16,
height: i16,
pixel: Pixel
) -> bool
[src]
&mut self,
x: i16,
y: i16,
width: i16,
height: i16,
pixel: Pixel
) -> bool
pub fn draw_invert(&mut self, x: i16, y: i16, width: i16, height: i16) -> bool
[src]
pub fn draw_point(&mut self, x: i16, y: i16, pixel: Pixel) -> bool
[src]
pub fn draw_line(
&mut self,
x1: i16,
y1: i16,
x2: i16,
y2: i16,
pixel: Pixel,
line: Line
) -> bool
[src]
&mut self,
x1: i16,
y1: i16,
x2: i16,
y2: i16,
pixel: Pixel,
line: Line
) -> bool
pub fn draw_rect(
&mut self,
x: i16,
y: i16,
width: i16,
height: i16,
pixel: Pixel,
fill: bool,
line: Line
) -> bool
[src]
&mut self,
x: i16,
y: i16,
width: i16,
height: i16,
pixel: Pixel,
fill: bool,
line: Line
) -> bool
pub fn draw_circle(
&mut self,
x: i16,
y: i16,
radius: i16,
pixel: Pixel,
fill: bool
) -> bool
[src]
&mut self,
x: i16,
y: i16,
radius: i16,
pixel: Pixel,
fill: bool
) -> bool
pub fn draw_string(
&mut self,
x: i16,
y: i16,
font: Font,
pixel: Pixel,
string: String
) -> bool
[src]
&mut self,
x: i16,
y: i16,
font: Font,
pixel: Pixel,
string: String
) -> bool
pub fn draw_string_align(
&mut self,
x_start: i16,
x_end: i16,
y: i16,
align: Align,
font: Font,
pixel: Pixel,
string: String
) -> bool
[src]
&mut self,
x_start: i16,
x_end: i16,
y: i16,
align: Align,
font: Font,
pixel: Pixel,
string: String
) -> bool
pub fn draw_image(
&mut self,
x: i16,
y: i16,
width: i16,
height: i16,
vec_image: Vec<u8>
) -> bool
[src]
&mut self,
x: i16,
y: i16,
width: i16,
height: i16,
vec_image: Vec<u8>
) -> bool
Auto Trait Implementations
impl !RefUnwindSafe for Drone
impl Send for Drone
impl Sync for Drone
impl Unpin for Drone
impl !UnwindSafe for Drone
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,