forked from Archive/PX4-Autopilot
microdds_client: added environment variable for defining namespace
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@phd.unipd.it>
This commit is contained in:
parent
5a2e41c4e4
commit
f2c71a8874
|
@ -260,13 +260,19 @@ fi
|
|||
navigator start
|
||||
|
||||
# Try to start the microdds_client with UDP transport if module exists
|
||||
if [ $px4_instance -eq 0 ]
|
||||
microdds_ns=""
|
||||
if [ "$px4_instance" -ne "0" ]
|
||||
then
|
||||
microdds_client start -t udp -p 8888
|
||||
else
|
||||
# Assign new xrce dds key based on instance number and set default namespace
|
||||
param set XRCE_DDS_KEY ${px4_instance}
|
||||
microdds_client start -t udp -p 8888 -n "px4_$px4_instance"
|
||||
microdds_ns="-n px4_$px4_instance"
|
||||
fi
|
||||
if [ -n "$PX4_MICRODDS_NS" ]
|
||||
then
|
||||
# Override namespace if environment variable is defined
|
||||
microdds_ns="-n $PX4_MICRODDS_NS"
|
||||
fi
|
||||
microdds_client start -t udp -p 8888 $microdds_ns
|
||||
|
||||
if param greater -s MNT_MODE_IN -1
|
||||
then
|
||||
|
|
Loading…
Reference in New Issue