From 9b732ea20802c4f93ac4ab65e4cbfecec5352521 Mon Sep 17 00:00:00 2001 From: Gaston Gonzalez Date: Sun, 3 Nov 2024 10:27:54 -0700 Subject: [PATCH] Dire Wolf - Fixed bug in et-direwolf. Added check to ensure that the systemd rigctld service is running before starting direwolf --- overlay/opt/emcomm-tools/bin/et-direwolf | 9 +++++++++ overlay/opt/emcomm-tools/bin/et-radio | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/overlay/opt/emcomm-tools/bin/et-direwolf b/overlay/opt/emcomm-tools/bin/et-direwolf index c9cfbd1..239e540 100755 --- a/overlay/opt/emcomm-tools/bin/et-direwolf +++ b/overlay/opt/emcomm-tools/bin/et-direwolf @@ -2,6 +2,7 @@ # # Author : Gaston Gonzalez # Date : 1 November 2024 +# Updated : 3 November 2024 # Purpose : Wrapper script for starting Dire Wolf with PnP support # # Preconditions: @@ -55,6 +56,14 @@ start() { update-config if [ $? -eq 0 ]; then + + RIGCTLD_OUT=$(systemctl status rigctld) + if [ $? -ne 0 ]; then + et-log "Can't start Dire Wolf. rigctld not running. Ensure radio is selected." + notify_user "Can't start Dire Wolf. rigctld not running." + exit 1 + fi + CMD="direwolf -c ${DIREWOLF_CONF_FILE} -t 0 -p" et-log "Starting Dire Wolf with: '${CMD}'" echo diff --git a/overlay/opt/emcomm-tools/bin/et-radio b/overlay/opt/emcomm-tools/bin/et-radio index d1ba6e2..1754a39 100755 --- a/overlay/opt/emcomm-tools/bin/et-radio +++ b/overlay/opt/emcomm-tools/bin/et-radio @@ -2,7 +2,7 @@ # # Author : Gaston Gonzalez # Date : 11 October 2024 -# Updated : 28 October 2024 +# Updated : 3 November 2024 # Purpose : A script for managaing plug-and-play radios set -e @@ -48,6 +48,9 @@ if [ $exit_status -eq 0 ]; then printf "\nConfiguration Notes\n" cat ${ACTIVE_RADIO} | jq -r '.notes[] | "* \(.)"' + + + printf "\n** Plug in radio. If already connected, reconnect it.\n" else echo "No radio selected." fi