From c15de2c7f7e70c97a89b591b3ece72c5047ab4fa Mon Sep 17 00:00:00 2001 From: John Wiseman Date: Wed, 25 Jan 2023 10:12:51 +0000 Subject: 6.0.23.42 --- RigControl.c | 62 +++++++++++++++++++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 30 deletions(-) (limited to 'RigControl.c') 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 -- cgit v1.2.3