mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-14 06:01:35 +08:00
Simulator: Added Roman's sensors combined topic
Simulator can work as before with -s flag or with Roman's additions to publish the sensors combined topic using -p flag. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -39,6 +39,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <semaphore.h>
|
||||
#include <uORB/topics/sensor_combined.h>
|
||||
#include <drivers/drv_accel.h>
|
||||
#include <drivers/drv_gyro.h>
|
||||
#include <drivers/drv_baro.h>
|
||||
#include <drivers/drv_mag.h>
|
||||
#include <uORB/uORB.h>
|
||||
|
||||
namespace simulator {
|
||||
|
||||
@@ -151,11 +157,18 @@ private:
|
||||
#ifndef __PX4_QURT
|
||||
void updateSamples();
|
||||
#endif
|
||||
void publishSensorsCombined();
|
||||
|
||||
static Simulator *_instance;
|
||||
|
||||
simulator::Report<simulator::RawAccelData> _accel;
|
||||
simulator::Report<simulator::RawMPUData> _mpu;
|
||||
simulator::Report<simulator::RawBaroData> _baro;
|
||||
|
||||
orb_advert_t _accel_pub;
|
||||
orb_advert_t _baro_pub;
|
||||
orb_advert_t _gyro_pub;
|
||||
orb_advert_t _mag_pub;
|
||||
orb_advert_t _sensor_combined_pub;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user