From 07c07928eef209524b8e99320c958c18835c5967 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 16 Feb 2019 10:10:59 +1100 Subject: [PATCH] Tools: autotest: adjust Rover mission-toggling mission for magic-home --- Tools/autotest/apmrover2.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Tools/autotest/apmrover2.py b/Tools/autotest/apmrover2.py index 5ce33e230f..d8dba249ec 100644 --- a/Tools/autotest/apmrover2.py +++ b/Tools/autotest/apmrover2.py @@ -119,14 +119,14 @@ class AutoTestRover(AutoTest): self.set_parameter("RC7_OPTION", 7) self.set_parameter("RC8_OPTION", 58) - self.clear_wp() - self.mavproxy.send('switch 5\n') self.wait_mode('MANUAL') self.wait_ready_to_arm() self.arm_vehicle() + self.clear_wp() + # first aim north self.progress("\nTurn right towards north") self.reach_heading_manual(10) @@ -171,8 +171,10 @@ class AutoTestRover(AutoTest): self.progress("Checking number of saved waypoints") num_wp = self.save_mission_to_file( os.path.join(testdir, "rover-ch7_mission.txt")) - if num_wp != 6: - raise NotAchievedException("Did not get 6 waypoints") + expected = 7 # home + 6 toggled in + if num_wp != expected: + raise NotAchievedException("Did not get %u waypoints; got %u" % + (expected, num_wp)) # TODO: actually drive the mission