|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Driver for the TFMini ranging device when used via I2C bus. More...
Go to the source code of this file.
Data Structures | |
| struct | TFMiniI2C |
Enumerations | |
| enum | TFMiniI2CStatus { TFMINI_I2C_ACQUIRE , TFMINI_I2C_PARSE } |
Functions | |
| void | tfmini_i2c_init (void) |
| Set the default values at initialization. | |
| void | tfmini_i2c_event (void) |
| Ranger event function Basically just check the progress of the transation to prevent overruns during high speed operation (ie. | |
| void | tfmini_i2c_periodic (void) |
| Get the ranger current distance value. | |
| void | tfmini_i2c_downlink (void) |
Variables | |
| struct TFMiniI2C | tfmini_i2c |
Driver for the TFMini ranging device when used via I2C bus.
Driver for the TFMini ranging device connected via I2C port.
Driver for the I2C and S version of the TFMini(and TFLuna) based range sensor Reads sensor using I2Cinput and outputs the distance to object or ground
Definition in file tfmini_i2c.h.
| struct TFMiniI2C |
Definition at line 42 of file tfmini_i2c.h.
| Data Fields | ||
|---|---|---|
| uint8_t | addr | |
| bool | compensate_rotation | |
| float | dist | Sacled distance measured in [m]. |
| float | offset | offset to what one considers a zero distance to sensor in [m] |
| uint16_t | raw_dist | raw non scaled value from sensor |
| enum TFMiniI2CStatus | status | |
| uint16_t | strength | strength of reflect signal, not implemented ATM |
| struct i2c_transaction | trans | |
| bool | update_agl | Do or don't update AGL ABI message. |
| enum TFMiniI2CStatus |
| Enumerator | |
|---|---|
| TFMINI_I2C_ACQUIRE | |
| TFMINI_I2C_PARSE | |
Definition at line 37 of file tfmini_i2c.h.
|
extern |
Definition at line 247 of file tfmini_i2c.c.
References DefaultChannel, DefaultDevice, and tfmini_i2c.
|
extern |
Ranger event function Basically just check the progress of the transation to prevent overruns during high speed operation (ie.
polling the ranger at >100Hz)
Definition at line 167 of file tfmini_i2c.c.
References I2CTransDone, I2CTransFailed, I2CTransPending, I2CTransRunning, I2CTransSuccess, and tfmini_i2c.
|
extern |
Set the default values at initialization.
Definition at line 142 of file tfmini_i2c.c.
References DefaultPeriodic, I2CTransDone, register_periodic_telemetry(), tfmini_i2c, TFMINI_I2C_ACQUIRE, TFMINI_I2C_ADDR, TFMINI_I2C_OFFSET, and tfmini_i2c_send_lidar().
|
extern |
Get the ranger current distance value.
Definition at line 196 of file tfmini_i2c.c.
References AGL_LIDAR_TFMINI_I2C_ID, get_sys_time_usec(), i2c_blocking_transceive(), I2CTransDone, FloatEulers::phi, stateGetNedToBodyEulers_f(), stateGetPositionEnu_f(), tfmini_i2c, TFMINI_I2C_ACQUIRE, TFMINI_I2C_MAX_RANGE, TFMINI_I2C_MIN_RANGE, TFMINI_I2C_PARSE, FloatEulers::theta, and EnuCoor_f::z.
|
extern |
Definition at line 125 of file tfmini_i2c.c.
Referenced by tfmini_i2c_downlink(), tfmini_i2c_event(), tfmini_i2c_init(), tfmini_i2c_periodic(), and tfmini_i2c_send_lidar().