Paparazzi UAS
v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
|
#include "modules/range_finder/teraranger_one.h"
#include "mcu_periph/i2c.h"
#include "subsystems/abi.h"
#include "subsystems/datalink/downlink.h"
Go to the source code of this file.
Macros | |
#define | TERARANGER_ONE_I2C_ADDR 0x60 |
#define | TERARANGER_ONE_OFFSET 0.f |
#define | USE_TERARANGER_ONE_AGL TRUE |
Functions | |
static uint8_t | teraranger_crc8 (uint8_t *p, uint8_t len) |
void | teraranger_init (void) |
void | teraranger_periodic (void) |
void | teraranger_event (void) |
void | teraranger_downlink (void) |
Variables | |
static const uint8_t | crc_table [] |
struct TeraRanger | teraranger |
struct i2c_transaction | teraranger_i2c_trans |
Definition in file teraranger_one.c.
#define TERARANGER_ONE_I2C_ADDR 0x60 |
Definition at line 39 of file teraranger_one.c.
Referenced by teraranger_periodic().
#define TERARANGER_ONE_OFFSET 0.f |
Definition at line 44 of file teraranger_one.c.
Referenced by teraranger_init().
#define USE_TERARANGER_ONE_AGL TRUE |
Definition at line 49 of file teraranger_one.c.
Referenced by teraranger_event().
Definition at line 76 of file teraranger_one.c.
References crc.
Referenced by teraranger_event().
void teraranger_downlink | ( | void | ) |
Definition at line 143 of file teraranger_one.c.
References DefaultChannel, DefaultDevice, TeraRanger::dist, TeraRanger::raw, and teraranger.
void teraranger_event | ( | void | ) |
Definition at line 114 of file teraranger_one.c.
References AGL_TERARANGER_ONE_ID, i2c_transaction::buf, TeraRanger::data_available, TeraRanger::dist, get_sys_time_usec(), I2CTransDone, I2CTransFailed, I2CTransSuccess, TeraRanger::offset, TeraRanger::raw, i2c_transaction::status, teraranger, teraranger_crc8(), teraranger_i2c_trans, and USE_TERARANGER_ONE_AGL.
void teraranger_init | ( | void | ) |
Definition at line 95 of file teraranger_one.c.
References TeraRanger::data_available, TeraRanger::dist, I2CTransDone, TeraRanger::offset, TeraRanger::raw, i2c_transaction::status, teraranger, teraranger_i2c_trans, and TERARANGER_ONE_OFFSET.
void teraranger_periodic | ( | void | ) |
Definition at line 106 of file teraranger_one.c.
References i2c_receive(), I2CTransDone, i2c_transaction::status, teraranger_i2c_trans, and TERARANGER_ONE_I2C_ADDR.
|
static |
Definition at line 53 of file teraranger_one.c.
struct TeraRanger teraranger |
Definition at line 90 of file teraranger_one.c.
Referenced by teraranger_downlink(), teraranger_event(), and teraranger_init().
struct i2c_transaction teraranger_i2c_trans |
Definition at line 93 of file teraranger_one.c.
Referenced by teraranger_event(), teraranger_init(), and teraranger_periodic().