diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-07-17 07:33:50 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-07-17 07:33:50 +0200 |
commit | f89062fe3bf56aef23c2ea1a29ae3468694344fa (patch) | |
tree | f6d2ef6e950d21aa1a3baa1fdf58f19a79f41a82 /ROMFS | |
parent | 65c952e134daa7c505026ddf2139148fe3092161 (diff) | |
parent | 7705a24f7227035d5932a1288e26ce75cec07fdf (diff) | |
download | px4-firmware-f89062fe3bf56aef23c2ea1a29ae3468694344fa.tar.gz px4-firmware-f89062fe3bf56aef23c2ea1a29ae3468694344fa.tar.bz2 px4-firmware-f89062fe3bf56aef23c2ea1a29ae3468694344fa.zip |
Merge pull request #1186 from PX4/logging
Multi-instance handling for sensors
Diffstat (limited to 'ROMFS')
-rw-r--r-- | ROMFS/px4fmu_common/init.d/rc.sensors | 39 |
1 files changed, 30 insertions, 9 deletions
diff --git a/ROMFS/px4fmu_common/init.d/rc.sensors b/ROMFS/px4fmu_common/init.d/rc.sensors index be54ea98b..ecb408a54 100644 --- a/ROMFS/px4fmu_common/init.d/rc.sensors +++ b/ROMFS/px4fmu_common/init.d/rc.sensors @@ -6,28 +6,51 @@ ms5611 start adc start -# Mag might be external -if hmc5883 start +if mpu6000 -X start then - echo "[init] Using HMC5883" fi if mpu6000 start then - echo "[init] Using MPU6000" +fi + +if l3gd20 -X start +then fi if l3gd20 start then - echo "[init] Using L3GD20(H)" +fi + +# MAG selection +if param compare SENS_EXT_MAG 2 +then + if hmc5883 -I start + then + fi +else + # Use only external as primary + if param compare SENS_EXT_MAG 1 + then + if hmc5883 -X start + then + fi + else + # auto-detect the primary, prefer external + if hmc5883 start + then + fi + fi fi if ver hwcmp PX4FMU_V2 then - # IMPORTANT: EXTERNAL BUSES SHOULD BE SCANNED FIRST + if lsm303d -X start + then + fi + if lsm303d start then - echo "[init] Using LSM303D" fi fi @@ -38,11 +61,9 @@ then 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 |