42 #include "pprzlink/messages.h"
48 #define LIDAR_LITE_REG_ADDR 0x00
49 #define LIDAR_LITE_REG_VAL 0x04
50 #define LIDAR_LITE_READ_ADDR 0x8F
152 float gain = (float)fabs( (
double) (cosf(phi) * cosf(theta)));
Main include for ABI (AirBorneInterface).
#define AGL_LIDAR_LITE_ID
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
Common code for AP and FBW telemetry.
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
enum I2CTransactionStatus status
Transaction status.
bool i2c_transmit(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len)
Submit a write only transaction.
bool i2c_receive(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint16_t len)
Submit a read only transaction.
@ I2CTransRunning
transaction is currently ongoing
@ I2CTransSuccess
transaction successfully finished by I2C driver
@ I2CTransFailed
transaction failed
@ I2CTransDone
transaction set to done by user level
@ I2CTransPending
transaction is pending in queue
static struct FloatEulers * stateGetNedToBodyEulers_f(void)
Get vehicle body attitude euler angles (float).
#define LIDAR_LITE_REG_ADDR
struct MedianFilterInt lidar_lite_filter
void lidar_lite_downlink(void)
Downlink message for debug.
void lidar_lite_init(void)
Initialization function.
void lidar_lite_event(void)
Lidar event function Basically just check the progress of the transation to prevent overruns during h...
#define LIDAR_LITE_REG_VAL
void lidar_lite_periodic(void)
Poll lidar for data for altitude hold 50Hz-100Hz should be enough, in theory can go faster (see the d...
#define LIDAR_LITE_READ_ADDR
struct LidarLite lidar_lite
driver for the Lidar-Lite i2c lidar
@ LIDAR_LITE_READ_DISTANCE
@ LIDAR_LITE_INIT_RANGING
struct i2c_transaction trans
enum LidarLiteStatus status
API to get/set the generic vehicle states.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.