flight_mode_manager: invalidate dist to bottom/ground on terrain reset

- this allows the terrain hold to simply reset on the next valid update
   rather than trying to adjust the setpoints
This commit is contained in:
Daniel Agar
2024-10-04 11:28:03 -04:00
parent 34ee097f02
commit ad28c5893b
3 changed files with 9 additions and 0 deletions
@@ -66,6 +66,8 @@ void FlightTask::_checkEkfResetCounters()
if (_sub_vehicle_local_position.get().dist_bottom_reset_counter != _reset_counters.hagl) {
_ekfResetHandlerHagl(_sub_vehicle_local_position.get().delta_dist_bottom);
_reset_counters.hagl = _sub_vehicle_local_position.get().dist_bottom_reset_counter;
_dist_to_bottom = NAN;
}
if (_sub_vehicle_local_position.get().vz_reset_counter != _reset_counters.vz) {