Fix KML generation bug with iMet sondes (or any sonde that don't report a subtype)

pull/336/head
Mark Jessop 2020-12-23 09:18:00 +10:30
rodzic 4b9b5d3ba5
commit e2e5599f7c
3 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -17,7 +17,7 @@ except ImportError:
# MINOR - New sonde type support, other fairly big changes that may result in telemetry or config file incompatability issus.
# PATCH - Small changes, or minor feature additions.
__version__ = "1.4.0-beta1"
__version__ = "1.4.0-beta2"
# Global Variables

Wyświetl plik

@ -1068,6 +1068,7 @@ class SondeDecoder(object):
else:
# If no subtype field provided, we use the identified sonde type.
_telemetry["type"] = self.sonde_type
_telemetry["subtype"] = self.sonde_type
_telemetry["freq_float"] = self.sonde_freq / 1e6
_telemetry["freq"] = "%.3f MHz" % (self.sonde_freq / 1e6)

Wyświetl plik

@ -187,7 +187,8 @@ def flask_get_kml_feed():
linestring.stylemap.normalstyle.polystyle.color = "AA03bafc"
linestring.stylemap.highlightstyle.polystyle.color = "CC03bafc"
except Exception as e:
print(e)
logging.error("KML - Could not parse data from RS %s - %s" % (rs_id, str(e)))
return kml.kml(), 200, {"content-type": "application/vnd.google-earth.kml+xml"}