Paparazzi UAS  v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
lidar_lite.h File Reference

driver for the Lidar-Lite i2c lidar More...

#include "std.h"
#include "mcu_periph/i2c.h"
+ Include dependency graph for lidar_lite.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  LidarLite
 

Enumerations

enum  LidarLiteStatus { LIDAR_LITE_INIT_RANGING, LIDAR_LITE_REQ_READ, LIDAR_LITE_READ_DISTANCE, LIDAR_LITE_PARSE }
 

Functions

void lidar_lite_init (void)
 Initialization function. More...
 
void lidar_lite_event (void)
 Lidar event function Basically just check the progress of the transation to prevent overruns during high speed operation (ie. More...
 
void lidar_lite_periodic (void)
 Poll lidar for data for altitude hold 50Hz-100Hz should be enough, in theory can go faster (see the datasheet for Lidar Lite v3. More...
 
void lidar_lite_downlink (void)
 Downlink message for debug. More...
 

Variables

struct LidarLite lidar_lite
 

Detailed Description

driver for the Lidar-Lite i2c lidar

Note that the version 1 (silver label) seems to generate unexpected events on the i2c bus, such as misplaced start or stop or word reset (see I2C_ERRORS message). It seems to have no effect on other i2c devices (especially the IMU), but use with caution.

The newer versions function correctly.

Definition in file lidar_lite.h.


Data Structure Documentation

struct LidarLite

Definition at line 46 of file lidar_lite.h.

+ Collaboration diagram for LidarLite:
Data Fields
uint8_t addr
bool compensate_rotation
float distance
uint32_t distance_raw
enum LidarLiteStatus status
struct i2c_transaction trans
bool update_agl

Enumeration Type Documentation

Enumerator
LIDAR_LITE_INIT_RANGING 
LIDAR_LITE_REQ_READ 
LIDAR_LITE_READ_DISTANCE 
LIDAR_LITE_PARSE 

Definition at line 39 of file lidar_lite.h.

Function Documentation

void lidar_lite_downlink ( void  )

Downlink message for debug.

Definition at line 171 of file lidar_lite.c.

References DefaultChannel, DefaultDevice, LidarLite::distance, lidar_lite, LidarLite::status, status, i2c_transaction::status, and LidarLite::trans.

void lidar_lite_event ( void  )

Lidar event function Basically just check the progress of the transation to prevent overruns during high speed operation (ie.

polling the radar at >100Hz)

Definition at line 76 of file lidar_lite.c.

References I2CTransDone, I2CTransFailed, I2CTransPending, I2CTransRunning, I2CTransSuccess, lidar_lite, i2c_transaction::status, and LidarLite::trans.

Variable Documentation

struct LidarLite lidar_lite