mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 05:13:34 +08:00
sih: remove SYS_SIH parameter and extend SYS_HITL
This commit is contained in:
@@ -13,9 +13,5 @@ sh /etc/init.d/rc.mc_defaults
|
||||
set MIXER quad_x
|
||||
set PWM_OUT 1234
|
||||
|
||||
# set HIL to avoid sensors startup
|
||||
param set SYS_HITL 1
|
||||
|
||||
param set SYS_SIH 1
|
||||
|
||||
param set BAT_N_CELLS 4
|
||||
# set SYS_HITL to 2 to start the SIH and avoid sensors startup
|
||||
param set SYS_HITL 2
|
||||
|
||||
@@ -202,7 +202,7 @@ then
|
||||
if fmu mode_${AUX_MODE} $FMU_ARGS
|
||||
then
|
||||
# Append aux mixer to main device.
|
||||
if param compare SYS_HITL 1
|
||||
if param greater SYS_HITL 0
|
||||
then
|
||||
if mixer append ${OUTPUT_DEV} ${MIXER_AUX_FILE}
|
||||
then
|
||||
|
||||
@@ -328,17 +328,16 @@ else
|
||||
# Sensors System (start before Commander so Preflight checks are properly run).
|
||||
# Commander needs to be this early for in-air-restarts.
|
||||
#
|
||||
if param compare SYS_HITL 1
|
||||
if param greater SYS_HITL 0
|
||||
then
|
||||
set OUTPUT_MODE hil
|
||||
sensors start -h
|
||||
commander start --hil
|
||||
|
||||
# disable GPS
|
||||
param set GPS_1_CONFIG 0
|
||||
|
||||
# start the SIH if needed
|
||||
if param compare SYS_SIH 1
|
||||
# start the simulator in hardware if needed
|
||||
if param compare SYS_HITL 2
|
||||
then
|
||||
sih start
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user