From bfa75996874d7d34b3921cdc76cc6a3c4e9af8fd Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Tue, 27 Apr 2021 17:18:51 -0500 Subject: [PATCH] In kenwood.c skip verification for RU/RD commands. On the TS-2000 at least it caused Resource temporarily unavailable when sending ID right after RU/RD https://github.com/Hamlib/Hamlib/issues/677 --- rigs/kenwood/kenwood.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 1feabae5e..c39cbf5ca 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -331,7 +331,16 @@ transaction_write: // So we'll skip the checks just on this one command for now // The TS-480 PC Control says RX; should return RX0; but it doesn't // We may eventually want to verify PTT with rig_get_ptt instead - if (retval == RIG_OK && strncmp(cmdstr, "RX", 2) == 0) { goto transaction_quit; } + // The TS-2000 doesn't like doing and ID right after RU or RD + if (retval == RIG_OK) + { + int skip = strncmp(cmdstr, "RX", 2) == 0; + skip |= strncmp(cmdstr, "RU", 2) == 0; + skip |= strncmp(cmdstr, "RD", 2) == 0; + if (skip) { + goto transaction_quit; + } + } // Malachite SDR cannot send ID after FA if (!datasize && priv->no_id) { RETURNFUNC(RIG_OK); } @@ -340,6 +349,9 @@ transaction_write: { rig->state.hold_decode = 0; + // there are some commands that have problems with immediate follow-up + // so we'll just ignore them + /* no reply expected so we need to write a command that always gives a reply so we can read any error replies from the actual command being sent without blocking */