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

Tidy use of backend type in AP_GPS #26480

Merged
merged 3 commits into from
Mar 11, 2024

Conversation

peterbarker
Copy link
Contributor

Also uses get_type in a few spots to avoid external callers doing something nasty.

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

In preparation for making AP_GPS_Params

some of these methods are taking the instance in externally.  Protect by using get_type
get_type has this sanity check
@peterbarker
Copy link
Contributor Author

I've tested this on my lots-of-GPS vehicle, and it still finds both GPSs and they still act appropriately.

@tridge tridge merged commit 466b4b6 into ArduPilot:master Mar 11, 2024
91 checks passed
@peterbarker peterbarker deleted the pr/type-variables branch March 11, 2024 23:40
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