aboutsummaryrefslogtreecommitdiff
path: root/ROMFS
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2013-09-08 20:40:55 +0200
committerLorenz Meier <lm@inf.ethz.ch>2013-09-08 20:40:55 +0200
commit2e8b675c6c5ddc3fd2db22a8e22a664b50ef18a9 (patch)
tree3f9f6b684c1c37329f2f0420dd5b68be86ad2b4d /ROMFS
parent2d6dfe2a9e1fc04a9cadc3e4defa3e9cd615db1f (diff)
downloadpx4-firmware-2e8b675c6c5ddc3fd2db22a8e22a664b50ef18a9.tar.gz
px4-firmware-2e8b675c6c5ddc3fd2db22a8e22a664b50ef18a9.tar.bz2
px4-firmware-2e8b675c6c5ddc3fd2db22a8e22a664b50ef18a9.zip
Fixed (temporarily) HIL by allowing index 1000 to start a matching setup
Diffstat (limited to 'ROMFS')
-rw-r--r--ROMFS/px4fmu_common/init.d/rc.hil8
-rw-r--r--ROMFS/px4fmu_common/init.d/rc.usb8
-rwxr-xr-xROMFS/px4fmu_common/init.d/rcS11
3 files changed, 12 insertions, 15 deletions
diff --git a/ROMFS/px4fmu_common/init.d/rc.hil b/ROMFS/px4fmu_common/init.d/rc.hil
index eccb2b767..b924d62bc 100644
--- a/ROMFS/px4fmu_common/init.d/rc.hil
+++ b/ROMFS/px4fmu_common/init.d/rc.hil
@@ -5,10 +5,9 @@
echo "[HIL] starting.."
-uorb start
-
# Tell MAVLink that this link is "fast"
-mavlink start -b 230400 -d /dev/ttyS1
+sleep 2
+mavlink start -b 230400 -d /dev/ttyACM0
# Create a fake HIL /dev/pwm_output interface
hil mode_pwm
@@ -50,7 +49,8 @@ att_pos_estimator_ekf start
# Load mixer and start controllers (depends on px4io)
#
mixer load /dev/pwm_output /etc/mixers/FMU_AET.mix
-fw_pos_control_l1 start
+#fw_pos_control_l1 start
fw_att_control start
echo "[HIL] setup done, running"
+
diff --git a/ROMFS/px4fmu_common/init.d/rc.usb b/ROMFS/px4fmu_common/init.d/rc.usb
index 9264985d6..ccf2cd47e 100644
--- a/ROMFS/px4fmu_common/init.d/rc.usb
+++ b/ROMFS/px4fmu_common/init.d/rc.usb
@@ -21,7 +21,6 @@ if mavlink stop
then
echo "stopped other MAVLink instance"
fi
-sleep 2
mavlink start -b 230400 -d /dev/ttyACM0
# Stop commander
@@ -37,13 +36,6 @@ 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_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS
index c2ef37526..1f466e49f 100755
--- a/ROMFS/px4fmu_common/init.d/rcS
+++ b/ROMFS/px4fmu_common/init.d/rcS
@@ -101,8 +101,14 @@ then
fi
fi
- # Try to get an USB console
- nshterm /dev/ttyACM0 &
+ if param compare SYS_AUTOSTART 1000
+ then
+ sh /etc/init.d/rc.hil
+ set MODE custom
+ else
+ # Try to get an USB console
+ nshterm /dev/ttyACM0 &
+ fi
#
# Upgrade PX4IO firmware
@@ -202,7 +208,6 @@ then
then
# Telemetry port is on both FMU boards ttyS1
mavlink start -b 57600 -d /dev/ttyS1
- usleep 5000
# Start commander
commander start