mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 22:23:35 +08:00
delete control_state and cleanup vehicle_attitude (#7882)
This commit is contained in:
@@ -54,11 +54,13 @@
|
||||
#include <mathlib/mathlib.h>
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <systemlib/pid/pid.h>
|
||||
#include <uORB/topics/control_state.h>
|
||||
#include <uORB/Subscription.hpp>
|
||||
#include <uORB/topics/fw_pos_ctrl_status.h>
|
||||
#include <uORB/topics/manual_control_setpoint.h>
|
||||
#include <uORB/topics/parameter_update.h>
|
||||
#include <uORB/topics/position_setpoint_triplet.h>
|
||||
#include <uORB/topics/sensor_bias.h>
|
||||
#include <uORB/topics/vehicle_attitude.h>
|
||||
#include <uORB/topics/vehicle_attitude_setpoint.h>
|
||||
#include <uORB/topics/vehicle_control_mode.h>
|
||||
#include <uORB/topics/vehicle_global_position.h>
|
||||
@@ -66,6 +68,8 @@
|
||||
|
||||
using matrix::Dcmf;
|
||||
|
||||
using uORB::Subscription;
|
||||
|
||||
class GroundRoverPositionControl
|
||||
{
|
||||
public:
|
||||
@@ -96,13 +100,11 @@ private:
|
||||
bool _task_running{false}; /**< if true, task is running in its mainloop */
|
||||
|
||||
int _control_mode_sub{-1}; /**< control mode subscription */
|
||||
int _ctrl_state_sub{-1}; /**< control state subscription */
|
||||
int _global_pos_sub{-1};
|
||||
int _manual_control_sub{-1}; /**< notification of manual control updates */
|
||||
int _params_sub{-1}; /**< notification of parameter updates */
|
||||
int _pos_sp_triplet_sub{-1};
|
||||
|
||||
control_state_s _ctrl_state{}; /**< control state */
|
||||
fw_pos_ctrl_status_s _gnd_pos_ctrl_status{}; /**< navigation capabilities */
|
||||
manual_control_setpoint_s _manual{}; /**< r/c channel data */
|
||||
position_setpoint_triplet_s _pos_sp_triplet{}; /**< triplet of mission items */
|
||||
@@ -110,6 +112,9 @@ private:
|
||||
vehicle_control_mode_s _control_mode{}; /**< control mode */
|
||||
vehicle_global_position_s _global_pos{}; /**< global vehicle position */
|
||||
|
||||
Subscription<vehicle_attitude_s> _sub_attitude;
|
||||
Subscription<sensor_bias_s> _sub_sensors;
|
||||
|
||||
perf_counter_t _loop_perf; /**< loop performance counter */
|
||||
|
||||
hrt_abstime _control_position_last_called{0}; /**<last call of control_position */
|
||||
@@ -180,7 +185,6 @@ private:
|
||||
int parameters_update();
|
||||
|
||||
void manual_control_setpoint_poll();
|
||||
void control_state_poll();
|
||||
void position_setpoint_triplet_poll();
|
||||
void vehicle_control_mode_poll();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user