diff --git a/horusgui/__init__.py b/horusgui/__init__.py index 91c67cc..df0ed33 100755 --- a/horusgui/__init__.py +++ b/horusgui/__init__.py @@ -1 +1 @@ -__version__ = "0.3.11" +__version__ = "0.3.12" diff --git a/horusgui/gui.py b/horusgui/gui.py index 1b9518f..0226c0d 100644 --- a/horusgui/gui.py +++ b/horusgui/gui.py @@ -707,12 +707,10 @@ telemetry_logger = TelemetryLogger( # Handlers for various checkboxes and push-buttons -def habitat_position_reupload(): +def habitat_position_reupload(upload=True): """ Trigger a re-upload of user position information """ global widgets, sondehub_uploader - - # Do the same for Sondehub. sondehub_uploader.user_callsign = widgets["userCallEntry"].text() sondehub_uploader.user_radio = "Horus-GUI v" + __version__ + " " + widgets["userRadioEntry"].text() sondehub_uploader.user_antenna = widgets["userAntennaEntry"].text() @@ -724,11 +722,19 @@ def habitat_position_reupload(): except: sondehub_uploader.user_position = None - sondehub_uploader.last_user_position_upload = 0 + if upload: + sondehub_uploader.last_user_position_upload = 0 widgets["habitatUploadPosition"].clicked.connect(habitat_position_reupload) +# Update uploader info as soon as it's edited, to ensure we upload with the latest user callsign +def update_uploader_details(): + habitat_position_reupload(False) + +widgets["userCallEntry"].textEdited.connect(update_uploader_details) + + def habitat_inhibit(): """ Update the Habitat inhibit flag """ global widgets, sondehub_uploader diff --git a/pyproject.toml b/pyproject.toml index 1326163..03d5934 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "horusgui" -version = "0.3.11" +version = "0.3.12" description = "" authors = ["Mark Jessop "] @@ -12,7 +12,7 @@ PyQt5 = "^5.13.0" pyqtgraph = "^0.11.0" pyaudio = "^0.2.11" "ruamel.yaml" = "^0.16.10" -horusdemodlib = "^0.3.6" +horusdemodlib = "^0.3.10" [tool.poetry.dev-dependencies]