enable terrain_hold when not moving vertically

This commit is contained in:
Marco Hauswirth
2025-03-18 11:28:11 +01:00
committed by Marco Hauswirth
parent 451b0a3db8
commit 283a69dedf
@@ -134,7 +134,7 @@ void FlightTaskManualAltitude::_updateAltitudeLock()
}
} else {
bool not_moving = spd_xy < 0.5f * _param_mpc_hold_max_xy.get();
bool not_moving = spd_xy < 0.5f * _param_mpc_hold_max_xy.get() && stopped;
if (!stick_input && not_moving && PX4_ISFINITE(_dist_to_bottom)) {
// Start using distance to ground