Skip to content

Commit

Permalink
PX4: enable probe of MPU9250 if available
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge authored and jschall committed Oct 27, 2015
1 parent d570719 commit a7dbbeb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
28 changes: 22 additions & 6 deletions mk/PX4/ROMFS/init.d/rc.APM
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions mk/PX4/config_px4fmu-v2_APM.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a7dbbeb

Please sign in to comment.