 |
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
36 #ifndef SONAR_VL53L1X_I2C_ADDR
37 #define SONAR_VL53L1X_I2C_ADDR VL53L1_DEFAULT_ADDRESS
41 #ifndef SONAR_VL53L1X_OFFSET
42 #define SONAR_VL53L1X_OFFSET 0
50 #ifndef SONAR_VL53L1X_TIMINGBUDGET_MS
51 #define SONAR_VL53L1X_TIMINGBUDGET_MS 100
56 #ifndef SONAR_VL53L1X_DISTANCEMODE
57 #define SONAR_VL53L1X_DISTANCEMODE 2
64 #ifndef SONAR_VL53L1X_INTERMEASUREMENT_MS
65 #define SONAR_VL53L1X_INTERMEASUREMENT_MS SONAR_VL53L1X_TIMINGBUDGET_MS
67 #if SONAR_VL53L1X_INTERMEASUREMENT_MS < SONAR_VL53L1X_TIMINGBUDGET_MS
68 #warning SONAR_VL53L1X_INTERMEASUREMENT_MS should be greater than or equal to SONAR_VL53L1X_TIMINGBUDGET_MS
83 #ifdef SENSOR_SYNC_SEND_SONAR
112 if (range_mm > 0.0
f && range_mm < 5.0
f) {
122 bool new_data =
false;
void VL53L1X_BootDevice(VL53L1_DEV dev, uint16_t TimingBudgetInMs, uint16_t DistanceMode, uint32_t InterMeasurementInMs)
Implement boot sequence of VL53L1 device as described in documentation See VL53L1X_SetTimingBudgetInM...
#define SONAR_VL53L1X_I2C_ADDR
#define SONAR_VL53L1X_INTERMEASUREMENT_MS
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
Non-blocking runtime functions for the VL53L1X.
void sonar_vl53l1x_init(void)
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
bool VL53L1X_NonBlocking_RequestData(VL53L1_DEV dev)
Request a new reading.
struct sonar_vl53l1x_dev sonar_vl53l1x
uint16_t f
Camera baseline, in meters (i.e. horizontal distance between the two cameras of the stereo setup)
Common code for AP and FBW telemetry.
uint8_t slave_addr
Slave address.
bool VL53L1X_NonBlocking_ReadDataEvent(VL53L1_DEV dev, uint16_t *distance_mm, bool *new_data)
Implement non-blocking read sequence The data reading actually starts when the read_state is set to V...
void sonar_vl53l1x_read(void)
bool VL53L1X_NonBlocking_IsIdle(VL53L1_DEV dev)
Test is read status is on idle.
static void sonar_vl53l1x_publish(uint16_t range_mm)
#define SONAR_VL53L1X_OFFSET
#define SONAR_VL53L1X_TIMINGBUDGET_MS
void sonar_vl53l1x_event(void)
#define SONAR_VL53L1X_DISTANCEMODE