mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-14 16:00:36 +08:00
FlightTaskManualAltitude: use stick inputs for the brake check
This commit is contained in:
committed by
Daniel Agar
parent
280cb34a77
commit
6212e9c752
@@ -92,7 +92,7 @@ void FlightTaskManualAltitude::_updateAltitudeLock()
|
||||
// If not locked, altitude setpoint is set to NAN.
|
||||
|
||||
// Check if user wants to break
|
||||
const bool apply_brake = fabsf(_velocity_setpoint(2)) <= FLT_EPSILON;
|
||||
const bool apply_brake = fabsf(_sticks_expo(2)) <= FLT_EPSILON;
|
||||
|
||||
// Check if vehicle has stopped
|
||||
const bool stopped = (MPC_HOLD_MAX_Z.get() < FLT_EPSILON || fabsf(_velocity(2)) < MPC_HOLD_MAX_Z.get());
|
||||
|
||||
Reference in New Issue
Block a user