From b8e40a44c95ea6e9933a130e9465eb98fa650aed Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Mon, 12 Feb 2024 23:26:44 +0000 Subject: New upstream version 6.0.24.29 --- RigControl.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'RigControl.c') diff --git a/RigControl.c b/RigControl.c index b7e22d1..ea7b5c2 100644 --- a/RigControl.c +++ b/RigControl.c @@ -1222,11 +1222,12 @@ int Rig_CommandEx(struct RIGPORTINFO * PORT, struct RIGINFO * RIG, TRANSPORTENTR char c; int val; char * ptr1; + char * ptr2; int Len; if (n < 3) { - strcpy(Command, "Sorry - Invalid Format - should be HEX Hexstring\r"); + strcpy(Command, "Sorry - Invalid Format - should be CMD Params\r"); return FALSE; } @@ -1315,6 +1316,31 @@ int Rig_CommandEx(struct RIGPORTINFO * PORT, struct RIGINFO * RIG, TRANSPORTENTR Len = 5; break; + case FLRIG: + + // Two string params - command and params eg rig.set_ptt 1" + // or maybe param could be format data - eg i 1 + + _strlwr(ptr1); + + ptr2 = strlop(ptr1, ' '); + + if (ptr2 == 0) + { + strcpy(Command, "Sorry - Invalid Format - should be CMD cmd params\r"); + return FALSE; + } + + strlop(ptr2, ' '); + + FLRIGSendCommand(PORT, ptr1, ptr2); + + return FALSE; + + + + + default: sprintf(Command, "Sorry - CMD not supported on your Radio\r"); return FALSE; -- cgit v1.2.3