Skip to content

Commit

Permalink
Added manual heading parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
Khopa authored and rp- committed Aug 11, 2020
1 parent a5ace97 commit 8f62f87
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dcs/unitgroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,14 @@ def __init__(self, _id, name=None, start_time=0):
self.frequency = None
self.visible = False # visible before start flag
self.spans = []
self.manualHeading = False

def load_from_dict(self, d):
super(VehicleGroup, self).load_from_dict(d)
self.modulation = d.get("modulation")
self.communication = d.get("communication", False)
self.visible = d.get("visible", False)
self.manualHeading = d.get("manualHeading", False)

def add_span(self, position: mapping.Point):
self.spans.append({"x": position.x, "y": position.y})
Expand All @@ -292,6 +294,7 @@ def dict(self):
d["communication"] = self.communication
d["frequency"] = self.frequency
d["visible"] = self.visible
d["manualHeading"] = self.manualHeading
if self.spans is not None:
# spans
d["route"]["spans"] = {}
Expand Down

0 comments on commit 8f62f87

Please sign in to comment.