FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Added querying of mount_status. · bchenault/droneapi-python@206a350 · GitHub

Repository navigation

Commit 206a350

Browse files
Eric Liao
committed
Added querying of mount_status.
1 parent e510f51 commit 206a350

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

‎droneapi/module/api.py‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ def groundspeed(self):
176176
def airspeed(self):
177177
return self.__module.airspeed
178178

179+
@property
180+
def mount_status(self):
181+
return [ self.__module.mount_pitch, self.__module.mount_yaw, self.__module.mount_roll ]
182+
179183
@property
180184
def channel_override(self):
181185
overrides = self.__rc.override
@@ -319,6 +323,10 @@ def __init__(self, mpstate):
319323
self.yawspeed = None
320324
self.rollspeed = None
321325

326+
self.mount_pitch = None
327+
self.mount_yaw = None
328+
self.mount_roll = None
329+
322330
self.rc_readback = {}
323331

324332
self.last_waypoint = 0
@@ -398,6 +406,12 @@ def set(chnum, v):
398406
set(6, m.chan6_raw)
399407
set(7, m.chan7_raw)
400408
set(8, m.chan8_raw)
409+
elif typ == "MOUNT_STATUS":
410+
self.mount_pitch = m.pointing_a / 100
411+
self.mount_roll = m.pointing_b / 100
412+
self.mount_yaw = m.pointing_c / 100
413+
self.__on_change('mount')
414+
401415

402416
if (self.vehicle is not None) and hasattr(self.vehicle, 'mavrx_callback'):
403417
self.vehicle.mavrx_callback(m)

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL