PX4: added support for the MPU6000 on the v2.4 Pixhawk

This commit is contained in:
Andrew Tridgell 2013-11-26 20:56:54 +11:00
parent 90937be3d4
commit f1bad032dd
2 changed files with 26 additions and 10 deletions

View File

@ -196,17 +196,33 @@ else
then
echo "Using external magnetometer"
fi
if l3gd20 start
set HAVE_MPU6000 false
if [ ! -f /fs/microsd/APM/LSM303D.en ]
then
echo "l3gd20 started OK"
else
sh /etc/init.d/rc.error
fi
if lsm303d start
if mpu6000 start
then
set HAVE_MPU6000 true
echo "Found MPU6000"
echo "Found MPU6000" >> $logfile
else
echo "No MPU6000"
echo "No MPU6000" >> $logfile
fi
fi
if [ $HAVE_MPU6000 == false ]
then
echo "lsm303d started OK"
else
sh /etc/init.d/rc.error
if l3gd20 start
then
echo "l3gd20 started OK"
else
sh /etc/init.d/rc.error
fi
if lsm303d start
then
echo "lsm303d started OK"
else
sh /etc/init.d/rc.error
fi
fi
fi

View File

@ -23,7 +23,7 @@ MODULES += drivers/boards/px4fmu-v2
MODULES += drivers/rgbled
MODULES += drivers/lsm303d
MODULES += drivers/l3gd20
#MODULES += drivers/mpu6000
MODULES += drivers/mpu6000
MODULES += drivers/hmc5883
MODULES += drivers/ms5611
MODULES += drivers/mb12xx