mirror of https://github.com/ArduPilot/ardupilot
Tools: sub set-position-target-global-int sends target once
This commit is contained in:
parent
d63fe1eb6c
commit
bce3c551e7
|
@ -290,10 +290,6 @@ class AutoTestSub(AutoTest):
|
|||
lon = 5
|
||||
alt = -10
|
||||
|
||||
tstart = self.get_sim_time()
|
||||
while True:
|
||||
if self.get_sim_time_cached() - tstart > 200:
|
||||
raise NotAchievedException("Did not move far enough")
|
||||
# send a position-control command
|
||||
self.mav.mav.set_position_target_global_int_send(
|
||||
0, # timestamp
|
||||
|
@ -313,6 +309,11 @@ class AutoTestSub(AutoTest):
|
|||
0, # yaw
|
||||
0, # yawrate
|
||||
)
|
||||
|
||||
tstart = self.get_sim_time()
|
||||
while True:
|
||||
if self.get_sim_time_cached() - tstart > 200:
|
||||
raise NotAchievedException("Did not move far enough")
|
||||
pos = self.mav.recv_match(type='GLOBAL_POSITION_INT',
|
||||
blocking=True)
|
||||
delta = self.get_distance_int(startpos, pos)
|
||||
|
|
Loading…
Reference in New Issue