From 91388a86ded0383364c5ed9a87245aa8d911eb05 Mon Sep 17 00:00:00 2001 From: Mark Jessop Date: Wed, 9 Oct 2019 20:07:25 +1030 Subject: [PATCH] Display estimated sonde frequency in web GUI, if available. --- auto_rx/autorx/__init__.py | 2 +- auto_rx/autorx/web.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/auto_rx/autorx/__init__.py b/auto_rx/autorx/__init__.py index 6561a3d..41767b4 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.2.0-beta5" +__version__ = "1.2.0-beta6" # Global Variables diff --git a/auto_rx/autorx/web.py b/auto_rx/autorx/web.py index d8a91c3..2af4c51 100644 --- a/auto_rx/autorx/web.py +++ b/auto_rx/autorx/web.py @@ -340,6 +340,16 @@ class WebExporter(object): _telem = telemetry.copy() + + if 'f_centre' in _telem: + # We have an estimate of the sonde's centre frequency from the modem, use this in place of + # the RX frequency. + # Round to 1 kHz + _freq = round(telemetry['f_centre']/1000.0) + # Convert to MHz. + _telem['freq'] = "%.3f MHz" % (_freq/1e3) + + # Add the telemetry information to the global telemetry store if _telem['id'] not in flask_telemetry_store: flask_telemetry_store[_telem['id']] = {'timestamp':time.time(), 'latest_telem':_telem, 'path':[], 'track': GenericTrack()}