Commit Graph
53 Commits
Author SHA1 Message Date
Peter Barker b2b1b3d279 Tools: decode_devid.py: parse device types from the C++ headers
pre-commit / ci (push) Canceled after 0s
test Renode / cubeorangeplus-quadplane (push) Canceled after 0s
test scripts / build (astyle-cleanliness) (push) Canceled after 0s
test scripts / build (check_autotest_options) (push) Canceled after 0s
test scripts / build (logger_metadata) (push) Canceled after 0s
test scripts / build (param-file-validation) (push) Canceled after 0s
test scripts / build (param_parse) (push) Canceled after 0s
test scripts / build (python-cleanliness) (push) Canceled after 0s
test scripts / build (shellcheck) (push) Canceled after 0s
test scripts / build (validate_board_list) (push) Canceled after 0s
Rather than maintaining copies of the bus and device type tables,
decode_devid.py now parses the enums in AP_HAL/Device.h, AP_SerialManager.h
and the compass, IMU, baro and airspeed backend headers using
logger_metadata/enum_parse.py.  A small rename map keeps established
display names (DRONECAN, AK0991x), and the retired LIS2MDL ID, which is
in no enum, is listed explicitly.  Comments on enum entries are shown as
warnings when decoding.

--dump-json and --dump-json5 write the tables, with a format_version
and a content-hash data_version, for tools without a source tree;
--json reads such a file back.  A copy of the script outside an
ArduPilot tree (as synced by MethodicConfigurator) reads devid.json from
its own directory.  The files are published alongside LogMessages.* by
build_log_message_documentation.sh, and CI dumps them in the
logger_metadata step so that header changes which break parsing are
caught.

The tables had drifted from the headers: ACC_LSM9DS1,
INS_ZEROONE_FPGA_SCH16T and INS_ICM56686 were missing, MMC5883 is now
MMC5983, AK8963/BMM150 had trailing spaces, and several names now
follow the headers.
2026-09-16 17:18:56 +10:00
g945643frankie e87935e3bd Tools: add ICM-56686 to decode_devid.py
DEVTYPE_INS_ICM56686 is 0x44.
2026-09-15 11:11:00 +10:00
Dr.-Ing. Amilcar do Carmo Lucas 032a861cc0 Tools: address robot issues in decode_devid.py
Some of the issues were pre-existing.
Behavior is preserved and warnings issued.
2026-09-02 17:28:56 +10:00
Dr.-Ing. Amilcar do Carmo Lucas 6679ef5658 Tools: Refactor decode_devid to be callable by python code
Also fix the lining issues

Signed-off-by: Dr.-Ing. Amilcar do Carmo Lucas <amilcar.lucas@iav.de>
2026-09-02 17:28:56 +10:00
“Jim ccc8977fd1 Tools: add AF9838 compass device ID decoding 2026-08-31 08:18:54 +10:00
Iampete1 e624e95ae5 Tools: scripts: decode_devid: add MAVLink devide decodeing 2026-08-27 10:59:59 +10:00
Iampete1 941ba1b944 Tools: Scripts: decode_devid: add missing WSPI bus type 2026-07-30 23:50:38 +10:00
Peter Hall 0b38722bd5 Tools: scripts: decode devid: add airspeed scripting type 2026-07-29 20:16:37 +01:00
Brown 4176fc33ae AP_InertialSensor: add LSM6DSV32X and LSM6DSK320X support
Detect LSM6DSV32X separately from LSM6DSV16X using the CTRL8 variant bit,
as both parts share the same WHO_AM_I value.

Detect LSM6DSK320X using its WHO_AM_I value, register both new variants
with dedicated device types, and use the correct accel/gyro full-scale
register encodings for each variant.

Update decode_devid.py so INS device IDs decode to the new variant names.
2026-07-15 17:46:10 +10:00
Peter Barker a4147441a5 Tools: add LIS2MDL back in with a comment that it generally wasn't used 2026-06-01 17:05:32 +10:00
Jacob Dahl 6563ed1d2f Tools: remove LIS2MDL driver, use IIS2MDC
LIS2MDL and IIS2MDC are the same ST silicon with identical register
maps, WHO_AM_I, I2C address and sensitivity. Remove the separate
LIS2MDL driver entirely and switch boards that referenced it to IIS2MDC.

