mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00: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.."
|
||||
|
||||
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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user