diff --git a/boards/px4/fmu-v6c/init/rc.board_sensors b/boards/px4/fmu-v6c/init/rc.board_sensors index 34afb338dcf..1382aa87c51 100644 --- a/boards/px4/fmu-v6c/init/rc.board_sensors +++ b/boards/px4/fmu-v6c/init/rc.board_sensors @@ -25,7 +25,11 @@ fi ms5611 -X -b 4 -a 0x77 start # Internal compass on IMU I2C4 (The same bus is also exposed externally, and therefore marked as external) -ist8310 -X -b 4 -a 0xc start +# Standard FMUv6C uses IST8310; the variant board falls back to RM3100. +if ! ist8310 -X -b 4 -a 0xc -q start +then + rm3100 -X -b 4 -R 8 start +fi # External compass on GPS/I2C1 (the 3rd external bus): standard Holybro Pixhawk 4 or CUAV V5 GPS/compass puck (with lights, safety button, and buzzer) ist8310 -X -b 1 -R 10 start diff --git a/boards/px4/fmu-v6c/src/i2c.cpp b/boards/px4/fmu-v6c/src/i2c.cpp index ab0a2bbe55d..64715f1ee7b 100644 --- a/boards/px4/fmu-v6c/src/i2c.cpp +++ b/boards/px4/fmu-v6c/src/i2c.cpp @@ -71,6 +71,17 @@ bool px4_i2c_device_external(const uint32_t device_id) if (device_id_mag.devid == device_id) { return false; } + + // device_id: RM3100 on I2C4 address 0x20 + device::Device::DeviceId device_id_rm3100{}; + device_id_rm3100.devid_s.bus_type = device::Device::DeviceBusType_I2C; + device_id_rm3100.devid_s.bus = 4; + device_id_rm3100.devid_s.address = 0x20; + device_id_rm3100.devid_s.devtype = DRV_MAG_DEVTYPE_RM3100; + + if (device_id_rm3100.devid == device_id) { + return false; + } } device::Device::DeviceId dev_id{};