Skip to content

Commit e9a7b31

Browse files
Mark JessopMark Jessop
authored andcommitted
Add warning on starting with a uploader callsign of N0CALL
1 parent ab470cb commit e9a7b31

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

horusgui/gui.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226
widgets["userCallEntry"].setMaxLength(20)
227227
widgets["userCallEntry"].setToolTip(
228228
"Your station callsign, which doesn't necessarily need to be an\n"\
229-
"amateur radio callsign."
229+
"amateur radio callsign, just something unique!"
230230
)
231231
widgets["userLocationLabel"] = QtGui.QLabel("<b>Lat/Lon:</b>")
232232
widgets["userLatEntry"] = QtGui.QLineEdit("0.0")
@@ -963,6 +963,9 @@ def handle_new_packet(frame):
963963
last_packet_time = time.time()
964964

965965
# Upload the string to Sondehub Amateur
966+
if widgets["userCallEntry"].text() == "N0CALL":
967+
logging.warning("Uploader callsign is set as N0CALL. Please change this, otherwise telemetry data may be discarded!")
968+
966969
sondehub_uploader.add(_decoded)
967970

968971
except Exception as e:
@@ -988,6 +991,9 @@ def handle_new_packet(frame):
988991
widgets["latestDecodedSentenceData"].setText(_decoded['ukhas_str'])
989992
last_packet_time = time.time()
990993
# Upload the string to Sondehub Amateur
994+
if widgets["userCallEntry"].text() == "N0CALL":
995+
logging.warning("Uploader callsign is set as N0CALL. Please change this, otherwise telemetry data may be discarded!")
996+
991997
sondehub_uploader.add(_decoded)
992998
except Exception as e:
993999
if "CRC Failure" in str(e) and widgets["inhibitCRCSelector"].isChecked():
@@ -1070,6 +1076,15 @@ def start_decoding():
10701076
if not running:
10711077
# Reset last packet time
10721078

1079+
if widgets["userCallEntry"].text() == "N0CALL":
1080+
# We don't allow the decoder to start if the callsign is still at the default.
1081+
_error_msgbox = QtWidgets.QMessageBox()
1082+
_error_msgbox.setWindowTitle("Uploader Callsign Invalid")
1083+
_error_msgbox.setText("Please change your SondeHub uploader callsign before starting!")
1084+
_error_msgbox.exec_()
1085+
1086+
return
1087+
10731088
last_packet_time = None
10741089
widgets['latestDecodedAgeData'].setText("No packet yet!")
10751090
# Grab settings off widgets
@@ -1353,6 +1368,7 @@ def emit(self, record):
13531368
logging.info("Started GUI.")
13541369

13551370

1371+
13561372
# Main
13571373
def main():
13581374
# Start the Qt Loop

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "horusgui"
3-
version = "0.3.13"
3+
version = "0.3.15"
44
description = ""
55
authors = ["Mark Jessop <[email protected]>"]
66

@@ -12,7 +12,7 @@ PyQt5 = "^5.13.0"
1212
pyqtgraph = "^0.11.0"
1313
pyaudio = "^0.2.11"
1414
"ruamel.yaml" = "^0.16.10"
15-
horusdemodlib = "^0.3.12"
15+
horusdemodlib = "^0.3.13"
1616

1717
[tool.poetry.dev-dependencies]
1818

0 commit comments

Comments
 (0)