implement icon rotation

This commit is contained in:
Jakob Ketterl
2019-09-19 02:25:32 +02:00
parent 15c28b130d
commit ecbae5af2d
3 changed files with 19 additions and 11 deletions

View File

@ -143,15 +143,13 @@ class WeatherParser(object):
class AprsLocation(LatLngLocation):
def __init__(self, data):
super().__init__(data["lat"], data["lon"])
self.comment = data["comment"] if "comment" in data else None
self.symbol = data["symbol"] if "symbol" in data else None
self.data = data
def __dict__(self):
res = super(AprsLocation, self).__dict__()
if self.comment is not None:
res["comment"] = self.comment
if self.symbol is not None:
res["symbol"] = self.symbol
for key in ["comment", "symbol", "course", "speed"]:
if key in self.data:
res[key] = self.data[key]
return res