Browse Source

autotest: fix mavproxy switch test

The order in which we fix the environment means that we need to be
listening on the correct port for rc values - so just fix it in the test
zr-v5.1
Peter Barker 4 years ago committed by Peter Barker
parent
commit
7d9daccdf7
  1. 13
      Tools/autotest/rover.py

13
Tools/autotest/rover.py

@ -619,6 +619,8 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm) @@ -619,6 +619,8 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm)
self.customise_SITL_commandline([
"--rc-in-port", "5502",
])
ex = None
try:
self.load_mission(self.arming_test_mission())
self.wait_ready_to_arm()
fnoo = [(1, 'MANUAL'),
@ -632,6 +634,17 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm) @@ -632,6 +634,17 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm)
mavproxy.send('switch %u\n' % num)
self.wait_mode(expected)
self.stop_mavproxy(mavproxy)
except Exception as e:
self.print_exception_caught(e)
ex = e
# if we don't put things back ourselves then the test cleanup
# doesn't go well as we can't set the RC defaults correctly:
self.customise_SITL_commandline([
])
if ex is not None:
raise ex
def test_setting_modes_via_mavproxy_mode_command(self):
fnoo = [(1, 'ACRO'),

Loading…
Cancel
Save