From 4256ca56acf5268427e5b1e7ef23478bf67705c5 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 23 Oct 2022 10:03:03 -0700 Subject: [PATCH 01/24] look for rig before write this line --- manage-menu-functions | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/manage-menu-functions b/manage-menu-functions index e783026..1f193f3 100644 --- a/manage-menu-functions +++ b/manage-menu-functions @@ -73,7 +73,10 @@ echo "#Config file for Pat Menu" > $CONFIGTMP echo "#20200429 KM4ACK" >> $CONFIGTMP echo "MYCALLSIGN=$MYCALLSIGN" >> $CONFIGTMP echo "MAP=$MAP" >> $CONFIGTMP -echo "RIGCONTROL=$RIGCONTROL" >> $CONFIGTMP +#patch for keeping config clean of looking for rig settings +if [ $RIGCONTROL == 'yes' ]; then + echo "RIGCONTROL=$RIGCONTROL" >> $CONFIGTMP +fi echo "ARDOP=\"$ARDOP\"" >> $CONFIGTMP echo "ARDOPGUI=\"$ARDOPGUI\"" >> $CONFIGTMP echo "DIREWOLF=\"$DIREWOLF\"" >> $CONFIGTMP From 1a2f4ef0a28786a75e5b22e6bfad9d1adf57823d Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 23 Oct 2022 10:08:50 -0700 Subject: [PATCH 02/24] correct the if loop --- autopat | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/autopat b/autopat index bf2390a..389a94a 100755 --- a/autopat +++ b/autopat @@ -10,15 +10,13 @@ MAIN=$MYPATH/patmenu source $MYPATH/config -if [ $RIGCONTROL == 'no' ] -then +if [ $RIGCONTROL == 'no' ];then + yad --title="NO RIG CONTROL" --width=400 --height=100 \ + --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center \ + --center --form --text="\r\r\r\rRig Control is needed for auto pat.\rPlease configure rig control and try again." \ + --button=gtk-ok -yad --title="NO RIG CONTROL" --width=400 --height=100 \ - --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center \ - --center --form --text="\r\r\r\rRig Control is needed for auto pat.\rPlease configure rig control and try again." \ - --button=gtk-ok - -exit + exit fi #Check if FLRIG is running if user has it set in config file From d02cd99952e5d1c42390d4269769445e0b545a96 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 23 Oct 2022 10:22:22 -0700 Subject: [PATCH 03/24] Revert "look for rig before write this line" This reverts commit 4256ca56acf5268427e5b1e7ef23478bf67705c5. --- manage-menu-functions | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/manage-menu-functions b/manage-menu-functions index 1f193f3..e783026 100644 --- a/manage-menu-functions +++ b/manage-menu-functions @@ -73,10 +73,7 @@ echo "#Config file for Pat Menu" > $CONFIGTMP echo "#20200429 KM4ACK" >> $CONFIGTMP echo "MYCALLSIGN=$MYCALLSIGN" >> $CONFIGTMP echo "MAP=$MAP" >> $CONFIGTMP -#patch for keeping config clean of looking for rig settings -if [ $RIGCONTROL == 'yes' ]; then - echo "RIGCONTROL=$RIGCONTROL" >> $CONFIGTMP -fi +echo "RIGCONTROL=$RIGCONTROL" >> $CONFIGTMP echo "ARDOP=\"$ARDOP\"" >> $CONFIGTMP echo "ARDOPGUI=\"$ARDOPGUI\"" >> $CONFIGTMP echo "DIREWOLF=\"$DIREWOLF\"" >> $CONFIGTMP From 7d81cb57b69db8a0c7511c79f01754c016f20db5 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 23 Oct 2022 10:29:33 -0700 Subject: [PATCH 04/24] further observed issues --- autopat | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/autopat b/autopat index 389a94a..6430d8e 100755 --- a/autopat +++ b/autopat @@ -10,7 +10,7 @@ MAIN=$MYPATH/patmenu source $MYPATH/config -if [ $RIGCONTROL == 'no' ];then +if [ $RIGCONTROL == 'no' ]; then yad --title="NO RIG CONTROL" --width=400 --height=100 \ --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center \ --center --form --text="\r\r\r\rRig Control is needed for auto pat.\rPlease configure rig control and try again." \ @@ -21,20 +21,19 @@ fi #Check if FLRIG is running if user has it set in config file if [ "$RIGCONTROL" = 'yes' ]; then -echo "rig control is on" -FLRIG=$(echo $RIG | grep "\-m 4") - if [ -z "$FLRIG" ]; then - echo - else - FLRIG=$(pidof flrig) + echo "rig control is on" + FLRIG=$(echo $RIG | grep "\-m 4") if [ -z "$FLRIG" ]; then - yad --title="FAILED" --width=400 --height=100 \ - --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center \ - --center --form --text="Please start FLRIG and try again" \ - --button=gtk-ok - exit + echo + else + FLRIG=$(pidof flrig) + if [ -z "$FLRIG" ]; then + yad --title="FAILED" --width=400 --height=100 \ + --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center + --center --form --text="Please start FLRIG and try again" --button=gtk-ok + exit + fi fi - fi fi From 469ee22839c0d0b64120c9c55d55e71db0eccd1d Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 23 Oct 2022 10:30:25 -0700 Subject: [PATCH 05/24] sending to dev null --- autopat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autopat b/autopat index 6430d8e..5021f7c 100755 --- a/autopat +++ b/autopat @@ -24,7 +24,7 @@ if [ "$RIGCONTROL" = 'yes' ]; then echo "rig control is on" FLRIG=$(echo $RIG | grep "\-m 4") if [ -z "$FLRIG" ]; then - echo + echo "" > /dev/null else FLRIG=$(pidof flrig) if [ -z "$FLRIG" ]; then From 0d847e214609e63e9e05b0803a9d1312d8172bbc Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 23 Oct 2022 10:35:11 -0700 Subject: [PATCH 06/24] correct flrig logic --- autopat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autopat b/autopat index 5021f7c..fcb5e17 100755 --- a/autopat +++ b/autopat @@ -23,7 +23,7 @@ fi if [ "$RIGCONTROL" = 'yes' ]; then echo "rig control is on" FLRIG=$(echo $RIG | grep "\-m 4") - if [ -z "$FLRIG" ]; then + if [ ! -z "$FLRIG" ]; then echo "" > /dev/null else FLRIG=$(pidof flrig) From 8521b2b9e7dd654c5e3b3442772f61084c66a4da Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 23 Oct 2022 10:35:54 -0700 Subject: [PATCH 07/24] Revert "correct flrig logic" This reverts commit 0d847e214609e63e9e05b0803a9d1312d8172bbc. --- autopat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autopat b/autopat index fcb5e17..5021f7c 100755 --- a/autopat +++ b/autopat @@ -23,7 +23,7 @@ fi if [ "$RIGCONTROL" = 'yes' ]; then echo "rig control is on" FLRIG=$(echo $RIG | grep "\-m 4") - if [ ! -z "$FLRIG" ]; then + if [ -z "$FLRIG" ]; then echo "" > /dev/null else FLRIG=$(pidof flrig) From 32ea75c7c345976067d3a36173b44828d089493a Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 23 Oct 2022 10:37:52 -0700 Subject: [PATCH 08/24] fix if loop tabs --- autopat | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/autopat b/autopat index 5021f7c..ace89c8 100755 --- a/autopat +++ b/autopat @@ -26,13 +26,13 @@ if [ "$RIGCONTROL" = 'yes' ]; then if [ -z "$FLRIG" ]; then echo "" > /dev/null else - FLRIG=$(pidof flrig) - if [ -z "$FLRIG" ]; then - yad --title="FAILED" --width=400 --height=100 \ - --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center - --center --form --text="Please start FLRIG and try again" --button=gtk-ok - exit - fi + FLRIG=$(pidof flrig) + if [ -z "$FLRIG" ]; then + yad --title="FAILED" --width=400 --height=100 \ + --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center + --center --form --text="Please start FLRIG and try again" --button=gtk-ok + exit + fi fi fi From cdc0472485bfab03aa065a2ecfd4c90c70322c4e Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 23 Oct 2022 10:38:54 -0700 Subject: [PATCH 09/24] fix more tabs I should have waited --- autopat | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/autopat b/autopat index ace89c8..c1d4492 100755 --- a/autopat +++ b/autopat @@ -28,10 +28,10 @@ if [ "$RIGCONTROL" = 'yes' ]; then else FLRIG=$(pidof flrig) if [ -z "$FLRIG" ]; then - yad --title="FAILED" --width=400 --height=100 \ - --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center - --center --form --text="Please start FLRIG and try again" --button=gtk-ok - exit + yad --title="FAILED" --width=400 --height=100 \ + --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center + --center --form --text="Please start FLRIG and try again" --button=gtk-ok + exit fi fi fi From 862c69ded63e79eb30c05efb1758359fcdc3726c Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 23 Oct 2022 10:39:55 -0700 Subject: [PATCH 10/24] new tab fix I keep sending to the pi --- autopat | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/autopat b/autopat index c1d4492..c4c7c6d 100755 --- a/autopat +++ b/autopat @@ -27,12 +27,12 @@ if [ "$RIGCONTROL" = 'yes' ]; then echo "" > /dev/null else FLRIG=$(pidof flrig) - if [ -z "$FLRIG" ]; then - yad --title="FAILED" --width=400 --height=100 \ - --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center - --center --form --text="Please start FLRIG and try again" --button=gtk-ok - exit - fi + if [ -z "$FLRIG" ]; then + yad --title="FAILED" --width=400 --height=100 \ + --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center + --center --form --text="Please start FLRIG and try again" --button=gtk-ok + exit + fi fi fi From 86e20c308dfcc0f45d1a68d8611ec6e4a68e4b52 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 23 Oct 2022 10:41:05 -0700 Subject: [PATCH 11/24] sorry this is messy --- autopat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autopat b/autopat index c4c7c6d..a819934 100755 --- a/autopat +++ b/autopat @@ -28,10 +28,10 @@ if [ "$RIGCONTROL" = 'yes' ]; then else FLRIG=$(pidof flrig) if [ -z "$FLRIG" ]; then - yad --title="FAILED" --width=400 --height=100 \ - --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center + yad --title="FAILED" --width=400 --height=100 --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center \ --center --form --text="Please start FLRIG and try again" --button=gtk-ok - exit + + exit fi fi fi From 574a51dd9e3bd867dce2f878f23d871d3730b1c1 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 23 Oct 2022 10:47:19 -0700 Subject: [PATCH 12/24] fix another if --- autopat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autopat b/autopat index a819934..5b50d50 100755 --- a/autopat +++ b/autopat @@ -33,7 +33,7 @@ if [ "$RIGCONTROL" = 'yes' ]; then exit fi - fi + fi fi From ebae2667d9f50f785723a62e3d9f21b1bcbcaa84 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 23 Oct 2022 10:55:44 -0700 Subject: [PATCH 13/24] Revert "fix another if" This reverts commit 574a51dd9e3bd867dce2f878f23d871d3730b1c1. --- autopat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autopat b/autopat index 5b50d50..a819934 100755 --- a/autopat +++ b/autopat @@ -33,7 +33,7 @@ if [ "$RIGCONTROL" = 'yes' ]; then exit fi - fi + fi fi From a38d101bce51329a191a457f204341a3c9d9ace7 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 23 Oct 2022 10:55:49 -0700 Subject: [PATCH 14/24] Revert "sorry this is messy" This reverts commit 86e20c308dfcc0f45d1a68d8611ec6e4a68e4b52. --- autopat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autopat b/autopat index a819934..c4c7c6d 100755 --- a/autopat +++ b/autopat @@ -28,10 +28,10 @@ if [ "$RIGCONTROL" = 'yes' ]; then else FLRIG=$(pidof flrig) if [ -z "$FLRIG" ]; then - yad --title="FAILED" --width=400 --height=100 --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center \ + yad --title="FAILED" --width=400 --height=100 \ + --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center --center --form --text="Please start FLRIG and try again" --button=gtk-ok - - exit + exit fi fi fi From 99d5ae618eeed0628d4bbf218117cf6abd8bcb87 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 23 Oct 2022 10:55:56 -0700 Subject: [PATCH 15/24] Revert "new tab fix I keep sending to the pi" This reverts commit 862c69ded63e79eb30c05efb1758359fcdc3726c. --- autopat | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/autopat b/autopat index c4c7c6d..c1d4492 100755 --- a/autopat +++ b/autopat @@ -27,12 +27,12 @@ if [ "$RIGCONTROL" = 'yes' ]; then echo "" > /dev/null else FLRIG=$(pidof flrig) - if [ -z "$FLRIG" ]; then - yad --title="FAILED" --width=400 --height=100 \ - --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center - --center --form --text="Please start FLRIG and try again" --button=gtk-ok - exit - fi + if [ -z "$FLRIG" ]; then + yad --title="FAILED" --width=400 --height=100 \ + --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center + --center --form --text="Please start FLRIG and try again" --button=gtk-ok + exit + fi fi fi From 441d8c3c1daed94020e3ddec3e3b0196a6df5272 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 23 Oct 2022 10:56:01 -0700 Subject: [PATCH 16/24] Revert "fix more tabs I should have waited" This reverts commit cdc0472485bfab03aa065a2ecfd4c90c70322c4e. --- autopat | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/autopat b/autopat index c1d4492..ace89c8 100755 --- a/autopat +++ b/autopat @@ -28,10 +28,10 @@ if [ "$RIGCONTROL" = 'yes' ]; then else FLRIG=$(pidof flrig) if [ -z "$FLRIG" ]; then - yad --title="FAILED" --width=400 --height=100 \ - --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center - --center --form --text="Please start FLRIG and try again" --button=gtk-ok - exit + yad --title="FAILED" --width=400 --height=100 \ + --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center + --center --form --text="Please start FLRIG and try again" --button=gtk-ok + exit fi fi fi From be1c97ba02aa2c42e2cf6ea68666dd07da8b2213 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 23 Oct 2022 10:56:06 -0700 Subject: [PATCH 17/24] Revert "fix if loop tabs" This reverts commit 32ea75c7c345976067d3a36173b44828d089493a. --- autopat | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/autopat b/autopat index ace89c8..5021f7c 100755 --- a/autopat +++ b/autopat @@ -26,13 +26,13 @@ if [ "$RIGCONTROL" = 'yes' ]; then if [ -z "$FLRIG" ]; then echo "" > /dev/null else - FLRIG=$(pidof flrig) - if [ -z "$FLRIG" ]; then - yad --title="FAILED" --width=400 --height=100 \ - --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center - --center --form --text="Please start FLRIG and try again" --button=gtk-ok - exit - fi + FLRIG=$(pidof flrig) + if [ -z "$FLRIG" ]; then + yad --title="FAILED" --width=400 --height=100 \ + --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center + --center --form --text="Please start FLRIG and try again" --button=gtk-ok + exit + fi fi fi From 6fbe9036532628e21b3a155e9ff5a86b39cf16f3 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 23 Oct 2022 10:56:16 -0700 Subject: [PATCH 18/24] Revert "sending to dev null" This reverts commit 469ee22839c0d0b64120c9c55d55e71db0eccd1d. --- autopat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autopat b/autopat index 5021f7c..6430d8e 100755 --- a/autopat +++ b/autopat @@ -24,7 +24,7 @@ if [ "$RIGCONTROL" = 'yes' ]; then echo "rig control is on" FLRIG=$(echo $RIG | grep "\-m 4") if [ -z "$FLRIG" ]; then - echo "" > /dev/null + echo else FLRIG=$(pidof flrig) if [ -z "$FLRIG" ]; then From 92fad4d938ae38c38c41539121ae63da38dc6904 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 23 Oct 2022 10:56:25 -0700 Subject: [PATCH 19/24] Revert "further observed issues" This reverts commit 7d81cb57b69db8a0c7511c79f01754c016f20db5. --- autopat | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/autopat b/autopat index 6430d8e..389a94a 100755 --- a/autopat +++ b/autopat @@ -10,7 +10,7 @@ MAIN=$MYPATH/patmenu source $MYPATH/config -if [ $RIGCONTROL == 'no' ]; then +if [ $RIGCONTROL == 'no' ];then yad --title="NO RIG CONTROL" --width=400 --height=100 \ --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center \ --center --form --text="\r\r\r\rRig Control is needed for auto pat.\rPlease configure rig control and try again." \ @@ -21,19 +21,20 @@ fi #Check if FLRIG is running if user has it set in config file if [ "$RIGCONTROL" = 'yes' ]; then - echo "rig control is on" - FLRIG=$(echo $RIG | grep "\-m 4") +echo "rig control is on" +FLRIG=$(echo $RIG | grep "\-m 4") + if [ -z "$FLRIG" ]; then + echo + else + FLRIG=$(pidof flrig) if [ -z "$FLRIG" ]; then - echo - else - FLRIG=$(pidof flrig) - if [ -z "$FLRIG" ]; then - yad --title="FAILED" --width=400 --height=100 \ - --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center - --center --form --text="Please start FLRIG and try again" --button=gtk-ok - exit - fi + yad --title="FAILED" --width=400 --height=100 \ + --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center \ + --center --form --text="Please start FLRIG and try again" \ + --button=gtk-ok + exit fi + fi fi From e41dc76b458788b86a5a6057071ae59ecd36b42c Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 23 Oct 2022 11:00:35 -0700 Subject: [PATCH 20/24] side bug /home/pi/patmenu2/pat-functions: line 17: --button=gtk-ok: command not found --- pat-functions | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pat-functions b/pat-functions index 5f30558..8f22062 100644 --- a/pat-functions +++ b/pat-functions @@ -12,9 +12,8 @@ then yad --title="NO RIG CONTROL" --width=400 --height=100 \ --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center \ - --center --form --text="\r\r\r\rRig Control is needed for auto pat.\rPlease configure rig control and try again. \ - \rRig control can be configured using\rManage Pat Menu" - --button=gtk-ok + --center --form --text="\r\r\r\rRig Control is needed for auto pat.\rPlease configure rig control and try again.\ + \rRig control can be configured using\rManage Pat Menu" --button=gtk-ok $MAIN & exit fi From c390ee55eb162aac919575e179560ba75860bee9 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 23 Oct 2022 11:13:57 -0700 Subject: [PATCH 21/24] add over here --- pat-functions | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/pat-functions b/pat-functions index 8f22062..4b80b3c 100644 --- a/pat-functions +++ b/pat-functions @@ -10,12 +10,20 @@ source $MYPATH/config if [ $RIGCONTROL == 'no' ] then -yad --title="NO RIG CONTROL" --width=400 --height=100 \ - --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center \ - --center --form --text="\r\r\r\rRig Control is needed for auto pat.\rPlease configure rig control and try again.\ - \rRig control can be configured using\rManage Pat Menu" --button=gtk-ok -$MAIN & -exit +if [ $RIGCONTROL == 'no' ]; then + yad --title="NO RIG CONTROL" --width=400 --height=100 \ + --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center\ + --center --form --text="\rRig Control is needed for auto pat.\rPlease configure rig control and try again." \ + --button=gtk-ok + exit +else + #Check if FLRIG is running if user has it set in config file + echo "rig control is on" + FLRIG=$(pidof flrig) + if $(pidof flrig); then + ./flrig + exit + fi fi From b67d4415e323f978e389b91d6c3825398fe76e17 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 23 Oct 2022 11:15:12 -0700 Subject: [PATCH 22/24] Revert "add over here" This reverts commit c390ee55eb162aac919575e179560ba75860bee9. --- pat-functions | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/pat-functions b/pat-functions index 4b80b3c..8f22062 100644 --- a/pat-functions +++ b/pat-functions @@ -10,20 +10,12 @@ source $MYPATH/config if [ $RIGCONTROL == 'no' ] then -if [ $RIGCONTROL == 'no' ]; then - yad --title="NO RIG CONTROL" --width=400 --height=100 \ - --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center\ - --center --form --text="\rRig Control is needed for auto pat.\rPlease configure rig control and try again." \ - --button=gtk-ok - exit -else - #Check if FLRIG is running if user has it set in config file - echo "rig control is on" - FLRIG=$(pidof flrig) - if $(pidof flrig); then - ./flrig - exit - fi +yad --title="NO RIG CONTROL" --width=400 --height=100 \ + --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center \ + --center --form --text="\r\r\r\rRig Control is needed for auto pat.\rPlease configure rig control and try again.\ + \rRig control can be configured using\rManage Pat Menu" --button=gtk-ok +$MAIN & +exit fi From 0aec41d9e9fd744137dd375c6d7ccb3b29b8c6f1 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 23 Oct 2022 11:16:20 -0700 Subject: [PATCH 23/24] fix this function --- pat-functions | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/pat-functions b/pat-functions index 8f22062..cbb6a1d 100644 --- a/pat-functions +++ b/pat-functions @@ -7,15 +7,21 @@ PATCONFIG=$XDG_CONFIG_HOME/pat/config.json AUTOPAT(){ source $MYPATH/config -if [ $RIGCONTROL == 'no' ] -then -yad --title="NO RIG CONTROL" --width=400 --height=100 \ - --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center \ - --center --form --text="\r\r\r\rRig Control is needed for auto pat.\rPlease configure rig control and try again.\ - \rRig control can be configured using\rManage Pat Menu" --button=gtk-ok -$MAIN & -exit +if [ $RIGCONTROL == 'no' ]; then + yad --title="NO RIG CONTROL" --width=400 --height=100 \ + --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center\ + --center --form --text="\rRig Control is needed for auto pat.\rPlease configure rig control and try again." \ + --button=gtk-ok + exit +else + #Check if FLRIG is running if user has it set in config file + echo "rig control is on" + FLRIG=$(pidof flrig) + if $(pidof flrig); then + ./flrig + exit + fi fi From fdadb50ddb3a39b3b5a9edc2cae9810c889955b6 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 23 Oct 2022 11:20:59 -0700 Subject: [PATCH 24/24] fixed them --- autopat | 30 ++++++++++-------------------- pat-functions | 7 ++++--- 2 files changed, 14 insertions(+), 23 deletions(-) diff --git a/autopat b/autopat index 389a94a..2082315 100755 --- a/autopat +++ b/autopat @@ -10,30 +10,20 @@ MAIN=$MYPATH/patmenu source $MYPATH/config -if [ $RIGCONTROL == 'no' ];then +if [ $RIGCONTROL == 'no' ]; then yad --title="NO RIG CONTROL" --width=400 --height=100 \ - --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center \ - --center --form --text="\r\r\r\rRig Control is needed for auto pat.\rPlease configure rig control and try again." \ + --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center\ + --center --form --text="\rRig Control is needed for auto pat.\rPlease configure rig control and try again." \ --button=gtk-ok - exit -fi - -#Check if FLRIG is running if user has it set in config file -if [ "$RIGCONTROL" = 'yes' ]; then -echo "rig control is on" -FLRIG=$(echo $RIG | grep "\-m 4") - if [ -z "$FLRIG" ]; then - echo - else +else + #Check if FLRIG is running if user has it set in config file + echo "rig control is on" FLRIG=$(pidof flrig) - if [ -z "$FLRIG" ]; then - yad --title="FAILED" --width=400 --height=100 \ - --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center \ - --center --form --text="Please start FLRIG and try again" \ - --button=gtk-ok - exit - fi + if [ -z $FLRIG ]; then + #needs to be open + echo launching flrig for you + flrig fi fi diff --git a/pat-functions b/pat-functions index cbb6a1d..68a6a94 100644 --- a/pat-functions +++ b/pat-functions @@ -18,9 +18,10 @@ else #Check if FLRIG is running if user has it set in config file echo "rig control is on" FLRIG=$(pidof flrig) - if $(pidof flrig); then - ./flrig - exit + if [ -z $FLRIG ]; then + #needs to be open + echo launching flrig for you + flrig fi fi