|
|
|
@ -85,6 +85,7 @@ running = False
|
|
|
|
|
parser = argparse.ArgumentParser(description="Project Horus GUI", formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
|
|
|
|
parser.add_argument("--payload-id-list", type=str, default=None, help="Use supplied Payload ID List instead of downloading a new one.")
|
|
|
|
|
parser.add_argument("--custom-field-list", type=str, default=None, help="Use supplied Custom Field List instead of downloading a new one.")
|
|
|
|
|
parser.add_argument("--libfix", action="store_true", default=False, help="Search for libhorus.dll/so in ./ instead of on the path.")
|
|
|
|
|
parser.add_argument("-v", "--verbose", action="store_true", default=False, help="Verbose output (set logging level to DEBUG)")
|
|
|
|
|
args = parser.parse_args()
|
|
|
|
|
|
|
|
|
@ -707,12 +708,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 +723,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
|
|
|
|
@ -1053,7 +1060,7 @@ def start_decoding():
|
|
|
|
|
Start decoding!
|
|
|
|
|
(Or, stop decoding)
|
|
|
|
|
"""
|
|
|
|
|
global widgets, audio_stream, fft_process, horus_modem, audio_devices, running, fft_update_queue, status_update_queue, last_packet_time
|
|
|
|
|
global widgets, audio_stream, fft_process, horus_modem, audio_devices, running, fft_update_queue, status_update_queue, last_packet_time, args
|
|
|
|
|
|
|
|
|
|
if not running:
|
|
|
|
|
# Reset last packet time
|
|
|
|
@ -1110,7 +1117,12 @@ def start_decoding():
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Setup Modem
|
|
|
|
|
_libpath = ""
|
|
|
|
|
if args.libfix:
|
|
|
|
|
_libpath = "./"
|
|
|
|
|
|
|
|
|
|
horus_modem = HorusLib(
|
|
|
|
|
libpath=_libpath,
|
|
|
|
|
mode=_modem_id,
|
|
|
|
|
rate=_modem_rate,
|
|
|
|
|
tone_spacing=_modem_tone_spacing,
|
|
|
|
|