diff --git a/horusgui/__init__.py b/horusgui/__init__.py index 39774cf..f7e5c1d 100755 --- a/horusgui/__init__.py +++ b/horusgui/__init__.py @@ -1 +1 @@ -__version__ = "0.3.16" +__version__ = "0.3.17" diff --git a/horusgui/config.py b/horusgui/config.py index 76163d2..5e4c47a 100644 --- a/horusgui/config.py +++ b/horusgui/config.py @@ -76,7 +76,7 @@ def read_config(widgets): global qt_settings, default_config # This is getting a bit ridiculous, need to re-think this approach. - OK_VERSIONS = [__version__, '0.3.15', '0.3.14', '0.3.13', '0.3.12', '0.3.11', '0.3.10', '0.3.9', '0.3.8', '0.3.7', '0.3.6', '0.3.5', '0.3.4', '0.3.1', '0.2.1'] + OK_VERSIONS = [__version__, '0.3.16', '0.3.15', '0.3.14', '0.3.13', '0.3.12', '0.3.11', '0.3.10', '0.3.9', '0.3.8', '0.3.7', '0.3.6', '0.3.5', '0.3.4', '0.3.1', '0.2.1'] # Try and read in the version parameter from QSettings if qt_settings.value("version") not in OK_VERSIONS: diff --git a/horusgui/gui.py b/horusgui/gui.py index 9a6e397..c1bf392 100644 --- a/horusgui/gui.py +++ b/horusgui/gui.py @@ -876,11 +876,20 @@ def handle_status_update(status): def get_latest_snr(): global widgets - # Assume 2 Hz stats updates, and take the peak of the last 4 seconds. - SNR_LEN = 2*4 + _current_modem = widgets["horusModemSelector"].currentText() + + _snr_update_rate = 2 # Hz + + if "RTTY" in _current_modem: + # RTTY needs a much longer lookback period to find the peak SNR + # This is because of a very long buffer used in the RTTY demod + _snr_lookback = _snr_update_rate * 15 + else: + # For Horus Binary we can use a smaller lookback time + _snr_lookback = _snr_update_rate * 4 - if len(widgets["snrPlotSNR"])>SNR_LEN: - return np.max(widgets["snrPlotSNR"][-1*SNR_LEN:]) + if len(widgets["snrPlotSNR"])>_snr_lookback: + return np.max(widgets["snrPlotSNR"][-1*_snr_lookback:]) else: return np.max(widgets["snrPlotSNR"]) diff --git a/pyproject.toml b/pyproject.toml index d983224..a08287e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "horusgui" -version = "0.3.16" +version = "0.3.17" description = "" authors = ["Mark Jessop "]