Skip to content

Commit

Permalink
Merge pull request #646 from georgehines/home_position-listener
Browse files Browse the repository at this point in the history
Home position listener
  • Loading branch information
mrpollo authored Jul 15, 2016
2 parents f60b81a + e733072 commit 51d64c8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dronekit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1200,6 +1200,11 @@ def listener(self, name, msg):
self._wploader.expected_count = msg.count
self._master.waypoint_request_send(0)


@self.on_message(['HOME_POSITION'])
def listener(self, name, msg):
self._home_location = LocationGlobal(msg.latitude/1.0e7, msg.longitude/1.0e7, msg.altitude/1000.0);

@self.on_message(['WAYPOINT', 'MISSION_ITEM'])
def listener(self, name, msg):
if not self._wp_loaded:
Expand Down

0 comments on commit 51d64c8

Please sign in to comment.