diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-12-20 14:25:35 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-12-20 14:25:35 +0100 |
commit | 8c518aa23710ba0b9ad0c7ad2c03428ce8ddb290 (patch) | |
tree | 9cae6f445e759d2c5684564876e420e6355ef532 /ROMFS | |
parent | 6dce57170e3ceaa3316446086f8a0cd12cc5e90c (diff) | |
download | px4-firmware-8c518aa23710ba0b9ad0c7ad2c03428ce8ddb290.tar.gz px4-firmware-8c518aa23710ba0b9ad0c7ad2c03428ce8ddb290.tar.bz2 px4-firmware-8c518aa23710ba0b9ad0c7ad2c03428ce8ddb290.zip |
Useful bits for high-rate logging
Diffstat (limited to 'ROMFS')
-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 |
3 files changed, 96 insertions, 0 deletions
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 |