Trait robotcar::tof_sensor::DistanceSensor
source · [−]pub trait DistanceSensor<E> {
fn get_distance_in_mm(&mut self) -> Result<u16, E>;
}
Expand description
Represents a simple distance sensor.
For simplicity the error is currently not modelled here but instead the error of the actual
implementation will be used (it’s not referenced directly anywhere in Car
, so this is fine).
Required Methods
sourcefn get_distance_in_mm(&mut self) -> Result<u16, E>
fn get_distance_in_mm(&mut self) -> Result<u16, E>
Get the distance measured in millimeters (if available).