mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-21 16:18:29 -04:00
Tools: Set SYSID based on instance number in sim_vehicle.py
This commit is contained in:
parent
554e7f8d1c
commit
49af90a70e
@ -714,6 +714,8 @@ def start_vehicle(binary, opts, stuff, spawns=None):
|
||||
c = ["-I" + str(i)]
|
||||
if spawns is not None:
|
||||
c.extend(["--home", spawns[i]])
|
||||
if opts.auto_sysid and opts.sysid is None and 0 <= i < 255:
|
||||
c.extend(["--sysid", str(i + 1)])
|
||||
os.chdir(i_dir)
|
||||
run_in_terminal_window(cmd_name, cmd + c)
|
||||
os.chdir(old_dir)
|
||||
@ -1139,6 +1141,10 @@ group_sim.add_option("", "--slave",
|
||||
type='int',
|
||||
default=0,
|
||||
help="Set the number of JSON slave")
|
||||
group_sim.add_option("", "--auto-sysid",
|
||||
default=False,
|
||||
action='store_true',
|
||||
help="Set SYSID_THISMAV based upon instance number")
|
||||
parser.add_option_group(group_sim)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user