mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 14:08:52 +08:00
Fixed (temporarily) HIL by allowing index 1000 to start a matching setup
This commit is contained in:
@@ -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"
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user