[][src]Struct neato_xv11::NeatoXV11Lidar

pub struct NeatoXV11Lidar {
    pub readings: [(i32, i32); 360],
}

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

impl NeatoXV11Lidar[src]

pub fn new() -> Self[src]

Summary

Initialize a new instance of NeatoXV11Lidar.

Example


let lidar = neato_xv11::NeatoXV11Lidar::new();

pub fn run<T: AsRef<OsStr> + ?Sized>(&mut self, port_name: &T)[src]

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.