Skip to content

Commit

Permalink
autotest: add set_home function
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker authored and rmackay9 committed Apr 12, 2024
1 parent 50015b4 commit 3be1b9e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Tools/autotest/vehicle_test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -8993,6 +8993,15 @@ def monitor_groundspeed(self, want, tolerance=0.5, timeout=5):
self.progress("GroundSpeed OK (got=%f) (want=%f)" %
(m.groundspeed, want))

def set_home(self, loc):
'''set home to supplied loc'''
self.run_cmd_int(
mavutil.mavlink.MAV_CMD_DO_SET_HOME,
p5=int(loc.lat*1e7),
p6=int(loc.lng*1e7),
p7=loc.alt,
)

def SetHome(self):
'''Setting and fetching of home'''
if self.is_tracker():
Expand Down

0 comments on commit 3be1b9e

Please sign in to comment.