Skip to content

Add and use i2c_probe_fn_t + probe_i2c_buses#32093

Merged
tridge merged 1 commit intoArduPilot:masterfrom
peterbarker:pr/rangefinder-i2c-probefn
Feb 9, 2026
Merged

Add and use i2c_probe_fn_t + probe_i2c_buses#32093
tridge merged 1 commit intoArduPilot:masterfrom
peterbarker:pr/rangefinder-i2c-probefn

Conversation

@peterbarker
Copy link
Contributor

@peterbarker peterbarker commented Feb 4, 2026

Building on #31384 , factors common iteration-of-rangefinder-buses into a method, saving LoC and flash.

Board                    AP_Periph  antennatracker  blimp  bootloader  copter  heli  iofirmware  plane  rover  sub
CubeOrange-periph-heavy  *                                 *                                                   
Durandal                            *               *      *           -392    -392              -392   -392   -392
Hitec-Airspeed           *                                 *                                                   
KakuteH7-bdshot                     *               *      *           -376    -376              -376   -376   -376
MatekF405                           *               *      *           32      24                32     24     24
Pixhawk1-1M-bdshot                  *               *                  -392    -384              -392   -384   -392
SITL_x86_64_linux_gnu               *               *                  0       0                 0      0      0
f103-QiotekPeriph        *                                 *                                                   
f303-MatekGPS            -344                              *                                                   
f303-Universal           -336                              *                                                   
iomcu                                                                                *                         
mindpx-v2                           *               *      *           -400    -392              -392   -392   -400
revo-mini                           *               *      *           24      24                32     32     24
skyviper-v2450                                                         *                                       
speedybeef4                         *               *      *           24      32                32     32     32

(the Matek board etc. only includes a single i2c backend, so it will only benefit if we add a second in there)

@peterbarker peterbarker force-pushed the pr/rangefinder-i2c-probefn branch from adc7dfe to 5f56287 Compare February 4, 2026 08:43
@peterbarker peterbarker marked this pull request as ready for review February 4, 2026 08:43
@peterbarker peterbarker moved this to ReadyForDevCall in Peter's ArduPilot 4.7 Queue Feb 4, 2026
@peterbarker
Copy link
Contributor Author

Relying on the autotests to check these - we have simulators for each of these, I've looked at the results and they seem good.

*device_ptr),
instance)) {
break;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one was missing the delete.

@tridge tridge merged commit f75f801 into ArduPilot:master Feb 9, 2026
111 of 113 checks passed
@github-project-automation github-project-automation bot moved this from ReadyForDevCall to Done in Peter's ArduPilot 4.7 Queue Feb 9, 2026
@peterbarker peterbarker deleted the pr/rangefinder-i2c-probefn branch February 10, 2026 01:10
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.

4 participants