Skip to content

Commit

Permalink
Merge pull request #408 from mavlink/pr-update-proto-mavsdk-server
Browse files Browse the repository at this point in the history
Update mavsdk_server and proto submodule
  • Loading branch information
julianoes authored Nov 30, 2021
2 parents 8ca8390 + 8130e46 commit 1f70fec
Show file tree
Hide file tree
Showing 7 changed files with 510 additions and 63 deletions.
2 changes: 1 addition & 1 deletion MAVSDK_SERVER_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.46.1
v0.50.0
24 changes: 20 additions & 4 deletions mavsdk/mission.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ class MissionItem:
yaw_deg : float
Absolute yaw angle (in degrees)
camera_photo_distance_m : float
Camera photo distance to use after this mission item (in meters)
"""


Expand Down Expand Up @@ -154,7 +157,8 @@ def __init__(
loiter_time_s,
camera_photo_interval_s,
acceptance_radius_m,
yaw_deg):
yaw_deg,
camera_photo_distance_m):
""" Initializes the MissionItem object """
self.latitude_deg = latitude_deg
self.longitude_deg = longitude_deg
Expand All @@ -168,6 +172,7 @@ def __init__(
self.camera_photo_interval_s = camera_photo_interval_s
self.acceptance_radius_m = acceptance_radius_m
self.yaw_deg = yaw_deg
self.camera_photo_distance_m = camera_photo_distance_m

def __eq__(self, to_compare):
""" Checks if two MissionItem are the same """
Expand All @@ -186,7 +191,8 @@ def __eq__(self, to_compare):
(self.loiter_time_s == to_compare.loiter_time_s) and \
(self.camera_photo_interval_s == to_compare.camera_photo_interval_s) and \
(self.acceptance_radius_m == to_compare.acceptance_radius_m) and \
(self.yaw_deg == to_compare.yaw_deg)
(self.yaw_deg == to_compare.yaw_deg) and \
(self.camera_photo_distance_m == to_compare.camera_photo_distance_m)

except AttributeError:
return False
Expand All @@ -205,7 +211,8 @@ def __str__(self):
"loiter_time_s: " + str(self.loiter_time_s),
"camera_photo_interval_s: " + str(self.camera_photo_interval_s),
"acceptance_radius_m: " + str(self.acceptance_radius_m),
"yaw_deg: " + str(self.yaw_deg)
"yaw_deg: " + str(self.yaw_deg),
"camera_photo_distance_m: " + str(self.camera_photo_distance_m)
])

return f"MissionItem: [{struct_repr}]"
Expand Down Expand Up @@ -248,7 +255,10 @@ def translate_from_rpc(rpcMissionItem):
rpcMissionItem.acceptance_radius_m,


rpcMissionItem.yaw_deg
rpcMissionItem.yaw_deg,


rpcMissionItem.camera_photo_distance_m
)

def translate_to_rpc(self, rpcMissionItem):
Expand Down Expand Up @@ -327,6 +337,12 @@ def translate_to_rpc(self, rpcMissionItem):





rpcMissionItem.camera_photo_distance_m = self.camera_photo_distance_m





class MissionPlan:
Expand Down
36 changes: 22 additions & 14 deletions mavsdk/mission_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1f70fec

Please sign in to comment.