posix shell: lots of cleanup and fixes

- move posix-configs/SITL/init/{rcS,10016_iris,6011_typhoon_h480} to ROMFS/px4fmu_common/init.d-posix
  allows for easier unification, only one symlink is required.
  - rcS: add AUTOCNF support. Update scripts to match with behavior of PX4
    master (parameter values, some sitl driver got removed)
- add alias to allow 'set variable value' syntax in scripts to px4-alias.sh
- use px4_getopt
- use separate argument for the test_data directory
- append PATH from within the px4 binary: this simplifies the usage
  w/o the sitl_run.sh script.
- add 'source px4-alias.sh' to all existing sitl startup scripts
- move sitl mixers to ROMFS/px4fmu_common/mixers-sitl
  makes it easier to use existing mixers and sitl-specific ones.
- remove unused rcS_gazebo_delta_wing
This commit is contained in:
Beat Küng
2018-08-04 12:01:12 +02:00
committed by Lorenz Meier
parent 413c09e20e
commit 7822e5b5c3
58 changed files with 472 additions and 371 deletions
+1 -1
View File
@@ -148,7 +148,7 @@ set(config_module_list
# Default config_sitl_rcS_dir (posix_sitl_default), this is overwritten later
# for the config posix_sitl_efk2 and set again, explicitly, for posix_sitl_lpe,
# which are based on posix_sitl_default.
set(config_sitl_rcS_dir etc/init/rcS CACHE INTERNAL "init script dir for sitl")
set(config_sitl_rcS_dir posix-configs/SITL/init/ekf2 CACHE INTERNAL "init script dir for sitl")
set(config_sitl_viewer jmavsim CACHE STRING "viewer for sitl")
set_property(CACHE config_sitl_viewer PROPERTY STRINGS "jmavsim;none")
+8
View File
@@ -7,6 +7,14 @@ if [ ! -n "$ZSH_VERSION" ]; then
shopt -s expand_aliases
fi
# Map the NuttX-style variable definition 'set <var> <value>' to something that
# bash and alternatives understand
set() {
eval $1=$2
}
# alternative method with an alias:
# alias set='f(){ set -- "$1=$2"; eval "$1"; unset -f f; }; eval f'
# Don't stop on errors.
#set -e