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_sf11.h File Reference

driver for the Parallax SF11-A/B/C Laser Rangefinder connected over i2c bus. More...

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

Go to the source code of this file.

Data Structures

struct  LidarSF11
 

Enumerations

enum  LidarSF11Status { LIDAR_SF11_REQ_READ, LIDAR_SF11_READ_OK }
 

Functions

void lidar_sf11_init (void)
 Initialization function. More...
 
void lidar_sf11_event (void)
 Lidar event function Check if the transaction succeded before reading the result. More...
 
void lidar_sf11_periodic (void)
 Poll lidar for data. More...
 
void lidar_sf11_downlink (void)
 Downlink message for debug. More...
 

Variables

struct LidarSF11 lidar_sf11
 

Detailed Description

driver for the Parallax SF11-A/B/C Laser Rangefinder connected over i2c bus.

Definition in file lidar_sf11.h.


Data Structure Documentation

struct LidarSF11

Definition at line 37 of file lidar_sf11.h.

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

Enumeration Type Documentation

Enumerator
LIDAR_SF11_REQ_READ 
LIDAR_SF11_READ_OK 

Definition at line 32 of file lidar_sf11.h.

Function Documentation

void lidar_sf11_downlink ( void  )

Downlink message for debug.

Definition at line 132 of file lidar_sf11.c.

References DefaultChannel, DefaultDevice, LidarSF11::distance, lidar_sf11, LidarSF11::status, status, i2c_transaction::status, and LidarSF11::trans.

void lidar_sf11_event ( void  )

Lidar event function Check if the transaction succeded before reading the result.

Definition at line 62 of file lidar_sf11.c.

References I2CTransDone, I2CTransFailed, I2CTransPending, I2CTransRunning, I2CTransSuccess, lidar_sf11, LIDAR_SF11_READ_OK, LidarSF11::status, i2c_transaction::status, and LidarSF11::trans.

Variable Documentation

struct LidarSF11 lidar_sf11