|
|
|
@ -94,6 +94,13 @@ struct RawBaroData {
@@ -94,6 +94,13 @@ struct RawBaroData {
|
|
|
|
|
}; |
|
|
|
|
#pragma pack(pop) |
|
|
|
|
|
|
|
|
|
#pragma pack(push, 1) |
|
|
|
|
struct RawAirspeedData { |
|
|
|
|
float temperature; |
|
|
|
|
float diff_pressure; |
|
|
|
|
}; |
|
|
|
|
#pragma pack(pop) |
|
|
|
|
|
|
|
|
|
#pragma pack(push, 1) |
|
|
|
|
struct RawGPSData { |
|
|
|
|
int32_t lat; |
|
|
|
@ -191,12 +198,14 @@ public:
@@ -191,12 +198,14 @@ public:
|
|
|
|
|
bool getMPUReport(uint8_t *buf, int len); |
|
|
|
|
bool getBaroSample(uint8_t *buf, int len); |
|
|
|
|
bool getGPSSample(uint8_t *buf, int len); |
|
|
|
|
bool getAirspeedSample(uint8_t *buf, int len); |
|
|
|
|
|
|
|
|
|
void write_MPU_data(void *buf); |
|
|
|
|
void write_accel_data(void *buf); |
|
|
|
|
void write_mag_data(void *buf); |
|
|
|
|
void write_baro_data(void *buf); |
|
|
|
|
void write_gps_data(void *buf); |
|
|
|
|
void write_airspeed_data(void *buf); |
|
|
|
|
|
|
|
|
|
bool isInitialized() { return _initialized; } |
|
|
|
|
|
|
|
|
@ -207,6 +216,7 @@ private:
@@ -207,6 +216,7 @@ private:
|
|
|
|
|
_baro(1), |
|
|
|
|
_mag(1), |
|
|
|
|
_gps(1), |
|
|
|
|
_airspeed(1), |
|
|
|
|
_accel_pub(nullptr), |
|
|
|
|
_baro_pub(nullptr), |
|
|
|
|
_gyro_pub(nullptr), |
|
|
|
@ -238,6 +248,7 @@ private:
@@ -238,6 +248,7 @@ private:
|
|
|
|
|
simulator::Report<simulator::RawBaroData> _baro; |
|
|
|
|
simulator::Report<simulator::RawMagData> _mag; |
|
|
|
|
simulator::Report<simulator::RawGPSData> _gps; |
|
|
|
|
simulator::Report<simulator::RawAirspeedData> _airspeed; |
|
|
|
|
|
|
|
|
|
// uORB publisher handlers
|
|
|
|
|
orb_advert_t _accel_pub; |
|
|
|
|