reset dist_to_ground_lock if dist_to_bottom is not valid. this avoids a reset to a previous dist_to_ground after a switch back to a valid measurement

This commit is contained in:
Marco Hauswirth 2025-02-13 11:24:29 +01:00 committed by Marco Hauswirth
parent fe5c887895
commit 61d595dc64

View File

@ -129,6 +129,7 @@ void FlightTaskManualAltitude::_updateAltitudeLock()
} else {
_position_setpoint(2) = _position(2);
_dist_to_ground_lock = NAN;
}
}