Skip to content

Commit

Permalink
autotest: add --enable-fgview option
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker authored and rmackay9 committed Sep 4, 2024
1 parent 2a37107 commit 4ff6f60
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Tools/autotest/autotest.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ def run_step(step):
"reset_after_every_test": opts.reset_after_every_test,
"build_opts": copy.copy(build_opts),
"generate_junit": opts.junit,
"enable_fgview": opts.enable_fgview,
}
if opts.speedup is not None:
fly_opts["speedup"] = opts.speedup
Expand Down Expand Up @@ -862,6 +863,9 @@ def format_epilog(self, formatter):
parser.add_option("--viewerip",
default=None,
help='IP address to send MAVLink and fg packets to')
parser.add_option("--enable-fgview",
action='store_true',
help="Enable FlightGear output")
parser.add_option("--map",
action='store_true',
default=False,
Expand Down
4 changes: 2 additions & 2 deletions Tools/autotest/pysim/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ def start_SITL(binary,
disable_breakpoints=False,
customisations=[],
lldb=False,
enable_fgview_output=False,
enable_fgview=False,
supplementary=False,
stdout_prefix=None):

Expand Down Expand Up @@ -534,7 +534,7 @@ def start_SITL(binary,
cmd.extend(['--unhide-groups'])
# somewhere for MAVProxy to connect to:
cmd.append('--serial1=tcp:2')
if enable_fgview_output:
if enable_fgview:
cmd.append("--enable-fgview")

if len(defaults):
Expand Down
3 changes: 3 additions & 0 deletions Tools/autotest/vehicle_test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -1865,6 +1865,7 @@ def __init__(self,
num_aux_imus=0,
dronecan_tests=False,
generate_junit=False,
enable_fgview=False,
build_opts={}):

self.start_time = time.time()
Expand Down Expand Up @@ -1931,6 +1932,7 @@ def __init__(self,
self.last_heartbeat_time_wc_s = 0
self.in_drain_mav = False
self.tlog = None
self.enable_fgview = enable_fgview

self.rc_thread = None
self.rc_thread_should_quit = False
Expand Down Expand Up @@ -9100,6 +9102,7 @@ def start_SITL(self, binary=None, sitl_home=None, **sitl_args):
"valgrind": self.valgrind,
"callgrind": self.callgrind,
"wipe": True,
"enable_fgview": self.enable_fgview,
}
start_sitl_args.update(**sitl_args)
if ("defaults_filepath" not in start_sitl_args or
Expand Down

0 comments on commit 4ff6f60

Please sign in to comment.