2013-04-26 20:14:32 -03:00
|
|
|
#!nsh
|
|
|
|
#
|
|
|
|
# Standard startup script for PX4FMU onboard sensor drivers.
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# Start sensor drivers here.
|
|
|
|
#
|
|
|
|
|
2013-05-13 03:34:48 -03:00
|
|
|
#
|
|
|
|
# Check for UORB
|
|
|
|
#
|
|
|
|
if uorb start
|
|
|
|
then
|
|
|
|
echo "uORB started"
|
|
|
|
fi
|
|
|
|
|
2013-04-26 20:14:32 -03:00
|
|
|
ms5611 start
|
|
|
|
adc start
|
|
|
|
|
2013-08-19 11:34:12 -03:00
|
|
|
# mag might be external
|
|
|
|
hmc5883 start
|
|
|
|
|
2013-04-26 20:14:32 -03:00
|
|
|
if mpu6000 start
|
|
|
|
then
|
2013-08-19 11:34:12 -03:00
|
|
|
echo "using MPU6000"
|
2013-08-11 12:39:10 -03:00
|
|
|
set BOARD fmuv1
|
2013-04-26 20:14:32 -03:00
|
|
|
else
|
|
|
|
echo "using L3GD20 and LSM303D"
|
|
|
|
l3gd20 start
|
2013-07-16 15:36:50 -03:00
|
|
|
lsm303d start
|
2013-08-11 12:39:10 -03:00
|
|
|
set BOARD fmuv2
|
2013-04-26 20:14:32 -03:00
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Start the sensor collection task.
|
|
|
|
# IMPORTANT: this also loads param offsets
|
|
|
|
# ALWAYS start this task before the
|
|
|
|
# preflight_check.
|
|
|
|
#
|
2013-07-18 08:16:34 -03:00
|
|
|
if sensors start
|
|
|
|
then
|
2013-07-18 10:26:14 -03:00
|
|
|
preflight_check &
|
2013-07-18 08:28:26 -03:00
|
|
|
fi
|