GCS_MAVLink: add and use defines for all Proximity backends

This commit is contained in:
Peter Barker 2023-04-05 22:59:30 +10:00 committed by Peter Barker
parent c110ac489c
commit af5f702c36

View File

@ -433,9 +433,11 @@ void GCS_MAVLINK::send_distance_sensor()
AP_Proximity *proximity = AP_Proximity::get_singleton();
if (proximity != nullptr) {
for (uint8_t i = 0; i < proximity->num_sensors(); i++) {
#if AP_PROXIMITY_RANGEFINDER_ENABLED
if (proximity->get_type(i) == AP_Proximity::Type::RangeFinder) {
filter_possible_proximity_sensors = true;
}
#endif
}
}
#endif