Struct rust_rpi_4wd_car::Sensors [−][src]
pub struct Sensors { /* fields omitted */ }
Simplifies working with robot’s ultrasonic, tracking, and proximity sensors.
Implementations
impl Sensors
[src]
pub fn new<T: Into<Option<f32>>, H: Into<Option<f32>>>(
temperature: T,
humidity: H
) -> Rr4cResult<Self>
[src]
temperature: T,
humidity: H
) -> Rr4cResult<Self>
Get new sensor instance.
Arguments
temperature
- Temperature in °C. ANone
value will set a default of 20°C.humidity
- Relative humidity as %. ANone
value will set a default of 40%.
pub fn ir_proximities(&self) -> (bool, bool)
[src]
pub fn ldr(&self) -> (bool, bool)
[src]
pub fn as_yb_postback(&mut self) -> String
[src]
pub fn tracking(&self) -> (bool, bool, bool, bool)
[src]
pub fn ultrasonic(&mut self) -> Option<f32>
[src]
pub const ULTRASONIC_TIMEOUT: u64
[src]
Timeout in nanoseconds (ns) ≈ 30 Hz
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Sensors
impl Send for Sensors
impl Sync for Sensors
impl Unpin for Sensors
impl !UnwindSafe for Sensors
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>,