|
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "generated/airframe.h"#include "modules/lidar/tfmini_i2c.h"#include "modules/core/abi.h"#include "modules/datalink/telemetry.h"#include "pprzlink/messages.h"
Include dependency graph for tfmini_i2c.c:Go to the source code of this file.
Functions | |
| static void | tfmini_i2c_send_lidar (struct transport_tx *trans, struct link_device *dev) |
| Send measured value and status information so it can be read back in e.g. | |
| 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 |
| #define AGL_LIDAR_TFMINI_I2C_ID AGL_LIDAR_TFMINI_ID |
Definition at line 47 of file tfmini_i2c.c.
| #define AUTOMATIC_DETECTION_PATTERN 0x00 |
Definition at line 73 of file tfmini_i2c.c.
| #define DETECTION_PATTERN_REG_ADDR 0x51 |
Definition at line 72 of file tfmini_i2c.c.
| #define DEVICE_RESET_ADDR 0x70 |
Definition at line 108 of file tfmini_i2c.c.
| #define DISTANCE_MODE_LONG 0x07 |
Definition at line 70 of file tfmini_i2c.c.
| #define DISTANCE_MODE_MIDDLE 0x03 |
Definition at line 69 of file tfmini_i2c.c.
| #define DISTANCE_MODE_REG_ADDR 0x50 |
Definition at line 67 of file tfmini_i2c.c.
| #define DISTANCE_MODE_SHORT 0x00 |
Definition at line 68 of file tfmini_i2c.c.
| #define EXTERNAL_TRIGGER_REG_ADDR 0x01 |
Definition at line 106 of file tfmini_i2c.c.
| #define FIXED_DETECTION_PATTERN 0x01 |
Definition at line 74 of file tfmini_i2c.c.
| #define LOWER_LIMIT_OF_SIGNAL_STRENGTH_THRESHOLD_REG_ADDR_H 0x59 |
Definition at line 86 of file tfmini_i2c.c.
| #define LOWER_LIMIT_OF_SIGNAL_STRENGTH_THRESHOLD_REG_ADDR_L 0x58 |
Definition at line 85 of file tfmini_i2c.c.
| #define OUTPUT_VALUE_OF_SIGNAL_STRENGTH_THRESHOLD_AT_THE_HIGHEST_POINT_REG_ADDR_H 0x5D |
Definition at line 95 of file tfmini_i2c.c.
| #define OUTPUT_VALUE_OF_SIGNAL_STRENGTH_THRESHOLD_AT_THE_HIGHEST_POINT_REG_ADDR_L 0x5C |
Definition at line 94 of file tfmini_i2c.c.
| #define RANGE_LIMIT_DISABLED 0x00 |
Definition at line 77 of file tfmini_i2c.c.
| #define RANGE_LIMIT_ENABLED 0x01 |
Definition at line 78 of file tfmini_i2c.c.
| #define RANGE_OUTPUT_LIMIT_THRESHOLD_REG_ADDR_H 0x57 |
Definition at line 81 of file tfmini_i2c.c.
| #define RANGE_OUTPUT_LIMIT_THRESHOLD_REG_ADDR_L 0x56 |
Definition at line 80 of file tfmini_i2c.c.
| #define SETTING_OF_RANGE_LIMIT_REG_ADDR 0x55 |
Definition at line 76 of file tfmini_i2c.c.
| #define SLAVE_ADDRESS_REG_ADDR 0x26 |
Definition at line 102 of file tfmini_i2c.c.
| #define TFMINI_I2C_ADDR 0x10 |
Definition at line 60 of file tfmini_i2c.c.
| #define TFMINI_I2C_MAX_RANGE 6.0f |
The maximum range for the device to be able to measure.
Definition at line 122 of file tfmini_i2c.c.
The minimum range for the device to be able to measure.
Definition at line 117 of file tfmini_i2c.c.
| #define TFMINI_I2C_OFFSET 0.0f |
Ranger offset value for what considered the distance should be zero, e.g. high landing gear to tarmac 60cm still could be considerd zero.
Definition at line 112 of file tfmini_i2c.c.
| #define TFMINI_I2C_READ_ADDR 0x10 |
Definition at line 65 of file tfmini_i2c.c.
| #define TFMINI_I2C_REG_ADDR 0x26 |
Definition at line 63 of file tfmini_i2c.c.
| #define TFMINI_I2C_REG_VAL 0x10 |
Definition at line 64 of file tfmini_i2c.c.
| #define TRIGGER_MODE_REG_ADDR 0x27 |
Definition at line 104 of file tfmini_i2c.c.
| #define UNIT_OF_DISTANCE_CM 0x01 |
Definition at line 100 of file tfmini_i2c.c.
| #define UNIT_OF_DISTANCE_MM 0x00 |
Definition at line 99 of file tfmini_i2c.c.
| #define UNIT_OF_DISTANCE_REG_ADDR 0x66 |
Definition at line 98 of file tfmini_i2c.c.
| #define UPPER_LIMIT_OF_SIGNAL_STRENGTH_THRESHOLD_REG_ADDR_H 0x5B |
Definition at line 91 of file tfmini_i2c.c.
| #define UPPER_LIMIT_OF_SIGNAL_STRENGTH_THRESHOLD_REG_ADDR_L 0x5A |
Definition at line 90 of file tfmini_i2c.c.
| #define USE_EXTERNAL_TRIGGER 0 |
Definition at line 105 of file tfmini_i2c.c.
Definition at line 247 of file tfmini_i2c.c.
References DefaultChannel, DefaultDevice, TFMiniI2C::dist, foo, TFMiniI2C::raw_dist, and tfmini_i2c.
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, i2c_transaction::status, tfmini_i2c, and TFMiniI2C::trans.
Set the default values at initialization.
Definition at line 142 of file tfmini_i2c.c.
References TFMiniI2C::addr, TFMiniI2C::compensate_rotation, DefaultPeriodic, TFMiniI2C::dist, foo, I2CTransDone, TFMiniI2C::offset, TFMiniI2C::raw_dist, register_periodic_telemetry(), i2c_transaction::status, TFMiniI2C::status, TFMiniI2C::strength, tfmini_i2c, TFMINI_I2C_ACQUIRE, TFMINI_I2C_ADDR, TFMINI_I2C_OFFSET, tfmini_i2c_send_lidar(), TFMiniI2C::trans, and TFMiniI2C::update_agl.
Here is the call graph for this function:Get the ranger current distance value.
Definition at line 196 of file tfmini_i2c.c.
References TFMiniI2C::addr, AGL_LIDAR_TFMINI_I2C_ID, i2c_transaction::buf, TFMiniI2C::compensate_rotation, TFMiniI2C::dist, foo, get_sys_time_usec(), i2c_blocking_transceive(), I2CTransDone, TFMiniI2C::offset, FloatEulers::phi, TFMiniI2C::raw_dist, stateGetNedToBodyEulers_f(), stateGetPositionEnu_f(), i2c_transaction::status, TFMiniI2C::status, tfmini_i2c, TFMINI_I2C_ACQUIRE, TFMINI_I2C_MAX_RANGE, TFMINI_I2C_MIN_RANGE, TFMINI_I2C_PARSE, FloatEulers::theta, TFMiniI2C::trans, TFMiniI2C::update_agl, and EnuCoor_f::z.
Here is the call graph for this function:
|
static |
Send measured value and status information so it can be read back in e.g.
log file for debugging
Definition at line 130 of file tfmini_i2c.c.
References dev, TFMiniI2C::dist, foo, i2c_transaction::status, TFMiniI2C::status, tfmini_i2c, and TFMiniI2C::trans.
Referenced by tfmini_i2c_init().
Here is the caller graph for this function:| struct TFMiniI2C tfmini_i2c |
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().