aboutsummaryrefslogblamecommitdiff
path: root/ROMFS/px4fmu_common/init.d/rc.sensors
blob: be54ea98b085fcbfa62fc6583d4fdd637522f50a (plain) (tree)
1
2
3
4
5
6
7
8
9




                                                            


            
                       

                
                                   
  
 

                
                                   



               
                                     

  
                      
    
                                                           



                                           

  


                        
                                                


                             
                                                               


                                          
                                                                       



                  





                                          

                
                         
  
#!nsh
#
# Standard startup script for PX4FMU onboard sensor drivers.
#

ms5611 start
adc start

# Mag might be external
if hmc5883 start
then
	echo "[init] Using HMC5883"
fi

if mpu6000 start
then
	echo "[init] Using MPU6000"
fi

if l3gd20 start
then
	echo "[init] Using L3GD20(H)"
fi

if ver hwcmp PX4FMU_V2
then
	# IMPORTANT: EXTERNAL BUSES SHOULD BE SCANNED FIRST
	if lsm303d start
	then
		echo "[init] Using LSM303D"
	fi
fi

# Start airspeed sensors
if meas_airspeed start
then
	echo "[init] Using MEAS airspeed sensor"
else
	if ets_airspeed start
	then
		echo "[init] Using ETS airspeed sensor (bus 3)"
	else
		if ets_airspeed start -b 1
		then
			echo "[init] Using ETS airspeed sensor (bus 1)"
		fi
	fi
fi

#
# Start the sensor collection task.
# IMPORTANT: this also loads param offsets
# ALWAYS start this task before the
# preflight_check.
#
if sensors start
then
	preflight_check &
fi