AP_Compass: add AF9838 backend - #33872
Open
Voltafield wants to merge 2 commits into
Open
Conversation
Voltafield
force-pushed
the
AP_Compass-add-AF9838
branch
from
July 29, 2026 06:13
7ef6c16 to
bc8f469
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an AP_Compass backend for the Voltafield AF9838 I2C magnetometer.
The driver supports AF9838 detection, initialization, single-measurement acquisition, magnetic XYZ conversion to milligauss, and probing through ArduPilot I2C bus paths.
Classification & Testing (check all that apply and add your own)
Description
Changes:
AP_Compass_AF9838backend.DEVTYPE_AF9838device identification anddecode_devid.pysupport.0x0C.Hardware tested:
0x0CBuild validation:
./waf clean: PASS./waf configure --board CubePurple: PASS./waf copter: PASSbc8f469d1ae4594011569a7819f5dcdf3c5823b784e28adcf274c0301305425e53241be10abc8e3fCommit history note:
7ef6c16ecd0b3c9e1f85714322a9dadd0cd57faf.AP_Compass:andTools:commits to satisfy ArduPilot branch-convention CI.Hardware detection:
COMPASS_DEV_ID:1707009DEVTYPE_AF9838COMPASS_EXTERNAL:1Raw magnetic XYZ validation:
Additional bench validation:
Test evidence:
AF9838_ArduPilot_Test_Evidence_CubePurple_20260729.zip