Skip to content

Commit

Permalink
Added ability to get satellites
Browse files Browse the repository at this point in the history
  • Loading branch information
mihirbala committed Aug 24, 2023
1 parent 954f475 commit e4d2ba3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hermes/python/interfaces/DroneItf.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ def getBatteryPercentage(self):
def getMagnetometerReading(self):
pass

@abstractmethod
def getSatellites(self):
pass

''' Control methods '''

@abstractmethod
Expand Down
3 changes: 3 additions & 0 deletions onboard/onion/remote/implementation/drones/ParrotAnafi.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from olympe.messages.ardrone3.PilotingState import moveToChanged
from olympe.messages.common.CommonState import BatteryStateChanged
from olympe.messages.ardrone3.PilotingState import AttitudeChanged, GpsLocationChanged, AltitudeChanged, FlyingStateChanged
from olympe.messages.ardrone3.GPSState import NumberOfSatelliteChanged
from olympe.messages.gimbal import set_target, attitude
from olympe.messages.wifi import rssi_changed
from olympe.messages.battery import capacity
Expand Down Expand Up @@ -161,6 +162,8 @@ def getBatteryPercentage(self):

def getMagnetometerReading(self):
return self.drone.get_state(MagnetoCalibrationRequiredState)["required"]
def getSatellites(self):
return self.drone.get_state(NumberOfSatelliteChanged)["numberOfSatellite"]

def kill(self):
self.active = False
Expand Down

0 comments on commit e4d2ba3

Please sign in to comment.