-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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
Add specific defines for sending of GPS mavlink messages #28572
Add specific defines for sending of GPS mavlink messages #28572
Conversation
do any need to be included in the build server? |
Not at this time, I think. As I mused above, we could potentially remove the RTK sending stuff in a future PR - and then we would need it in the custom build server. Maybe. I'm a bit surprised these aren't gated on moving baseline being compield in or similar, but that might mean the compiler is eliding anyway. I wanted a no-compiler-output change :-) |
@@ -104,3 +104,20 @@ | |||
#ifndef HAL_GPS_COM_PORT_DEFAULT | |||
#define HAL_GPS_COM_PORT_DEFAULT 1 | |||
#endif | |||
|
|||
|
|||
#ifndef AP_GPS_GPS_RAW_INT_SENDING_ENABLED |
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.
I don't think we want or need to be able to control these individually. Instead a single define AP_GPS_LEGACY_MESSAGE_SENDING_ENABLED would be a lot simpler
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.
I've pushed up a patch which uses the new more-details defines to save 300-odd bytes on boards that don't have either of ERB or SBF:
Board AP_Periph blimp bootloader copter heli iofirmware plane rover sub
CubeOrange-periph-heavy *
CubeRedPrimary * * * * * * *
Durandal * * * * * * *
Hitec-Airspeed *
KakuteH7-bdshot * * * * * * *
MatekF405 -312 * -312 -312 -312 -320 -312
Pixhawk1-1M-bdshot -312 -312 -312 -312 -304 -312
f103-QiotekPeriph *
f303-Universal *
iomcu *
revo-mini -312 * -312 -312 -312 -312 -312
skyviper-journey *
skyviper-v2450 -280
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.
.... also, if you only have a single GPS (#26751) we can save a few hundred more bytes for a year or two.
86c93cd
to
0d9e12a
Compare
0d9e12a
to
9402d6e
Compare
This will allow us to remove these messages from the code eventually.
We can also adjust the defines (in a future PR) to remove the ability to send RTK mavlink messages based on which GPS backends are compiled in (only supported on 2 uncommon backends)