isentek-webbyeh b537601b7a
driver: ist8310: add IST8310J device ID support (#26134)
* driver: ist8310: add IST8310J device ID support and cross-axis compensation

IST8310J shares the same register map and initialization sequence as IST8310.

This change extends the existing IST8310 driver to:
- Accept the IST8310J device ID during probe and reset
- Load factory cross-axis calibration data from OTP
- Apply cross-axis compensation to raw magnetometer samples

The cross-axis compensation corrects factory axis misalignment only and
does not replace PX4 runtime magnetometer calibration.

Tested on Raspberry Pi using I2C with both IST8310 and IST8310J devices.

Signed-off-by: webbyeh <webbyeh@isentek.com>

* driver: ist8310: add IST8310J device ID support

IST8310J shares the same register map and initialization sequence as IST8310.

Factory cross-axis compensation support was evaluated but has been removed
in this revision due to flash size constraints on embedded targets. The
driver now focuses on device identification and stability, while relying on
the existing PX4 magnetometer calibration framework.

This commit also addresses review feedback by caching the WAI register value
to avoid redundant I2C reads during the reset wait state.

Tested on Raspberry Pi using I2C with both IST8310 and IST8310J devices.

Signed-off-by: webbyeh <webbyeh@isentek.com>

* Fix formatting issues in IST8310.cpp

---------

Signed-off-by: webbyeh <webbyeh@isentek.com>
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2025-12-17 17:14:17 -09:00
..
2025-12-17 10:33:21 -09:00
2025-08-03 18:45:41 -08:00
2025-03-10 18:59:52 -04:00
2025-09-18 15:50:10 +02:00
2024-12-19 07:30:25 +01:00