Always start airspeed

This ensures we get readings in the log and in the telemetry even if the sensor is disabled.
This commit is contained in:
Lorenz Meier
2021-03-10 20:36:18 +01:00
parent 891b231215
commit c904767f1d
+17 -18
View File
@@ -124,26 +124,25 @@ then
# differential pressure sensors
if [ ${VEHICLE_TYPE} = fw -o ${VEHICLE_TYPE} = vtol ]
then
if param compare CBRK_AIRSPD_CHK 0
# Always try to start the airspeed sensors
# even if their usage might be disabled
sdp3x_airspeed start -X -q
sdp3x_airspeed start -X -a 0x22 -q
# Pixhawk 2.1 has a MS5611 on I2C which gets wrongly
# detected as MS5525 because the chip manufacturer was so
# clever to assign the same I2C address and skip a WHO_AM_I
# register.
if [ $BOARD_FMUV3 = 21 ]
then
sdp3x_airspeed start -X -q
sdp3x_airspeed start -X -a 0x22 -q
# Pixhawk 2.1 has a MS5611 on I2C which gets wrongly
# detected as MS5525 because the chip manufacturer was so
# clever to assign the same I2C address and skip a WHO_AM_I
# register.
if [ $BOARD_FMUV3 = 21 ]
then
ms5525_airspeed start -X -b 2 -q
else
ms5525_airspeed start -X -q
fi
ms4525_airspeed start -X -q
ets_airspeed start -X -q
ms5525_airspeed start -X -b 2 -q
else
ms5525_airspeed start -X -q
fi
ms4525_airspeed start -X -q
ets_airspeed start -X -q
fi
fi