From bdb0fe77d03c19d2aa71d11b4a3937d58dd8fc56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20R=C3=A4th?= <119662383+marcoraeth@users.noreply.github.com> Date: Tue, 28 Feb 2023 11:01:16 +0100 Subject: [PATCH] v6x: fix mag orientation for V6X009010 and V6X010010 (#21194) --- boards/px4/fmu-v6x/init/rc.board_sensors | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/boards/px4/fmu-v6x/init/rc.board_sensors b/boards/px4/fmu-v6x/init/rc.board_sensors index 8cd5ae7873..52aa8f9c78 100644 --- a/boards/px4/fmu-v6x/init/rc.board_sensors +++ b/boards/px4/fmu-v6x/init/rc.board_sensors @@ -47,6 +47,7 @@ then fi fi + if ver hwtypecmp V6X000004 V6X001004 V6X004004 V6X005004 then # Internal SPI bus ICM20649 @@ -101,7 +102,13 @@ if ver hwtypecmp V6X002001 then rm3100 -I -b 4 start else - bmm150 -I -R 6 start + if ver hwtypecmp V6X009010 V6X010010 + then + # Internal magnetometer on I2C + bmm150 -I -R 0 start + else + bmm150 -I -R 6 start + fi fi # External compass on GPS1/I2C1 (the 3rd external bus): standard Holybro Pixhawk 4 or CUAV V5 GPS/compass puck (with lights, safety button, and buzzer)