Tools: autotest: adjust Rover mission-toggling mission for magic-home

This commit is contained in:
Peter Barker 2019-02-16 10:10:59 +11:00 committed by Randy Mackay
parent 88575bd536
commit 07c07928ee

View File

@ -119,14 +119,14 @@ class AutoTestRover(AutoTest):
self.set_parameter("RC7_OPTION", 7) self.set_parameter("RC7_OPTION", 7)
self.set_parameter("RC8_OPTION", 58) self.set_parameter("RC8_OPTION", 58)
self.clear_wp()
self.mavproxy.send('switch 5\n') self.mavproxy.send('switch 5\n')
self.wait_mode('MANUAL') self.wait_mode('MANUAL')
self.wait_ready_to_arm() self.wait_ready_to_arm()
self.arm_vehicle() self.arm_vehicle()
self.clear_wp()
# first aim north # first aim north
self.progress("\nTurn right towards north") self.progress("\nTurn right towards north")
self.reach_heading_manual(10) self.reach_heading_manual(10)
@ -171,8 +171,10 @@ class AutoTestRover(AutoTest):
self.progress("Checking number of saved waypoints") self.progress("Checking number of saved waypoints")
num_wp = self.save_mission_to_file( num_wp = self.save_mission_to_file(
os.path.join(testdir, "rover-ch7_mission.txt")) os.path.join(testdir, "rover-ch7_mission.txt"))
if num_wp != 6: expected = 7 # home + 6 toggled in
raise NotAchievedException("Did not get 6 waypoints") if num_wp != expected:
raise NotAchievedException("Did not get %u waypoints; got %u" %
(expected, num_wp))
# TODO: actually drive the mission # TODO: actually drive the mission