AIRBRAINH743 COMPASS line changed from LIS2MDL to IIS2MDC.
2026-06-01 17:05:32 +10:00
cuav-chen2 84f74fc0d7 Tools: Scripts: Decode devid: add ADIS16607 2026-04-27 10:24:51 +10:00
Norihiko Itou db3db56079 AP_InertialSensor: add STM's ASM330LHH
Apply review
2026-04-07 20:03:04 +09:00
Brown dd8a3ddf3b AP_InertialSensor: add LSM6DSV driver
Add driver for the ST LSM6DSV16X 6-axis IMU with support for:
- WHOAMI-based chip detection (Invensensev3-style check_whoami)
- HAODR mode-1 for high-accuracy ODR (1000-8000 Hz)
- continuous FIFO burst reads
- fast sampling via INS_FAST_SAMPLE / INS_GYRO_RATE
- accelerometer second-stage LPF2
2026-04-01 19:03:47 +11:00
Andy Piper d4fd350963 scripts: add LIS2MDL compass 2025-11-26 18:25:43 +11:00
Peter Barker 3708936c62 global: correct shebang lines to refernce python3
also remove the odd encoding line which is not required in Py3
2025-07-22 10:45:57 +10:00
e5ebd61f49 Tools: Add support for MS5837-02BA sensor
Co-authored-by: Shaikimram <shaikimran2723@gmail.com>
Co-authored-by: ES-Alexander <sandman.esalexander@gmail.com>
2025-06-26 11:41:47 +10:00
Iampete1 f893d21b7e Tools: scripts: decode devid: add latest airspeed and baro devices 2025-06-23 14:33:44 +01:00
Christian Clauss 5db73f4a0c Tools: Add # flake8: noqa linter directive 2025-06-12 08:47:52 +10:00
Peter Barker ab3b68c5f2 Tools: tweak AK09916 to AK0991x
the driver supports three different compasses with similar names
2025-06-08 10:08:17 +10:00
Andy Piper 7b29cade3f scripts: decode SPA06 2025-02-27 22:32:10 +00:00
Jacob Dahl 64bb0ad762 AP_Compass: add IIS2MDC driver 2025-01-15 19:10:16 +11:00
Jacob Dahl 3e0c0132c8 Tools: scripts: decode_devid.py: added IIM42653 2024-11-13 06:39:29 +11:00
cuav-chen2 29176ebabd Tools: Add in BMM350 Driver 2024-09-21 10:08:36 +10:00
cuav-chen2 869ef0ee04 AP_Baro: Add in BMP581 Driver 2024-06-17 09:50:47 +10:00
Tatsuya Yamaguchi c9f7a3c03d Tools: Scripts: Decode devid: add SCHA63T 2024-04-23 14:15:09 +01:00
Iampete1 2c84799bb5 Tools: Scripts: Decode devid: add ICM45686 2023-11-30 14:26:26 -08:00
Lokesh Ramina 6fe9090367 Tools : Decode_devid Add Compass QMC5883P, AK09915 2023-11-15 10:53:38 +11:00
Andrew Tridgell 402de293d6 Tools: text messages and more defines 2023-04-11 10:31:31 +10:00
alexklimaj 2ed679f0a8 AP_Baro: BMP390 2022-10-24 07:27:11 +11:00
Andrew Tridgell 1596516283 Tools: added new baro types 2022-10-22 08:15:36 +11:00
Andrew Tridgell ee4a53da27 Tools: updated decode_devid.py 2022-08-02 17:26:46 +10:00
Leonardo Garcia 0eb6ae365a AP_InertialSensor: Added BMI085 support
Fixed styling for 61125e2

Remove whitespace l202

Removed else
2022-04-27 18:37:39 +10:00
Andy Piper d307b15c2d Tools: add BMI270 to decode_devid.py 2021-12-31 09:25:29 +11:00
Andrew Tridgell ea4c929c50 Tools: added decoding of new v3 Invensense sensors 2021-12-14 11:38:36 +11:00
Andrew Tridgell d4d78720ca Tools: added AK09918 devid 2021-10-06 18:16:00 +11:00
Andrew Tridgell d4d80f01bf Tools: added airspeed ID decoding 2021-07-12 17:14:59 +10:00
Andrew Tridgell faae0a8609 Tools: added support for v3 Invensense sensors
starting with ICM-40609, ICM-42688 and ICM-42605
2021-01-11 14:43:35 +11:00
Andrew Tridgell 53e56d2933 Tools: added SERIAL for decode_devid 2021-01-05 21:13:12 +11:00
Andrew Tridgell a9ca78532e Tools: added MSP bus type to decode 2020-09-09 06:35:50 +10:00
Andrew Tridgell 2a3238b7de Tools: added baro decode 2020-07-21 08:20:01 +09:00
bugobliterator 49843fc3e7 script: add special decoding for CAN devid 2020-04-22 07:54:21 +10:00
Andrew Tridgell 04d760d54c Tools: added new RM3100 ID 2020-04-08 11:21:51 +10:00
Andrew Tridgell 2d2b02e50b Tools: added more INS device decodes 2019-03-28 09:15:27 +11:00
Pierre Kancir 910de89b4e Tools: add DEVTYPE_RM3100 to decode_devid.py 2019-02-20 22:06:31 +11:00
Lucas De Marchi cbe462fa57 Tools: add ist8308 to devtype dict 2018-10-25 20:19:30 -07:00
Lucas De Marchi e85b37ffc4 Tools: allow to decode devid in hex 2018-10-25 20:19:30 -07:00
Andrew Tridgell 087aa1a199 Tools: decode SITL device IDs 2018-07-13 10:19:01 +10:00
Andrew Tridgell 11b327e336 scripts: update decode_devid.py for new IMUs 2018-06-06 07:15:41 +10:00
Peter Barker 9f41641378 Tools: make decode-devid print address in hex too 2018-03-07 19:12:50 +11:00