Struct ev3dev_lang_rust::sensors::IrSeekerSensor [−][src]
HiTechnic EV3 / NXT Infrared Sensor.
Implementations
impl IrSeekerSensor
[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_AC: &'static str
[src]
Sensor mode alternating current -> filters the infrared signal of the hitechnic ball -> only shows direction
pub fn set_mode_ac(&self) -> Ev3Result<()>
[src]
Sensor mode alternating current -> filters the infrared signal of the hitechnic ball -> only shows direction
pub fn is_mode_ac(&self) -> Ev3Result<bool>
[src]
Sensor mode alternating current -> filters the infrared signal of the hitechnic ball -> only shows direction
pub const MODE_DC: &'static str
[src]
Sensor mode direct current -> reacts on all infrared signals, sun infrared signal included -> only shows direction
pub fn set_mode_dc(&self) -> Ev3Result<()>
[src]
Sensor mode direct current -> reacts on all infrared signals, sun infrared signal included -> only shows direction
pub fn is_mode_dc(&self) -> Ev3Result<bool>
[src]
Sensor mode direct current -> reacts on all infrared signals, sun infrared signal included -> only shows direction
pub const MODE_AC_ALL: &'static str
[src]
Sensor mode alternating current -> shows direction (value0) and values of each of the five sensors
pub fn set_mode_ac_all(&self) -> Ev3Result<()>
[src]
Sensor mode alternating current -> shows direction (value0) and values of each of the five sensors
pub fn is_mode_ac_all(&self) -> Ev3Result<bool>
[src]
Sensor mode alternating current -> shows direction (value0) and values of each of the five sensors
pub const MODE_DC_ALL: &'static str
[src]
Sensor mode direct current -> shows direction (value0) and values of each of the five sensors
pub fn set_mode_dc_all(&self) -> Ev3Result<()>
[src]
Sensor mode direct current -> shows direction (value0) and values of each of the five sensors
pub fn is_mode_dc_all(&self) -> Ev3Result<bool>
[src]
Sensor mode direct current -> shows direction (value0) and values of each of the five sensors
pub fn get_ir_direction(&self) -> Ev3Result<i32>
[src]
gets direction of incoming ir light (calculated by the sensor)
pub fn get_raw_values(&self) -> Ev3Result<[i32; 5]>
[src]
gets the values of the five sensors of the HiTechnic IR Seeker (only works if dc_all or ac_all mode is activated)
Trait Implementations
impl Clone for IrSeekerSensor
[src]
fn clone(&self) -> IrSeekerSensor
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for IrSeekerSensor
[src]
impl Device for IrSeekerSensor
[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 IrSeekerSensor
[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 IrSeekerSensor
[src]
impl Send for IrSeekerSensor
[src]
impl !Sync for IrSeekerSensor
[src]
impl Unpin for IrSeekerSensor
[src]
impl UnwindSafe for IrSeekerSensor
[src]
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,