diff --git a/doc/man1/rigctl.1 b/doc/man1/rigctl.1 index b80a640c3..29ad20905 100644 --- a/doc/man1/rigctl.1 +++ b/doc/man1/rigctl.1 @@ -1131,8 +1131,8 @@ option above, will terminate each command string sent to the radio. This character should not be a part of the input string. . .TP -.BR W ", " send_cmd_rx " \(aq" \fICmd\fP\(aq " " \fInbytes\FP -Send a raw command string to the radio and expect nbytes returned. +.BR W ", " send_cmd_rx " \(aq" \fICmd\fP\(aq " " \fI[nbytes or terminator char\FP +Send a raw command string to the radio and expect nbytes returned or the terminator char (e.g. ;). .IP This is useful for testing and troubleshooting radio commands and responses when developing a backend. If the # of bytes requested is <= the number actually returned no timeout will occur. diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 99fb07027..08db0201e 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -4891,6 +4891,7 @@ declare_proto_rig(send_cmd) ++rxbytes; // need length + 1 for end of string eom_buf[0] = 0; } + if (arg2[0] == ';') eom_buf[0] = ';'; /* Assumes CR or LF is end of line char for all ASCII protocols. */ retval = read_string(&rs->rigport, buf, rxbytes, eom_buf,