From 64e3f51d3a262fea4266dc90dccf1e7850bdb09c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Mi=C5=A1i=C4=87?= Date: Thu, 27 Jan 2022 13:14:23 +0100 Subject: [PATCH] boards: new format for hwtypecmp string --- ROMFS/px4fmu_common/init.d/rcS | 2 +- boards/holybro/durandal-v1/init/rc.board_sensors | 4 ++-- boards/px4/fmu-v5/init/rc.board_defaults | 2 +- boards/px4/fmu-v5/init/rc.board_sensors | 2 +- boards/px4/fmu-v5x/init/rc.board_mavlink | 2 +- boards/px4/fmu-v5x/init/rc.board_sensors | 8 ++++---- boards/px4/fmu-v6x/init/rc.board_sensors | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index cc114cc635..c4a9ee76b0 100644 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS @@ -313,7 +313,7 @@ else then # Check for the mini using build with px4io fw file # but not a px4IO - if ver hwtypecmp V540 V560 + if ver hwtypecmp V5004000 V5006000 then param set SYS_USE_IO 0 else diff --git a/boards/holybro/durandal-v1/init/rc.board_sensors b/boards/holybro/durandal-v1/init/rc.board_sensors index 9397359b7d..60519aad1a 100644 --- a/boards/holybro/durandal-v1/init/rc.board_sensors +++ b/boards/holybro/durandal-v1/init/rc.board_sensors @@ -11,13 +11,13 @@ icm20689 -R 2 -s start bmi088 -A -R 2 -s start bmi088 -G -R 2 -s start -if ver hwtypecmp VD00 +if ver hwtypecmp VD000000 then # Internal SPI BMI088 bmi088 -A -R 2 -s start bmi088 -G -R 2 -s start fi -if ver hwtypecmp VD01 +if ver hwtypecmp VD000001 then # Internal SPI ICM-20602 icm20602 -R 2 -s start diff --git a/boards/px4/fmu-v5/init/rc.board_defaults b/boards/px4/fmu-v5/init/rc.board_defaults index 93bb336f8c..b88ad0245e 100644 --- a/boards/px4/fmu-v5/init/rc.board_defaults +++ b/boards/px4/fmu-v5/init/rc.board_defaults @@ -9,7 +9,7 @@ param set-default BAT2_V_DIV 18.1 param set-default BAT1_A_PER_V 36.367515152 param set-default BAT2_A_PER_V 36.367515152 -if ver hwtypecmp V550 V552 V560 V562 +if ver hwtypecmp V5005000 V5005002 V5006000 V5006002 then # CUAV V5+ (V550/V552) and V5nano (V560/V562) have 3 IMUs # Multi-EKF (IMUs only) diff --git a/boards/px4/fmu-v5/init/rc.board_sensors b/boards/px4/fmu-v5/init/rc.board_sensors index e024e3225b..b3d53a4934 100644 --- a/boards/px4/fmu-v5/init/rc.board_sensors +++ b/boards/px4/fmu-v5/init/rc.board_sensors @@ -5,7 +5,7 @@ board_adc start -if ver hwtypecmp V552 V562 +if ver hwtypecmp V5005002 V5006002 then # Internal SPI bus ICM-42688-P icm42688p -s -R 2 -q start diff --git a/boards/px4/fmu-v5x/init/rc.board_mavlink b/boards/px4/fmu-v5x/init/rc.board_mavlink index c0dbc02403..604ee05760 100644 --- a/boards/px4/fmu-v5x/init/rc.board_mavlink +++ b/boards/px4/fmu-v5x/init/rc.board_mavlink @@ -3,7 +3,7 @@ # board specific MAVLink startup script. #------------------------------------------------------------------------------ -if ver hwtypecmp V5X90 V5X91 V5Xa0 V5Xa1 V5X80 V5X81 +if ver hwtypecmp V5X009000 V5X009001 V5X00a000 V5X00a001 V5X008000 V5X008001 then # Start MAVLink on the UART connected to the mission computer mavlink start -d /dev/ttyS4 -b 3000000 -r 290000 -m onboard_low_bandwidth -x -z diff --git a/boards/px4/fmu-v5x/init/rc.board_sensors b/boards/px4/fmu-v5x/init/rc.board_sensors index 48ba01eeb1..de9476f622 100644 --- a/boards/px4/fmu-v5x/init/rc.board_sensors +++ b/boards/px4/fmu-v5x/init/rc.board_sensors @@ -32,11 +32,11 @@ then ina238 -X -b 2 -t 2 -k start fi -if ver hwtypecmp V5X90 V5X91 V5X92 V5Xa0 V5Xa1 V5Xa2 +if ver hwtypecmp V5X009000 V5X009001 V5X009002 V5X00a000 V5X00a001 V5X00a002 V5X008000 V5X008001 V5X008002 then #SKYNODE base fmu board orientation - if ver hwtypecmp V5X90 V5X91 V5Xa0 V5Xa1 + if ver hwtypecmp V5X009000 V5X009001 V5X00a000 V5X00a001 V5X008000 V5X008001 then # Internal SPI BMI088 bmi088 -A -R 2 -s start @@ -58,7 +58,7 @@ then else #FMUv5Xbase board orientation - if ver hwtypecmp V5X00 V5X01 + if ver hwtypecmp V5X000000 V5X000001 then # Internal SPI BMI088 bmi088 -A -R 4 -s start @@ -88,7 +88,7 @@ ist8310 -X -b 1 -R 10 start if param compare SENS_INT_BARO_EN 1 then bmp388 -I -a 0x77 start - if ver hwtypecmp V5X00 V5X90 V5Xa0 + if ver hwtypecmp V5X000000 V5X001000 V5X008000 V5X009000 V5X00a000 then bmp388 -I start else diff --git a/boards/px4/fmu-v6x/init/rc.board_sensors b/boards/px4/fmu-v6x/init/rc.board_sensors index 0733e2bd73..8ce0ec820c 100644 --- a/boards/px4/fmu-v6x/init/rc.board_sensors +++ b/boards/px4/fmu-v6x/init/rc.board_sensors @@ -32,7 +32,7 @@ bmi088 -G -R 4 -s start # Internal SPI bus ICM42688p icm42688p -R 6 -s start -if ver hwtypecmp V6X03 V6X13 +if ver hwtypecmp V6X000003 V6X001003 then # Internal SPI bus ICM-42670-P (hard-mounted) icm42670p -R 14 -s start @@ -50,7 +50,7 @@ ist8310 -X -b 1 -R 10 start # Possible internal Baro bmp388 -I -a 0x77 start -if ver hwtypecmp V6X00 V6X10 +if ver hwtypecmp V6X000000 V6X001000 then bmp388 -I start else