Browse Source

Tools: autotest: do not navigate to 0,0,0

This falls afould of the uninitialised-location check
master
Peter Barker 6 years ago committed by Peter Barker
parent
commit
119c5fe835
  1. 6
      Tools/autotest/arducopter.py

6
Tools/autotest/arducopter.py

@ -2062,7 +2062,7 @@ class AutoTestCopter(AutoTest):
m.climb < climb_tolerance): m.climb < climb_tolerance):
break break
def fly_guided_move_relative(self, lat, lon, alt): def fly_guided_move_global_relative_alt(self, lat, lon, alt):
startpos = self.mav.recv_match(type='GLOBAL_POSITION_INT', startpos = self.mav.recv_match(type='GLOBAL_POSITION_INT',
blocking=True) blocking=True)
@ -2372,7 +2372,7 @@ class AutoTestCopter(AutoTest):
self.guided_achieve_heading(135) self.guided_achieve_heading(135)
"""move the vehicle using set_position_target_global_int""" """move the vehicle using set_position_target_global_int"""
self.fly_guided_move_relative(5, 5, 10) self.fly_guided_move_global_relative_alt(5, 5, 10)
"""move the vehicle using MAVLINK_MSG_ID_SET_POSITION_TARGET_LOCAL_NED""" """move the vehicle using MAVLINK_MSG_ID_SET_POSITION_TARGET_LOCAL_NED"""
self.fly_guided_stop() self.fly_guided_stop()
@ -2713,7 +2713,7 @@ class AutoTestCopter(AutoTest):
self.wait_seconds(5) self.wait_seconds(5)
start = self.mav.location() start = self.mav.location()
self.progress("Moving to guided/position controller") self.progress("Moving to guided/position controller")
self.fly_guided_move_relative(0, 0, 0) self.fly_guided_move_global_relative_alt(1, 0, 0)
self.guided_achieve_heading(0) self.guided_achieve_heading(0)
(roi_lat, roi_lon) = mavextra.gps_offset(start.lat, (roi_lat, roi_lon) = mavextra.gps_offset(start.lat,
start.lng, start.lng,

Loading…
Cancel
Save