Update DFM decoder, handle new subtype format

pull/612/head
Mark Jessop 2022-02-08 18:19:18 +10:30
rodzic 2e18fce4bd
commit c4d227f444
4 zmienionych plików z 522 dodań i 289 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.5.9"
__version__ = "1.5.10-beta1"
# Global Variables

Wyświetl plik

@ -808,8 +808,12 @@ class SondeDecoder(object):
)
# DFM decoder
if len(self.raw_file_option)>0:
# Use raw ecc detailed raw output for DFM sondes.
self.raw_file_option = "--rawecc"
decode_cmd = (
f"./dfm09mod -vv --ecc --json --dist --auto --softin -i {self.raw_file_option.upper()} 2>/dev/null"
f"./dfm09mod -vv --ecc --json --dist --auto --softin -i {self.raw_file_option} 2>/dev/null"
)
# DFM sondes transmit continuously - average over the last 2 frames, and peak hold
@ -1282,8 +1286,17 @@ class SondeDecoder(object):
# in the subtype field, so we can use this directly.
_telemetry["type"] = _telemetry["subtype"]
elif self.sonde_type == "DFM":
# For DFM sondes, we need to use a lookup to convert the subtype field into a model.
_telemetry["type"] = decode_dfm_subtype(_telemetry["subtype"])
# As of 2021-2, the decoder provides a guess of the DFM subtype, provided as
# a subtype field of "0xX:GUESS", e.g. "0xD:DFM17P"
if ":" in _telemetry["subtype"]:
_subtype = _telemetry["subtype"].split(":")[1]
_telemetry["dfmcode"] = _telemetry["subtype"].split(":")[0]
_telemetry["type"] = _subtype
_telemetry["subtype"] = _subtype
else:
_telemetry["type"] = "DFM"
_telemetry["subtype"] = "DFM"
# Check frame ID here to ensure we are on dfm09mod version with the frame number fixes (2020-12).
if _telemetry["frame"] < 256:

Wyświetl plik

@ -172,6 +172,8 @@ class SondehubUploader(object):
_output["type"] = "DFM"
_output["subtype"] = telemetry["type"]
_output["serial"] = telemetry["id"].split("-")[1]
if "dfmcode" in telemetry:
_output["dfmcode"] = telemetry["dfmcode"]
elif telemetry["type"].startswith("M10") or telemetry["type"].startswith("M20"):
_output["manufacturer"] = "Meteomodem"

Plik diff jest za duży Load Diff