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

AP_GPS: move blended-GPS functions into AP_GPS_Blended #26565

Merged
merged 1 commit into from
Mar 20, 2024

Conversation

peterbarker
Copy link
Contributor

collects all of these together in preparation for making a backend

This is simply a 1:1 move of the code from one file to another.

Concept is that these functions will become backend methods, and we can retain history of those modifications made if we move these ahead of time.

Despite being 1:1 copy (I did the whole thing twice!), there are compiler output changes:

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

I've run elf-diff across this and it really does seem to come down to the compiler optimising things differently. The fact Durandal shrinks while others grow seems to back that conclusion up.

Current plan for making the backend (and onwards):

  • we will initialliy maintain the "third instance is blended" semantics
  • we will new the backend and treat it like the other GPSs as much as possible.
    • determination of primary is still going to be "interesting"
  • we would probably do other prepartory work to allow GPS_MAX_BACKENDS > 2 here (e.g. RTK rover mapping / magic-rover-yaw-switching)
  • after the new backend is in place we can come back and work out parameter conversions such that if a user was using blending then GPS3_TYPE will be set to be the blended backend. We will probably want to make the current "blend mask" parameter be a per-instance parameter.
    • we will probably eliminate GPS_MAX_INSTANCES vs GPS_MAX_RECEIVERS at the same time, replacing with GPS_MAX_BACKENDS for a clean break from the old semantics.
  • AP_GPS_BLENDED_ENABLED will require GPS_MAX_BACKENDS > 2

collects all of these together in preparation for making a backend
@tridge tridge merged commit f487a25 into ArduPilot:master Mar 20, 2024
91 checks passed
@peterbarker peterbarker deleted the pr/blended-instance-tidy branch March 20, 2024 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants