Skip to content
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

Merged
merged 9 commits into from
Nov 13, 2024

Conversation

peterbarker
Copy link
Contributor

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)

Board                    AP_Periph  blimp  bootloader  copter  heli  iofirmware  plane  rover  sub
CubeOrange-periph-heavy  *                                                                     
CubeRedPrimary                      *      *           *       *                 *      *      *
Durandal                            *      *           *       *                 *      *      *
Hitec-Airspeed           *                                                                     
KakuteH7-bdshot                     *      *           *       *                 *      *      *
MatekF405                           *      *           *       *                 *      *      *
Pixhawk1-1M-bdshot                  *                  *       *                 *      *      *
f103-QiotekPeriph        *                                                                     
f303-Universal           *                                                                     
iomcu                                                                *                         
revo-mini                           *      *           *       *                 *      *      *
skyviper-journey                                       *                                       
skyviper-v2450                                         *                                       

@Hwurzburg
Copy link
Collaborator

do any need to be included in the build server?

@peterbarker
Copy link
Contributor Author

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 :-)

tridge
tridge previously requested changes Nov 12, 2024
@@ -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
Copy link
Contributor

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

Copy link
Contributor Author

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                                    

Copy link
Contributor Author

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.

@peterbarker peterbarker force-pushed the pr/specific-defines-gps-messages branch from 86c93cd to 0d9e12a Compare November 12, 2024 06:01
@peterbarker peterbarker force-pushed the pr/specific-defines-gps-messages branch from 0d9e12a to 9402d6e Compare November 12, 2024 06:37
@tridge tridge merged commit 20fa2b0 into ArduPilot:master Nov 13, 2024
99 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants