pub struct NeatoXV11Lidar {
pub readings: [(i32, i32); 360],
}
Expand description
An implementation of the Neato XV-11 LIDAR.
Fields§
§readings: [(i32, i32); 360]
The LIDAR readings. Each reading is represented as a (Distance, Reliability) tuple.
Implementations§
Source§impl NeatoXV11Lidar
impl NeatoXV11Lidar
Sourcepub fn run<T: AsRef<OsStr> + ?Sized>(&mut self, port_name: &T)
pub fn run<T: AsRef<OsStr> + ?Sized>(&mut self, port_name: &T)
§Summary
Begin reading LIDAR data.
§Parameters
port_name: The port name to open.
§Remarks
22 byte packet format: [0xFA, 1-byte index, 2-byte speed, [2-byte flags/distance, 2-byte quality] * 4, 2-byte checksum] All multi-byte values are little endian.
§Example
let mut lidar = NeatoXV11Lidar::new();
lidar.run("/dev/serial0");
Auto Trait Implementations§
impl Freeze for NeatoXV11Lidar
impl RefUnwindSafe for NeatoXV11Lidar
impl Send for NeatoXV11Lidar
impl Sync for NeatoXV11Lidar
impl Unpin for NeatoXV11Lidar
impl UnwindSafe for NeatoXV11Lidar
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more