ArduCopter: don't try and send MSG_RANGEFINDER if AP_RANGEFINDER_ENABLED is false

This commit is contained in:
Iampete1 2024-02-29 15:57:37 +00:00 committed by Randy Mackay
parent 807456e18f
commit bdd8988024
1 changed files with 2 additions and 0 deletions

View File

@ -544,7 +544,9 @@ static const ap_message STREAM_EXTRA3_msgs[] = {
MSG_AHRS, MSG_AHRS,
MSG_SYSTEM_TIME, MSG_SYSTEM_TIME,
MSG_WIND, MSG_WIND,
#if AP_RANGEFINDER_ENABLED
MSG_RANGEFINDER, MSG_RANGEFINDER,
#endif
MSG_DISTANCE_SENSOR, MSG_DISTANCE_SENSOR,
#if AP_TERRAIN_AVAILABLE #if AP_TERRAIN_AVAILABLE
MSG_TERRAIN, MSG_TERRAIN,