|
|
|
@ -42,6 +42,8 @@
@@ -42,6 +42,8 @@
|
|
|
|
|
#include "tailsitter.h" |
|
|
|
|
#include "vtol_att_control_main.h" |
|
|
|
|
|
|
|
|
|
#include <uORB/topics/landing_gear.h> |
|
|
|
|
|
|
|
|
|
#define PITCH_TRANSITION_FRONT_P1 -1.1f // pitch angle to switch to TRANSITION_P2
|
|
|
|
|
#define PITCH_TRANSITION_BACK -0.25f // pitch angle to switch to MC
|
|
|
|
|
|
|
|
|
@ -361,6 +363,14 @@ void Tailsitter::fill_actuator_outputs()
@@ -361,6 +363,14 @@ void Tailsitter::fill_actuator_outputs()
|
|
|
|
|
_thrust_setpoint_0->xyz[2] = -mc_in[actuator_controls_s::INDEX_THROTTLE]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Landing Gear
|
|
|
|
|
if (_vtol_schedule.flight_mode == vtol_mode::MC_MODE) { |
|
|
|
|
mc_out[actuator_controls_s::INDEX_LANDING_GEAR] = landing_gear_s::GEAR_DOWN; |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
mc_out[actuator_controls_s::INDEX_LANDING_GEAR] = landing_gear_s::GEAR_UP; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_params->elevons_mc_lock && _vtol_schedule.flight_mode == vtol_mode::MC_MODE) { |
|
|
|
|
fw_out[actuator_controls_s::INDEX_ROLL] = 0; |
|
|
|
|
fw_out[actuator_controls_s::INDEX_PITCH] = 0; |
|
|
|
|