Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tools: Set SYSID based on instance number in sim_vehicle.py #15758

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions Tools/autotest/sim_vehicle.py
Expand Up @@ -703,6 +703,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)
Expand Down Expand Up @@ -1120,6 +1122,10 @@ def generate_frame_help():
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)


Expand Down