livox2 0.2.2

A lightweight and pure Rust implementation of Livox SDK2, based on async-net and zerocopy.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use livox2::lidar_port::IpConfig;

fn main() -> Result<(), std::io::Error> {
    smol::block_on(async {
        let mut imu_port = IpConfig::new([192, 168, 1, 100], [192, 168, 1, 101])
            .new_default_imu_port()
            .await?;
        let packet = imu_port.next_packet_ref().await?;
        dbg!(packet.header);
        dbg!(&packet.data);
        Ok(())
    })
}