From 1aa3250b148c4f14da1e80d02a68892f6407e23c Mon Sep 17 00:00:00 2001 From: Mark Jessop Date: Wed, 31 Jul 2019 22:29:35 +0930 Subject: [PATCH] Pass through 'unknown' DFM ID types (xD, xC, etc). --- auto_rx/auto_rx.py | 4 ++-- auto_rx/autorx/__init__.py | 2 +- auto_rx/autorx/aprs.py | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/auto_rx/auto_rx.py b/auto_rx/auto_rx.py index 7c67e1e..e80db99 100644 --- a/auto_rx/auto_rx.py +++ b/auto_rx/auto_rx.py @@ -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']): diff --git a/auto_rx/autorx/__init__.py b/auto_rx/autorx/__init__.py index 65f1c49..5cd7932 100644 --- a/auto_rx/autorx/__init__.py +++ b/auto_rx/autorx/__init__.py @@ -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 diff --git a/auto_rx/autorx/aprs.py b/auto_rx/autorx/aprs.py index 79050b9..869ae3d 100644 --- a/auto_rx/autorx/aprs.py +++ b/auto_rx/autorx/aprs.py @@ -61,6 +61,10 @@ def telemetry_to_aprs_position(sonde_data, object_name="", 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)