mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 07:23:35 +08:00
sitl_run.sh: env variable NO_PXH for deamon mode
This allows to set the environment variable NO_PXH to start SITL without the interactive pxh> shell. For this, px4 is called with the -d arg which sets it to deamon mode. This feature is handy to script sitl_run.sh.
This commit is contained in:
+8
-1
@@ -35,6 +35,13 @@ else
|
|||||||
sudo_enabled=""
|
sudo_enabled=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# To disable user input
|
||||||
|
if [[ -n "$NO_PXH" ]]; then
|
||||||
|
no_pxh=-d
|
||||||
|
else
|
||||||
|
no_pxh=""
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$model" == "" ] || [ "$model" == "none" ]
|
if [ "$model" == "" ] || [ "$model" == "none" ]
|
||||||
then
|
then
|
||||||
echo "empty model, setting iris as default"
|
echo "empty model, setting iris as default"
|
||||||
@@ -111,7 +118,7 @@ fi
|
|||||||
# Do not exit on failure now from here on because we want the complete cleanup
|
# Do not exit on failure now from here on because we want the complete cleanup
|
||||||
set +e
|
set +e
|
||||||
|
|
||||||
sitl_command="$sudo_enabled $sitl_bin $chroot_enabled $src_path $src_path/${rcS_dir}/${model}"
|
sitl_command="$sudo_enabled $sitl_bin $no_pxh $chroot_enabled $src_path $src_path/${rcS_dir}/${model}"
|
||||||
|
|
||||||
echo SITL COMMAND: $sitl_command
|
echo SITL COMMAND: $sitl_command
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user