From d8f8dbacc814c58b600b933f61a976f5c6c3b4ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Mi=C5=A1i=C4=87?= Date: Thu, 27 Jan 2022 13:28:29 +0100 Subject: [PATCH] board/fmu-v5x: reverse order for start boards to shorten the command --- boards/px4/fmu-v5x/init/rc.board_sensors | 46 ++++++++++++------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/boards/px4/fmu-v5x/init/rc.board_sensors b/boards/px4/fmu-v5x/init/rc.board_sensors index d408eac17d..1a0cbf1f87 100644 --- a/boards/px4/fmu-v5x/init/rc.board_sensors +++ b/boards/px4/fmu-v5x/init/rc.board_sensors @@ -32,30 +32,8 @@ then ina238 -X -b 2 -t 2 -k start fi -if ver hwtypecmp V5X009000 V5X009001 V5X009002 V5X00a000 V5X00a001 V5X00a002 V5X008000 V5X008001 V5X008002 V5X010001 +if ver hwtypecmp V5X000000 V5X000001 V5X000002 V5X001000 then - #SKYNODE base fmu board orientation - - if ver hwtypecmp V5X009000 V5X009001 V5X00a000 V5X00a001 V5X008000 V5X008001 V5X010001 - then - # Internal SPI BMI088 - bmi088 -A -R 2 -s start - bmi088 -G -R 2 -s start - else - # Internal SPI bus ICM20649 - icm20649 -s -R 4 start - fi - - # Internal SPI bus ICM42688p - icm42688p -R 4 -s start - - # Internal SPI bus ICM-20602 (hard-mounted) - icm20602 -R 8 -s start - - # Internal magnetometer on I2c - bmm150 -I -R 6 start - -else #FMUv5Xbase board orientation if ver hwtypecmp V5X000000 V5X000001 @@ -77,6 +55,28 @@ else # Internal magnetometer on I2c bmm150 -I start +else + #SKYNODE base fmu board orientation + + if ver hwtypecmp V5X009000 V5X009001 V5X00a000 V5X00a001 V5X008000 V5X008001 V5X010001 + then + # Internal SPI BMI088 + bmi088 -A -R 2 -s start + bmi088 -G -R 2 -s start + else + # Internal SPI bus ICM20649 + icm20649 -s -R 4 start + fi + + # Internal SPI bus ICM42688p + icm42688p -R 4 -s start + + # Internal SPI bus ICM-20602 (hard-mounted) + icm20602 -R 8 -s start + + # Internal magnetometer on I2c + bmm150 -I -R 6 start + 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)