Skip to content

Remove use of OwnPtr in AP_Compass#41

Open
peterbarker wants to merge 4 commits into
masterfrom
pr/compass-ownptr
Open

Remove use of OwnPtr in AP_Compass#41
peterbarker wants to merge 4 commits into
masterfrom
pr/compass-ownptr

Conversation

@peterbarker
Copy link
Copy Markdown
Owner

@peterbarker peterbarker commented May 7, 2026

Summary

Stops using OwnPtr in the compass library.

Into the future will allow further tidying of probing (removing external and rotation arguments not needed for probing), and removal of resource leaks (e.g. compass backend pointers when add_backend fails.

Fixed a release of bus pointer in the case of an allocation failure for sensor (minor problem, may not be worth the flash, maybe just comment it instead?

Classification & Testing (check all that apply and add your own)

  • Checked by a human programmer
  • Non-functional change
  • No-binary change
  • Infrastructure change (e.g. unit tests, helper scripts)
  • Automated test(s) verify changes (e.g. unit test, autotest)
  • Tested manually, description below (e.g. SITL)
  • Tested on hardware
  • Logs attached
  • Logs available on request
Board                    AP_Periph  antennatracker  blimp  bootloader  copter  heli   iofirmware  plane  rover  sub
CubeOrange-periph-heavy  -904                              *                                                    
Durandal                            -1080           -1080  *           -1080   -1080              -1080  -1080  -1080
Hitec-Airspeed           *                                 *                                                    
KakuteH7-bdshot                     -920            -920   *           -920    -920               -920   -920   -920
MatekF405                           -744            -744   *           -736    -744               -744   -744   -736
MatekH7A3                           -920            -920   *           -920    -920               -920   -920   -920
Pixhawk1-1M-bdshot                  -720            -720               -720    -720               -720   -720   -720
SITL_x86_64_linux_gnu               *               *                  *       *                  *      *      *
YJUAV_A6SE                          -1104           -1104  *           -1088   -1072              -1072  -1072  -1072
f103-QiotekPeriph        -648                              *                                                    
f303-MatekGPS            -32                               *                                                    
f303-Universal           -664                              *                                                    
iomcu                                                                                 *                         
mindpx-v2                           -1048           -1048  *           -1048   -1048              -1048  -1048  -1048
revo-mini                           -32             -32    *           -40     -40                -32    -32    -40
skyviper-v2450                                                         -32                                      
speedybeef4                         -736            -736   *           -736    -736               -736   -736   -744

Description

@peterbarker peterbarker force-pushed the pr/compass-ownptr branch from 68acf83 to 0e2140a Compare May 7, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant