From 7a2a60e65cf9ca146a3ca1d0deffa04041ec6dd0 Mon Sep 17 00:00:00 2001 From: Pierre Kancir Date: Sun, 13 Dec 2020 23:57:20 +0100 Subject: [PATCH] Tools: rover: correct test_setting_modes_via_mavproxy_switch for RTL and AUTO --- .../MAVProxy_SetModeUsingSwitch/test_arming.txt | 4 ++++ Tools/autotest/rover.py | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 Tools/autotest/ArduRover_Tests/MAVProxy_SetModeUsingSwitch/test_arming.txt diff --git a/Tools/autotest/ArduRover_Tests/MAVProxy_SetModeUsingSwitch/test_arming.txt b/Tools/autotest/ArduRover_Tests/MAVProxy_SetModeUsingSwitch/test_arming.txt new file mode 100644 index 0000000000..d4efe03d78 --- /dev/null +++ b/Tools/autotest/ArduRover_Tests/MAVProxy_SetModeUsingSwitch/test_arming.txt @@ -0,0 +1,4 @@ +QGC WPL 110 +0 0 0 16 0.000000 0.000000 0.000000 0.000000 -35.363262 149.165237 -0.110000 1 +1 0 0 20 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 +2 0 3 17 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 diff --git a/Tools/autotest/rover.py b/Tools/autotest/rover.py index 92099b423a..790c43f99a 100644 --- a/Tools/autotest/rover.py +++ b/Tools/autotest/rover.py @@ -571,11 +571,13 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm) self.progress("Pin mask changed after relay command") def test_setting_modes_via_mavproxy_switch(self): + self.load_mission(self.arming_test_mission()) + self.wait_ready_to_arm() fnoo = [(1, 'MANUAL'), (2, 'MANUAL'), (3, 'RTL'), - # (4, 'AUTO'), # no mission, can't set auto - (5, 'RTL'), # non-existant mode, should stay in RTL + (4, 'AUTO'), + (5, 'AUTO'), # non-existant mode, should stay in RTL (6, 'MANUAL')] for (num, expected) in fnoo: self.mavproxy.send('switch %u\n' % num)