PX4: enable probe of MPU9250 if available

This commit is contained in:
Andrew Tridgell 2015-08-01 16:33:54 +10:00
parent d8cee50878
commit baeddfe4f3
2 changed files with 23 additions and 6 deletions

View File

@ -264,8 +264,14 @@ else
echo "Found MPU6000 external"
set HAVE_FMUV3 true
else
echo "No MPU6000 external"
set HAVE_FMUV3 false
if mpu9250 -X -R 4 start
then
echo "Found MPU9250 external"
set HAVE_FMUV3 true
else
echo "No MPU6000 or MPU9250 external"
set HAVE_FMUV3 false
fi
fi
if [ $HAVE_FMUV3 == true ]
then
@ -290,9 +296,14 @@ else
then
echo "Found MPU6000 internal"
else
echo "No MPU6000"
echo "No MPU6000" >> $logfile
if mpu9250 -R 14 start
then
echo "Found MPU9250 internal"
else
echo "No MPU6000 or MPU9250"
echo "No MPU6000 or MPU9250" >> $logfile
sh /etc/init.d/rc.error
fi
fi
if hmc5883 -C -T -S -R 8 start
then
@ -303,8 +314,13 @@ else
then
echo "Found MPU6000"
else
echo "No MPU6000"
echo "No MPU6000" >> $logfile
if mpu9250 start
then
echo "Found MPU9250"
else
echo "No MPU6000 or MPU9250"
echo "No MPU9250" >> $logfile
fi
fi
if l3gd20 start
then

View File

@ -5,6 +5,7 @@ include $(SKETCHBOOK)/mk/PX4/px4_common.mk
MODULES += drivers/lsm303d
MODULES += drivers/l3gd20
MODULES += drivers/mpu9250
MODULES += drivers/boards/px4fmu-v2
MODULES += drivers/pwm_input
MODULES += modules/uavcan