Emit warning message if radio dial cannot be parsed

pyqt6 v0.3.14
Mark Jessop 2023-09-22 14:15:25 +09:30
rodzic c531572b2b
commit 27c98174a0
3 zmienionych plików z 15 dodań i 10 usunięć

Wyświetl plik

@ -1 +1 @@
__version__ = "0.3.13" __version__ = "0.3.14"

Wyświetl plik

@ -76,7 +76,7 @@ def read_config(widgets):
""" Read in configuration settings from Qt """ """ Read in configuration settings from Qt """
global qt_settings, default_config global qt_settings, default_config
OK_VERSIONS = [__version__, '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.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 # Try and read in the version parameter from QSettings
if qt_settings.value("version") not in OK_VERSIONS: if qt_settings.value("version") not in OK_VERSIONS:

Wyświetl plik

@ -254,7 +254,7 @@ widgets["habitatUploadPosition"].setToolTip(
widgets["dialFreqLabel"] = QtGui.QLabel("<b>Radio Dial Freq (MHz):</b>") widgets["dialFreqLabel"] = QtGui.QLabel("<b>Radio Dial Freq (MHz):</b>")
widgets["dialFreqEntry"] = QtGui.QLineEdit("") widgets["dialFreqEntry"] = QtGui.QLineEdit("")
widgets["dialFreqEntry"].setToolTip( widgets["dialFreqEntry"].setToolTip(
"Optional entry of your radio's dial frequency in MHz.\n"\ "Optional entry of your radio's dial frequency in MHz (e.g. 437.600).\n"\
"Used to provide frequency information on SondeHub-Amateur."\ "Used to provide frequency information on SondeHub-Amateur."\
) )
@ -929,14 +929,19 @@ def handle_new_packet(frame):
# Grab other metadata out of the GUI # Grab other metadata out of the GUI
try: _radio_dial = None
_radio_dial = float(widgets["dialFreqEntry"].text())*1e6
if widgets["fest_float"]:
# Add on the centre frequency estimation onto the dial frequency.
_radio_dial += widgets["fest_float"]
except: if widgets["dialFreqEntry"].text() != "":
_radio_dial = None try:
_radio_dial = float(widgets["dialFreqEntry"].text())*1e6
if widgets["fest_float"]:
# Add on the centre frequency estimation onto the dial frequency.
_radio_dial += widgets["fest_float"]
except:
logging.warning("Could not parse radio dial frequency. This must be in MMM.KKK format e.g. 437.600")
_radio_dial = None
_baud_rate = int(widgets["horusModemRateSelector"].currentText()) _baud_rate = int(widgets["horusModemRateSelector"].currentText())
_modulation_detail = HORUS_MODEM_LIST[widgets["horusModemSelector"].currentText()]['modulation_detail'] _modulation_detail = HORUS_MODEM_LIST[widgets["horusModemSelector"].currentText()]['modulation_detail']