|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
33 #include "generated/airframe.h"
40 #ifndef GENERIC_COM_I2C_DEV
41 #define GENERIC_COM_I2C_DEV i2c0
44 #ifndef GENERIC_COM_SLAVE_ADDR
45 #define GENERIC_COM_SLAVE_ADDR 0x26
58 #define FillBufWith32bit(_buf, _index, _value) { \
59 _buf[_index] = (uint8_t) (_value); \
60 _buf[_index+1] = (uint8_t) ((_value) >> 8); \
61 _buf[_index+2] = (uint8_t) ((_value) >> 16); \
62 _buf[_index+3] = (uint8_t) ((_value) >> 24); \
65 #define FillBufWith16bit(_buf, _index, _value) { \
66 _buf[_index] = (uint8_t) (_value); \
67 _buf[_index+1] = (uint8_t) ((_value) >> 8); \
int32_t lon
in degrees*1e7
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
int32_t alt
in millimeters above WGS84 reference ellipsoid
void generic_com_event(void)
uint16_t flight_time
flight time in seconds
@ I2CTransFailed
transaction failed
struct i2c_transaction com_trans
float vsupply
supply voltage in V
@ I2CTransSuccess
transaction successfully finished by I2C driver
int32_t lat
in degrees*1e7
bool i2c_transmit(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len)
Submit a write only transaction.
Device independent GPS code (interface)
struct pprz_autopilot autopilot
Global autopilot structure.
static float stateGetAirspeed_f(void)
Get airspeed (float).
uint16_t gspeed
norm of 2d ground speed in cm/s
uint16_t charge[CHARGE_NB]
#define FillBufWith32bit(_buf, _index, _value)
enum I2CTransactionStatus status
Transaction status.
#define GENERIC_COM_I2C_DEV
void generic_com_init(void)
I2C transaction structure.
int32_t course
GPS course over ground in rad*1e7, [0, 2*Pi]*1e7 (CW/north)
void generic_com_periodic(void)
struct LlaCoor_i lla_pos
position in LLA (lat,lon: deg*1e7; alt: mm over ellipsoid)
@ I2CTransDone
transaction set to done by user level
#define FillBufWith16bit(_buf, _index, _value)
struct Electrical electrical
uint8_t autopilot_get_mode(void)
get autopilot mode
#define GENERIC_COM_SLAVE_ADDR
struct GpsState gps
global GPS state