mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-06 19:00:27 +08:00
has_data() returns true for OutOfRangeHigh and OutOfRangeLow in addition to Good. A DroneCAN publisher following the DSDL sends exactly max_distance on TOO_FAR and min_distance on TOO_CLOSE. Those boundary values pass the inclusive distance check and produce a phantom obstacle at the sensor's range limit, which AC_Avoid acts on. The same path on upward-facing sensors produces a phantom ceiling. Gate both the horizontal and upward branches on Status::Good so only real measurements are pushed into the proximity boundary and OA database. OutOfRange readings now fall through to reset_face / invalidate _distance_upward, matching the existing out-of-band behavior.