Skip to content

Commit 9424d17

Browse files
committed
Change boot order to make sure the adis mag is the priority one
1 parent 1171509 commit 9424d17

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

ROMFS/px4fmu_common/init.d/rc.sensors

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,23 @@ fi
2121
# Begin Optional drivers #
2222
###############################################################################
2323

24+
# ADIS16448 spi external IMU
25+
if param compare -s SENS_EN_ADIS164X 1
26+
then
27+
if param compare -s SENS_OR_ADIS164X 0
28+
then
29+
adis16448 -S start
30+
fi
31+
if param compare -s SENS_OR_ADIS164X 4
32+
then
33+
adis16448 -S start -R 4
34+
fi
35+
36+
# add a sleep to make sure the mag is the priority one
37+
usleep 1000000
38+
fi
39+
40+
2441
if param compare -s SENS_EN_BATT 1
2542
then
2643
batt_smbus start -X
@@ -108,19 +125,6 @@ then
108125
vl53l1x start -X
109126
fi
110127

111-
# ADIS16448 spi external IMU
112-
if param compare -s SENS_EN_ADIS164X 1
113-
then
114-
if param compare -s SENS_OR_ADIS164X 0
115-
then
116-
adis16448 -S start
117-
fi
118-
if param compare -s SENS_OR_ADIS164X 4
119-
then
120-
adis16448 -S start -R 4
121-
fi
122-
fi
123-
124128
# Hall effect sensors si7210
125129
# Potentially remove the -k option if possible and improve the startup if possible
126130
if param greater CAL_AV_AOA_ID -1

0 commit comments

Comments
 (0)