mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-14 06:01:35 +08:00
support sitl for planes
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
#include <uORB/topics/manual_control_setpoint.h>
|
||||
#include <uORB/topics/actuator_outputs.h>
|
||||
#include <uORB/topics/vehicle_attitude.h>
|
||||
#include <uORB/topics/vehicle_status.h>
|
||||
#include <drivers/drv_accel.h>
|
||||
#include <drivers/drv_gyro.h>
|
||||
#include <drivers/drv_baro.h>
|
||||
@@ -217,10 +218,12 @@ private:
|
||||
_actuator_outputs_sub(-1),
|
||||
_vehicle_attitude_sub(-1),
|
||||
_manual_sub(-1),
|
||||
_vehicle_status_sub(-1),
|
||||
_rc_input{},
|
||||
_actuators{},
|
||||
_attitude{},
|
||||
_manual{}
|
||||
_manual{},
|
||||
_vehicle_status{}
|
||||
#endif
|
||||
{}
|
||||
~Simulator() { _instance=NULL; }
|
||||
@@ -255,14 +258,16 @@ private:
|
||||
int _actuator_outputs_sub;
|
||||
int _vehicle_attitude_sub;
|
||||
int _manual_sub;
|
||||
int _vehicle_status_sub;
|
||||
|
||||
// uORB data containers
|
||||
struct rc_input_values _rc_input;
|
||||
struct actuator_outputs_s _actuators;
|
||||
struct vehicle_attitude_s _attitude;
|
||||
struct manual_control_setpoint_s _manual;
|
||||
struct vehicle_status_s _vehicle_status;
|
||||
|
||||
void poll_actuators();
|
||||
void poll_topics();
|
||||
void handle_message(mavlink_message_t *msg, bool publish);
|
||||
void send_controls();
|
||||
void pollForMAVLinkMessages(bool publish);
|
||||
|
||||
Reference in New Issue
Block a user