diff options
author | Anton Babushkin <anton.babushkin@me.com> | 2013-12-23 18:16:28 +0400 |
---|---|---|
committer | Anton Babushkin <anton.babushkin@me.com> | 2013-12-23 18:16:28 +0400 |
commit | 5a2da77758867914e3e8b55267df56a6f95913ed (patch) | |
tree | 1c016e8f708ab68a9c7762eae436645dcacedae0 /ROMFS | |
parent | c9f785ff7f64960b79129e4e79fd0db4863192ae (diff) | |
parent | 1279b5fbf3838811a08845e41b1e1244fb85d026 (diff) | |
download | px4-firmware-5a2da77758867914e3e8b55267df56a6f95913ed.tar.gz px4-firmware-5a2da77758867914e3e8b55267df56a6f95913ed.tar.bz2 px4-firmware-5a2da77758867914e3e8b55267df56a6f95913ed.zip |
Merge branch 'master' into mathlib_new
Diffstat (limited to 'ROMFS')
-rw-r--r-- | ROMFS/px4fmu_common/init.d/rc.sensors | 2 | ||||
-rw-r--r--[-rwxr-xr-x] | ROMFS/px4fmu_common/init.d/rcS | 0 | ||||
-rw-r--r-- | ROMFS/px4fmu_logging/init.d/rcS | 88 | ||||
-rw-r--r--[-rwxr-xr-x] | ROMFS/px4fmu_test/init.d/rcS | 8 |
4 files changed, 97 insertions, 1 deletions
diff --git a/ROMFS/px4fmu_common/init.d/rc.sensors b/ROMFS/px4fmu_common/init.d/rc.sensors index 7f73acf85..070a4e7e3 100644 --- a/ROMFS/px4fmu_common/init.d/rc.sensors +++ b/ROMFS/px4fmu_common/init.d/rc.sensors @@ -23,7 +23,7 @@ fi if l3gd20 start then - echo "using L3GD20(H)" + echo "using L3GD20(H)" fi if lsm303d start diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index f551c1aa8..f551c1aa8 100755..100644 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS diff --git a/ROMFS/px4fmu_logging/init.d/rcS b/ROMFS/px4fmu_logging/init.d/rcS new file mode 100644 index 000000000..7b8856719 --- /dev/null +++ b/ROMFS/px4fmu_logging/init.d/rcS @@ -0,0 +1,88 @@ +#!nsh +# +# PX4FMU startup script for logging purposes +# + +# +# Try to mount the microSD card. +# +echo "[init] looking for microSD..." +if mount -t vfat /dev/mmcsd0 /fs/microsd +then + echo "[init] card mounted at /fs/microsd" + # Start playing the startup tune + tone_alarm start +else + echo "[init] no microSD card found" + # Play SOS + tone_alarm error +fi + +uorb start + +# +# Start sensor drivers here. +# + +ms5611 start +adc start + +# mag might be external +if hmc5883 start +then + echo "using HMC5883" +fi + +if mpu6000 start +then + echo "using MPU6000" +fi + +if l3gd20 start +then + echo "using L3GD20(H)" +fi + +if lsm303d start +then + set BOARD fmuv2 +else + set BOARD fmuv1 +fi + +# Start airspeed sensors +if meas_airspeed start +then + echo "using MEAS airspeed sensor" +else + if ets_airspeed start + then + echo "using ETS airspeed sensor (bus 3)" + else + if ets_airspeed start -b 1 + then + echo "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 + echo "SENSORS STARTED" +fi + +sdlog2 start -r 250 -e -b 16 + +if sercon +then + echo "[init] USB interface connected" + + # Try to get an USB console + nshterm /dev/ttyACM0 & +fi
\ No newline at end of file diff --git a/ROMFS/px4fmu_test/init.d/rcS b/ROMFS/px4fmu_test/init.d/rcS index 7f161b053..6aa1d3d46 100755..100644 --- a/ROMFS/px4fmu_test/init.d/rcS +++ b/ROMFS/px4fmu_test/init.d/rcS @@ -2,3 +2,11 @@ # # PX4FMU startup script for test hackery. # + +if sercon +then + echo "[init] USB interface connected" + + # Try to get an USB console + nshterm /dev/ttyACM0 & +fi
\ No newline at end of file |