PX4: enable temperature compensation in hmc5883 driver

This commit is contained in:
Andrew Tridgell 2015-04-02 14:35:52 -07:00
parent 728dbf24db
commit 2aa73c427b

View File

@ -222,17 +222,9 @@ fi
if [ $BOARD == FMUv1 ] if [ $BOARD == FMUv1 ]
then then
echo "Starting FMUv1 sensors" echo "Starting FMUv1 sensors"
if hmc5883 start if hmc5883 -C -T start
then then
echo "hmc5883 started OK" echo "hmc5883 started OK"
if hmc5883 calibrate
then
echo "hmc5883 calibrate OK"
else
echo "hmc5883 calibrate failed"
echo "hmc5883 calibrate failed" >> $logfile
tone_alarm MSBBB
fi
else else
echo "hmc5883 start failed" echo "hmc5883 start failed"
echo "hmc5883 start failed" >> $logfile echo "hmc5883 start failed" >> $logfile
@ -253,13 +245,13 @@ then
fi fi
else else
echo "Starting FMUv2 sensors" echo "Starting FMUv2 sensors"
if hmc5883 -C -X start if hmc5883 -C -T -X start
then then
echo "Have external hmc5883" echo "Have external hmc5883"
else else
echo "No external hmc5883" echo "No external hmc5883"
fi fi
if hmc5883 -C -I -R 4 start if hmc5883 -C -T -I -R 4 start
then then
echo "Have internal hmc5883" echo "Have internal hmc5883"
else else
@ -302,7 +294,7 @@ else
echo "No MPU6000" >> $logfile echo "No MPU6000" >> $logfile
sh /etc/init.d/rc.error sh /etc/init.d/rc.error
fi fi
if hmc5883 -C -S -R 8 start if hmc5883 -C -T -S -R 8 start
then then
echo "Found SPI hmc5883" echo "Found SPI hmc5883"
fi fi