mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 14:43:33 +08:00
Rework landing gear logic
- remove deprecated actuator_controls[INDEX_LANDING_GEAR] - remove dead code in mc rate controller that used to prevent it from being retracted on the ground (anyway had no effect as it only affected the actuator_control[LANDING_GEAR] which wasn't sent to the control allocation) - for VTOLs handle deployment/retraction of landing gear in AUTO as a MC (retract if more than 2m above ground, deploy if WP is a landing WP), plus additionally when transition flight task is called (ALTITUDE mode and higher) - for FW in AUTO: add logic in FW Position Controller, depending on waypoint type mainly - manual landing gear settings always come through (a manual command overrides a previous auto command, and vice-versa) Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -42,8 +42,6 @@
|
||||
#include "tiltrotor.h"
|
||||
#include "vtol_att_control_main.h"
|
||||
|
||||
#include <uORB/topics/landing_gear.h>
|
||||
|
||||
using namespace matrix;
|
||||
using namespace time_literals;
|
||||
|
||||
@@ -450,14 +448,6 @@ void Tiltrotor::fill_actuator_outputs()
|
||||
collective_thrust_normalized_setpoint = mc_in[actuator_controls_s::INDEX_THROTTLE] * _mc_throttle_weight;
|
||||
}
|
||||
|
||||
// Landing gear
|
||||
if (_vtol_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;
|
||||
}
|
||||
|
||||
// Fixed wing output
|
||||
if (_param_vt_elev_mc_lock.get() && _vtol_mode == vtol_mode::MC_MODE) {
|
||||
fw_out[actuator_controls_s::INDEX_ROLL] = 0;
|
||||
|
||||
Reference in New Issue
Block a user