Struct ev3dev_lang_rust::sensors::GyroSensor [−][src]
pub struct GyroSensor { /* fields omitted */ }LEGO EV3 gyro sensor.
Implementations
impl GyroSensor[src]
impl GyroSensor[src]pub fn get(port: SensorPort) -> Ev3Result<Self>[src]
Try to get a Self on the given port. Returns None if port is not used or another device is connected.
pub fn find() -> Ev3Result<Self>[src]
Try to find a Self. Only returns a motor if their is exactly one connected, Error::NotFound otherwise.
pub fn list() -> Ev3Result<Vec<Self>>[src]
Extract list of connected ‘Self’
pub const MODE_GYRO_ANG: &'static str[src]
Angle
pub fn set_mode_gyro_ang(&self) -> Ev3Result<()>[src]
Angle
pub fn is_mode_gyro_ang(&self) -> Ev3Result<bool>[src]
Angle
pub const MODE_GYRO_RATE: &'static str[src]
Rotational Speed
pub fn set_mode_gyro_rate(&self) -> Ev3Result<()>[src]
Rotational Speed
pub fn is_mode_gyro_rate(&self) -> Ev3Result<bool>[src]
Rotational Speed
pub const MODE_GYRO_FAS: &'static str[src]
Raw sensor value ???
pub fn set_mode_gyro_fas(&self) -> Ev3Result<()>[src]
Raw sensor value ???
pub fn is_mode_gyro_fas(&self) -> Ev3Result<bool>[src]
Raw sensor value ???
pub const MODE_GYRO_G_AND_A: &'static str[src]
Angle and Rotational Speed
pub fn set_mode_gyro_g_and_a(&self) -> Ev3Result<()>[src]
Angle and Rotational Speed
pub fn is_mode_gyro_g_and_a(&self) -> Ev3Result<bool>[src]
Angle and Rotational Speed
pub const MODE_GYRO_CAL: &'static str[src]
Calibration ???
pub fn set_mode_gyro_cal(&self) -> Ev3Result<()>[src]
Calibration ???
pub fn is_mode_gyro_cal(&self) -> Ev3Result<bool>[src]
Calibration ???
pub const MODE_TILT_RATE: &'static str[src]
Rotational Speed (2nd axis)
pub fn set_mode_tilt_rate(&self) -> Ev3Result<()>[src]
Rotational Speed (2nd axis)
pub fn is_mode_tilt_rate(&self) -> Ev3Result<bool>[src]
Rotational Speed (2nd axis)
pub const MODE_TILT_ANG: &'static str[src]
Angle (2nd axis)
pub fn set_mode_tilt_ang(&self) -> Ev3Result<()>[src]
Angle (2nd axis)
pub fn is_mode_tilt_ang(&self) -> Ev3Result<bool>[src]
Angle (2nd axis)
pub fn get_angle(&self) -> Ev3Result<i32>[src]
Gets the angle, ranging from -32768 to 32767 Fails if it has been set in the wrong mode
pub fn get_rotational_speed(&self) -> Ev3Result<i32>[src]
Gets the rotational speed value, ranging from -440 to 440 Fails is it has been set in the wrong mode: for example, fails if we ask for rotational speed while in MODE_GYRO_ANG mode
Trait Implementations
impl Clone for GyroSensor[src]
impl Clone for GyroSensor[src]fn clone(&self) -> GyroSensor[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Device for GyroSensor[src]
impl Device for GyroSensor[src]fn get_attribute(&self, name: &str) -> Attribute[src]
fn get_address(&self) -> Ev3Result<String>[src]
fn set_command(&self, command: &str) -> Ev3Result<()>[src]
fn get_commands(&self) -> Ev3Result<Vec<String>>[src]
fn get_driver_name(&self) -> Ev3Result<String>[src]
impl Sensor for GyroSensor[src]
impl Sensor for GyroSensor[src]fn get_bin_data(&self) -> Ev3Result<String>[src]
fn get_bin_data_format(&self) -> Ev3Result<String>[src]
fn get_decimals(&self) -> Ev3Result<i32>[src]
fn get_fw_version(&self) -> Ev3Result<String>[src]
fn get_mode(&self) -> Ev3Result<String>[src]
fn set_mode(&self, mode: &str) -> Ev3Result<()>[src]
fn get_modes(&self) -> Ev3Result<Vec<String>>[src]
fn get_num_values(&self) -> Ev3Result<i32>[src]
fn get_poll_ms(&self) -> Ev3Result<i32>[src]
fn set_poll_ms(&self, poll_ms: i32) -> Ev3Result<()>[src]
fn get_units(&self) -> Ev3Result<String>[src]
fn get_value(&self, index: u8) -> Ev3Result<i32>[src]
fn get_value0(&self) -> Ev3Result<i32>[src]
fn get_value1(&self) -> Ev3Result<i32>[src]
fn get_value2(&self) -> Ev3Result<i32>[src]
fn get_value3(&self) -> Ev3Result<i32>[src]
fn get_value4(&self) -> Ev3Result<i32>[src]
fn get_value5(&self) -> Ev3Result<i32>[src]
fn get_value6(&self) -> Ev3Result<i32>[src]
fn get_value7(&self) -> Ev3Result<i32>[src]
fn get_text_value(&self) -> Ev3Result<String>[src]
Auto Trait Implementations
impl !RefUnwindSafe for GyroSensor
impl !RefUnwindSafe for GyroSensorimpl Send for GyroSensor
impl Send for GyroSensorimpl !Sync for GyroSensor
impl !Sync for GyroSensorimpl Unpin for GyroSensor
impl Unpin for GyroSensorimpl UnwindSafe for GyroSensor
impl UnwindSafe for GyroSensor