33 #include "pprzlink/messages.h"
40 bool log_temod_started;
48 #define TEMOD_I2C_DEV i2c0
52 #define TEMOD_TYPE TEMOD_I2C_R1
55 #define TEMOD_SLAVE_ADDR 0xF0
62 log_temod_started =
false;
99 if (!log_temod_started) {
100 sdLogWriteLog(
pprzLogFile,
"TEMOD: Temp(degC) GPS_fix TOW(ms) Week Lat(1e7deg) Lon(1e7deg) HMSL(mm) gspeed(cm/s) course(1e7deg) climb(cm/s)\n");
101 log_temod_started =
true;
104 sdLogWriteLog(
pprzLogFile,
"temod: %9.4f %d %d %d %d %d %d %d %d %d\n",
Common code for AP and FBW telemetry.
struct GpsState gps
global GPS state
Device independent GPS code (interface)
uint32_t tow
GPS time of week in ms.
int32_t hmsl
height above mean sea level (MSL) in mm
struct LlaCoor_i lla_pos
position in LLA (lat,lon: deg*1e7; alt: mm over ellipsoid)
int32_t course
GPS course over ground in rad*1e7, [0, 2*Pi]*1e7 (CW/north)
struct NedCoor_i ned_vel
speed NED in cm/s
uint16_t gspeed
norm of 2d ground speed in cm/s
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
enum I2CTransactionStatus status
Transaction status.
bool i2c_receive(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint16_t len)
Submit a read only transaction.
@ I2CTransSuccess
transaction successfully finished by I2C driver
@ I2CTransFailed
transaction failed
@ I2CTransDone
transaction set to done by user level
I2C transaction structure.
int32_t lat
in degrees*1e7
int32_t lon
in degrees*1e7
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
arch independent LED (Light Emitting Diodes) API
void temod_periodic(void)
struct i2c_transaction tmd_trans
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.