-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Allow sending of rangefinder message to be compiled out of the code #29923
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow sending of rangefinder message to be compiled out of the code #29923
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the conditional compilation of the rangefinder MAVLink message by replacing references to AP_RANGEFINDER_ENABLED with the new AP_MAVLINK_MSG_RANGEFINDER_SENDING_ENABLED macro in most relevant locations.
- Refactored conditional blocks in files to guard the MSG_RANGEFINDER-related code with the new macro.
- Updated configuration and build scripts to include the new feature flag for rangefinder message sending.
- Maintained separate conditional compilation for water depth functionality on Rover where intended.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
libraries/GCS_MAVLink/ap_message.h | Updated conditional block to include MSG_RANGEFINDER only if new macro is enabled. |
libraries/GCS_MAVLink/GCS_config.h | Added include and macro definition for AP_MAVLINK_MSG_RANGEFINDER_SENDING_ENABLED. |
libraries/GCS_MAVLink/GCS_MAVLink_Parameters.cpp | Replaced AP_RANGEFINDER_ENABLED with the new macro for MSG_RANGEFINDER and organized water depth condition. |
libraries/GCS_MAVLink/GCS_Common.cpp | Updated conditional and ending comments for rangefinder message sending. |
libraries/GCS_MAVLink/GCS.h | Updated the send_rangefinder declaration to be conditionally compiled with the new macro. |
Tools/scripts/extract_features.py | Added the new feature mapping for AP_MAVLINK_MSG_RANGEFINDER_SENDING_ENABLED. |
Tools/scripts/build_options.py | Included a new build feature flag for RANGEFINDER_SENDING. |
Rover/GCS_MAVLink_Rover.h | Updated the send_rangefinder declaration with the new macro while keeping water depth condition unchanged. |
Rover/GCS_MAVLink_Rover.cpp | Updated the rangefinder sending functions to use the new conditional macro. |
c6110a6
to
216eb6f
Compare
216eb6f
to
affc4bd
Compare
fab3d67
to
c9cf1a2
Compare
f690610
to
bad5382
Compare
bad5382
to
e0a96c5
Compare
This PR is a no-binary-output change. Removing sending rangefinder message - which we intend to do in quite-some-time - will impact the wiki a bit. For example on https://ardupilot.org/copter/docs/common-ainstein-lrd1.html we have a picture showing "sonarrange" - and given the next field is voltage I'm betting those interface elements are actually coming from |
Minimal actual flash savings: