kopia lustrzana https://github.com/Hamlib/Hamlib
Improve Kenwood send_morse speed
rodzic
3318766a7c
commit
d57e4ae185
|
@ -350,12 +350,15 @@ transaction_write:
|
||||||
skip |= strncmp(cmdstr, "RU", 2) == 0;
|
skip |= strncmp(cmdstr, "RU", 2) == 0;
|
||||||
skip |= strncmp(cmdstr, "RD", 2) == 0;
|
skip |= strncmp(cmdstr, "RD", 2) == 0;
|
||||||
skip |= strncmp(cmdstr, "KYW", 3) == 0;
|
skip |= strncmp(cmdstr, "KYW", 3) == 0;
|
||||||
|
skip |= strncmp(cmdstr, "KY ", 3) == 0;
|
||||||
skip |= strncmp(cmdstr, "PS1", 3) == 0;
|
skip |= strncmp(cmdstr, "PS1", 3) == 0;
|
||||||
skip |= strncmp(cmdstr, "PS0", 3) == 0;
|
skip |= strncmp(cmdstr, "PS0", 3) == 0;
|
||||||
skip |= strncmp(cmdstr, "K22", 3) == 0;
|
skip |= strncmp(cmdstr, "K22", 3) == 0;
|
||||||
|
|
||||||
if (skip)
|
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
|
hl_usleep(200 * 1000); // give little settle time for these commands
|
||||||
goto transaction_quit;
|
goto transaction_quit;
|
||||||
}
|
}
|
||||||
|
@ -364,7 +367,7 @@ transaction_write:
|
||||||
// Malachite SDR cannot send ID after FA
|
// Malachite SDR cannot send ID after FA
|
||||||
if (!datasize && priv->no_id) { RETURNFUNC2(RIG_OK); }
|
if (!datasize && priv->no_id) { RETURNFUNC2(RIG_OK); }
|
||||||
|
|
||||||
if (!datasize)
|
if (!datasize && strncmp(cmdstr, "KY",2)!=0)
|
||||||
{
|
{
|
||||||
rig->state.transaction_active = 0;
|
rig->state.transaction_active = 0;
|
||||||
|
|
||||||
|
|
|
@ -440,6 +440,17 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
sscanf(buf, "RA$%d;", &rxattenuatorB);
|
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)
|
else if (strlen(buf) > 0)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Unknown command: %s\n", buf);
|
fprintf(stderr, "Unknown command: %s\n", buf);
|
||||||
|
|
Ładowanie…
Reference in New Issue