mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-01 17:00:34 +08:00
FlightModeManager: make sure emergency failsafe works
This commit is contained in:
committed by
Daniel Agar
parent
8329208b84
commit
8edb06e94f
@@ -430,17 +430,10 @@ void FlightModeManager::generateTrajectorySetpoint(const float dt,
|
||||
|
||||
_flight_tasks.setYawHandler(_wv_controller);
|
||||
|
||||
// In case flight task was not able to update correctly we send the empty setpoint which makes the position controller failsafe.
|
||||
if (_flight_tasks.update()) {
|
||||
setpoint = _flight_tasks.getPositionSetpoint();
|
||||
constraints = _flight_tasks.getConstraints();
|
||||
|
||||
//_failsafe_land_hysteresis.set_state_and_update(false, time_stamp_now); TODO
|
||||
|
||||
} else {
|
||||
// FAILSAFE
|
||||
// Task was not able to update correctly. Do Failsafe.
|
||||
// by sending out an empty setpoint that is not executable to make the position controller failsafe
|
||||
// TODO test failsafe
|
||||
}
|
||||
|
||||
landing_gear_s landing_gear = _flight_tasks.getGear();
|
||||
|
||||
Reference in New Issue
Block a user