mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-01 22:41:36 +08:00
- fixed bad pitch setpoint in fw pos controller for tailsitter
- created enum for vtol types - minor cleanup and fixes
This commit is contained in:
@@ -134,15 +134,15 @@ VtolAttitudeControl::VtolAttitudeControl() :
|
||||
/* fetch initial parameter values */
|
||||
parameters_update();
|
||||
|
||||
if (_params.vtol_type == 0) {
|
||||
if (_params.vtol_type == vtol_type::TAILSITTER) {
|
||||
_tailsitter = new Tailsitter(this);
|
||||
_vtol_type = _tailsitter;
|
||||
|
||||
} else if (_params.vtol_type == 1) {
|
||||
} else if (_params.vtol_type == vtol_type::TILTROTOR) {
|
||||
_tiltrotor = new Tiltrotor(this);
|
||||
_vtol_type = _tiltrotor;
|
||||
|
||||
} else if (_params.vtol_type == 2) {
|
||||
} else if (_params.vtol_type == vtol_type::STANDARD) {
|
||||
_standard = new Standard(this);
|
||||
_vtol_type = _standard;
|
||||
|
||||
|
||||
@@ -150,7 +150,6 @@ void VtolType::update_fw_state()
|
||||
{
|
||||
// copy virtual attitude setpoint to real attitude setpoint
|
||||
memcpy(_v_att_sp, _fw_virtual_att_sp, sizeof(vehicle_attitude_setpoint_s));
|
||||
|
||||
_mc_roll_weight = 0.0f;
|
||||
_mc_pitch_weight = 0.0f;
|
||||
_mc_yaw_weight = 0.0f;
|
||||
|
||||
@@ -68,6 +68,12 @@ enum mode {
|
||||
EXTERNAL
|
||||
};
|
||||
|
||||
enum vtol_type {
|
||||
TAILSITTER = 0,
|
||||
TILTROTOR,
|
||||
STANDARD
|
||||
};
|
||||
|
||||
class VtolAttitudeControl;
|
||||
|
||||
class VtolType
|
||||
|
||||
Reference in New Issue
Block a user