mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 00:43:35 +08:00
vehicle constraints: remove landing gear
- landing_gear: refactor state name - Add the keep state to the landing gear message - Adapt FlightTaskManual, FlightTaskAutoMapper, mc_pos_control, to review message definition
This commit is contained in:
committed by
Dennis Mannhart
parent
6dbed6636d
commit
de185726b3
@@ -415,9 +415,9 @@ MulticopterAttitudeControl::get_landing_gear_state()
|
||||
if (_vehicle_land_detected.landed) {
|
||||
_gear_state_initialized = false;
|
||||
}
|
||||
float landing_gear = landing_gear_s::LANDING_GEAR_DOWN; // default to down
|
||||
float landing_gear = landing_gear_s::GEAR_DOWN; // default to down
|
||||
if (_manual_control_sp.gear_switch == manual_control_setpoint_s::SWITCH_POS_ON && _gear_state_initialized) {
|
||||
landing_gear = landing_gear_s::LANDING_GEAR_UP;
|
||||
landing_gear = landing_gear_s::GEAR_UP;
|
||||
|
||||
} else if (_manual_control_sp.gear_switch == manual_control_setpoint_s::SWITCH_POS_OFF) {
|
||||
// Switching the gear off does put it into a safe defined state
|
||||
|
||||
Reference in New Issue
Block a user