Improve Kenwood send_morse speed

This commit is contained in:
Mike Black W9MDB 2023-08-18 17:36:19 -05:00
parent 3318766a7c
commit d57e4ae185
2 changed files with 15 additions and 1 deletions

View File

@ -350,12 +350,15 @@ transaction_write:
skip |= strncmp(cmdstr, "RU", 2) == 0;
skip |= strncmp(cmdstr, "RD", 2) == 0;
skip |= strncmp(cmdstr, "KYW", 3) == 0;
skip |= strncmp(cmdstr, "KY ", 3) == 0;
skip |= strncmp(cmdstr, "PS1", 3) == 0;
skip |= strncmp(cmdstr, "PS0", 3) == 0;
skip |= strncmp(cmdstr, "K22", 3) == 0;
if (skip)
{
// most command we give them a little time -- but not KY
if (strncmp(cmdstr, "KY ", 3)!= 0)
hl_usleep(200 * 1000); // give little settle time for these commands
goto transaction_quit;
}
@ -364,7 +367,7 @@ transaction_write:
// Malachite SDR cannot send ID after FA
if (!datasize && priv->no_id) { RETURNFUNC2(RIG_OK); }
if (!datasize)
if (!datasize && strncmp(cmdstr, "KY",2)!=0)
{
rig->state.transaction_active = 0;

View File

@ -440,6 +440,17 @@ int main(int argc, char *argv[])
{
sscanf(buf, "RA$%d;", &rxattenuatorB);
}
else if (strncmp(buf, "KY;", 3)==0)
{
int status = 0;
printf("KY query\n");
SNPRINTF(buf, sizeof(buf), "KY%d;", status);
n = write(fd, buf, strlen(buf));
}
else if (strncmp(buf, "KY",2)==0)
{
printf("Morse: %s\n", buf);
}
else if (strlen(buf) > 0)
{
fprintf(stderr, "Unknown command: %s\n", buf);