aboutsummaryrefslogtreecommitdiff
path: root/ROMFS
diff options
context:
space:
mode:
Diffstat (limited to 'ROMFS')
-rw-r--r--ROMFS/px4fmu_common/init.d/10_io_f33038
-rw-r--r--ROMFS/px4fmu_common/init.d/rc.sensors5
-rw-r--r--ROMFS/px4fmu_common/init.d/rc.usb14
-rw-r--r--ROMFS/px4fmu_test/init.d/rc.standalone13
-rwxr-xr-xROMFS/px4fmu_test/init.d/rcS4
5 files changed, 52 insertions, 22 deletions
diff --git a/ROMFS/px4fmu_common/init.d/10_io_f330 b/ROMFS/px4fmu_common/init.d/10_io_f330
index 4450eb50d..b3fb02757 100644
--- a/ROMFS/px4fmu_common/init.d/10_io_f330
+++ b/ROMFS/px4fmu_common/init.d/10_io_f330
@@ -57,11 +57,6 @@ pwm -u 400 -m 0xff
px4io recovery
#
-# Disable px4io topic limiting
-#
-px4io limit 200
-
-#
# This sets a PWM right after startup (regardless of safety button)
#
px4io idle 900 900 900 900
@@ -75,6 +70,8 @@ px4io min 1200 1200 1200 1200
# Upper limits could be higher, this is on the safe side
#
px4io max 1800 1800 1800 1800
+
+mixer load /dev/pwm_output /etc/mixers/FMU_quad_x.mix
#
# Start the sensors (depends on orb, px4io)
@@ -95,22 +92,25 @@ gps start
# Start the attitude estimator (depends on orb)
#
attitude_estimator_ekf start
-
-#
-# Load mixer and start controllers (depends on px4io)
-#
-mixer load /dev/pwm_output /etc/mixers/FMU_quad_x.mix
+
multirotor_att_control start
-
-#
-# Start logging
-#
-sdlog2 start -r 20 -a -b 16
-
+
#
-# Start system state
+# Disable px4io topic limiting and start logging
#
-if blinkm start
+if [ $BOARD == fmuv1 ]
then
- blinkm systemstate
+ px4io limit 200
+ sdlog2 start -r 50 -a -b 16
+ if blinkm start
+ then
+ blinkm systemstate
+ fi
+else
+ px4io limit 400
+ sdlog2 start -r 200 -a -b 16
+ if rgbled start
+ then
+ #rgbled systemstate
+ fi
fi
diff --git a/ROMFS/px4fmu_common/init.d/rc.sensors b/ROMFS/px4fmu_common/init.d/rc.sensors
index 5e80ddc2f..17591be5b 100644
--- a/ROMFS/px4fmu_common/init.d/rc.sensors
+++ b/ROMFS/px4fmu_common/init.d/rc.sensors
@@ -22,10 +22,12 @@ if mpu6000 start
then
echo "using MPU6000 and HMC5883L"
hmc5883 start
+ set BOARD fmuv1
else
echo "using L3GD20 and LSM303D"
l3gd20 start
lsm303d start
+ set BOARD fmuv2
fi
#
@@ -36,8 +38,5 @@ fi
#
if sensors start
then
- #
- # Check sensors - run AFTER 'sensors start'
- #
preflight_check &
fi
diff --git a/ROMFS/px4fmu_common/init.d/rc.usb b/ROMFS/px4fmu_common/init.d/rc.usb
index 5b1bd272e..abeed0ca3 100644
--- a/ROMFS/px4fmu_common/init.d/rc.usb
+++ b/ROMFS/px4fmu_common/init.d/rc.usb
@@ -16,12 +16,26 @@ fi
sleep 2
mavlink start -b 230400 -d /dev/ttyACM0
+# Stop commander
+if commander stop
+then
+ echo "Commander stopped"
+fi
+sleep 1
+
# Start the commander
if commander start
then
echo "Commander started"
fi
+# Stop px4io
+if px4io stop
+then
+ echo "PX4IO stopped"
+fi
+sleep 1
+
# Start px4io if present
if px4io start
then
diff --git a/ROMFS/px4fmu_test/init.d/rc.standalone b/ROMFS/px4fmu_test/init.d/rc.standalone
new file mode 100644
index 000000000..67e95215b
--- /dev/null
+++ b/ROMFS/px4fmu_test/init.d/rc.standalone
@@ -0,0 +1,13 @@
+#!nsh
+#
+# Flight startup script for PX4FMU standalone configuration.
+#
+
+echo "[init] doing standalone PX4FMU startup..."
+
+#
+# Start the ORB
+#
+uorb start
+
+echo "[init] startup done"
diff --git a/ROMFS/px4fmu_test/init.d/rcS b/ROMFS/px4fmu_test/init.d/rcS
new file mode 100755
index 000000000..7f161b053
--- /dev/null
+++ b/ROMFS/px4fmu_test/init.d/rcS
@@ -0,0 +1,4 @@
+#!nsh
+#
+# PX4FMU startup script for test hackery.
+#