summaryrefslogtreecommitdiff
path: root/RigControl.c
diff options
context:
space:
mode:
authorJohn Wiseman <john.wiseman@cantab.net>2023-01-25 10:12:51 +0000
committerJohn Wiseman <john.wiseman@cantab.net>2023-01-25 10:12:51 +0000
commitc15de2c7f7e70c97a89b591b3ece72c5047ab4fa (patch)
tree576b57d456bea59c60d265149e7969769bb6b015 /RigControl.c
parent9a44d00480888cb11c614034489cc048d798f40f (diff)
6.0.23.4223.46
Diffstat (limited to 'RigControl.c')
-rw-r--r--RigControl.c62
1 files changed, 32 insertions, 30 deletions
diff --git a/RigControl.c b/RigControl.c
index aa38953..e0d38be 100644
--- a/RigControl.c
+++ b/RigControl.c
@@ -820,36 +820,6 @@ int Rig_CommandEx(struct RIGPORTINFO * PORT, struct RIGINFO * RIG, int Session,
return FALSE;
}
- if (RIG->RIGOK == 0)
- {
- if (Session != -1)
- {
- if (PORT->Closed)
- sprintf(Command, "Sorry - Radio port closed\r");
- else
- sprintf(Command, "Sorry - Radio not responding\r");
- }
- return FALSE;
- }
-
- if (n == 2 && _stricmp(FreqString, "FREQ") == 0)
- {
- if (RIG->Valchar[0])
- sprintf(Command, "Frequency is %s MHz\r", RIG->Valchar);
- else
- sprintf(Command, "Frequency not known\r");
-
- return FALSE;
- }
-
- if (n == 2 && _stricmp(FreqString, "PTT") == 0)
- {
- Rig_PTTEx(RIG, TRUE, NULL);
- RIG->PTTTimer = 10; // 1 sec
- sprintf(Command, "Ok\r");
- return FALSE;
- }
-
if (n > 1)
{
if (_stricmp(FreqString, "SCANSTART") == 0)
@@ -905,6 +875,38 @@ int Rig_CommandEx(struct RIGPORTINFO * PORT, struct RIGINFO * RIG, int Session,
}
}
+
+
+ if (RIG->RIGOK == 0)
+ {
+ if (Session != -1)
+ {
+ if (PORT->Closed)
+ sprintf(Command, "Sorry - Radio port closed\r");
+ else
+ sprintf(Command, "Sorry - Radio not responding\r");
+ }
+ return FALSE;
+ }
+
+ if (n == 2 && _stricmp(FreqString, "FREQ") == 0)
+ {
+ if (RIG->Valchar[0])
+ sprintf(Command, "Frequency is %s MHz\r", RIG->Valchar);
+ else
+ sprintf(Command, "Frequency not known\r");
+
+ return FALSE;
+ }
+
+ if (n == 2 && _stricmp(FreqString, "PTT") == 0)
+ {
+ Rig_PTTEx(RIG, TRUE, NULL);
+ RIG->PTTTimer = 10; // 1 sec
+ sprintf(Command, "Ok\r");
+ return FALSE;
+ }
+
RIG->Session = Session; // BPQ Stream
RIG->PollCounter = 50; // Dont read freq for 5 secs in case clash with Poll