Fixed (temporarily) HIL by allowing index 1000 to start a matching setup

This commit is contained in:
Lorenz Meier
2013-09-08 20:40:55 +02:00
parent 2d6dfe2a9e
commit 2e8b675c6c
3 changed files with 12 additions and 15 deletions
+4 -4
View File
@@ -5,10 +5,9 @@
echo "[HIL] starting.." echo "[HIL] starting.."
uorb start
# Tell MAVLink that this link is "fast" # 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 # Create a fake HIL /dev/pwm_output interface
hil mode_pwm hil mode_pwm
@@ -50,7 +49,8 @@ att_pos_estimator_ekf start
# Load mixer and start controllers (depends on px4io) # Load mixer and start controllers (depends on px4io)
# #
mixer load /dev/pwm_output /etc/mixers/FMU_AET.mix mixer load /dev/pwm_output /etc/mixers/FMU_AET.mix
fw_pos_control_l1 start #fw_pos_control_l1 start
fw_att_control start fw_att_control start
echo "[HIL] setup done, running" echo "[HIL] setup done, running"
-8
View File
@@ -21,7 +21,6 @@ if mavlink stop
then then
echo "stopped other MAVLink instance" echo "stopped other MAVLink instance"
fi fi
sleep 2
mavlink start -b 230400 -d /dev/ttyACM0 mavlink start -b 230400 -d /dev/ttyACM0
# Stop commander # Stop commander
@@ -37,13 +36,6 @@ then
echo "Commander started" echo "Commander started"
fi fi
# Stop px4io
if px4io stop
then
echo "PX4IO stopped"
fi
sleep 1
# Start px4io if present # Start px4io if present
if px4io start if px4io start
then then
+8 -3
View File
@@ -101,8 +101,14 @@ then
fi fi
fi fi
# Try to get an USB console if param compare SYS_AUTOSTART 1000
nshterm /dev/ttyACM0 & then
sh /etc/init.d/rc.hil
set MODE custom
else
# Try to get an USB console
nshterm /dev/ttyACM0 &
fi
# #
# Upgrade PX4IO firmware # Upgrade PX4IO firmware
@@ -202,7 +208,6 @@ then
then then
# Telemetry port is on both FMU boards ttyS1 # Telemetry port is on both FMU boards ttyS1
mavlink start -b 57600 -d /dev/ttyS1 mavlink start -b 57600 -d /dev/ttyS1
usleep 5000
# Start commander # Start commander
commander start commander start