Pass through 'unknown' DFM ID types (xD, xC, etc).

pull/199/head
Mark Jessop 2019-07-31 22:29:35 +09:30
rodzic e3ea469612
commit 1aa3250b14
3 zmienionych plików z 7 dodań i 3 usunięć

Wyświetl plik

@ -448,8 +448,8 @@ def telemetry_filter(telemetry):
# ~2025-2030, so have expanded the regex to match (and also support some older RS92s)
vaisala_callsign_valid = re.match(r'[E-Z][0-5][\d][1-7]\d{4}', _serial)
# Regex to check DFM06/09/15/17 callsigns.
dfm_callsign_valid = re.match(r'DFM[01][5679]-\d{6}', _serial)
# Regex to check DFM06/09/15/17 callsigns. Also catches the 'unknown' types (xC, xD, etc)
dfm_callsign_valid = re.match(r'DFM[01x][5679CD]-\d{6}', _serial)
# If Vaisala or DFMs, check the callsigns are valid. If M10, iMet or LMS6, just pass it through.
if vaisala_callsign_valid or dfm_callsign_valid or ('M10' in telemetry['type']) or ('MK2LMS' in telemetry['type']) or ('LMS6' in telemetry['type']) or ('iMet' in telemetry['type']):

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.1.3.2"
__version__ = "1.1.3.3"
# Global Variables

Wyświetl plik

@ -61,6 +61,10 @@ def telemetry_to_aprs_position(sonde_data, object_name="<id>", aprs_comment="BOM
elif "DFM17" in sonde_data['id']:
_object_name = "DF7" + _id_suffix
sonde_data['type'] = 'DFM17'
elif 'DFMx' in sonde_data['id']:
# Catch-all for the 'unknown' DFM types.
_object_name = "DF" + sonde_data['id'][4] + _id_suffix
sonde_data['type'] = sonde_data['id'].split('-')[0]
else:
return (None, None)