Add ability to enter terminator char for W send_cmd_rx so one can do 'W FA; ;' without a timeout needed

pull/1137/head
Mike Black W9MDB 2022-10-29 23:09:53 -05:00
rodzic 5a6b0b4719
commit cd1dc4c05d
2 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -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.

Wyświetl plik

@ -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,