Readd cmdtrm setting in kenwood.c -- it's not fixed in all backends

pull/224/head
Michael Black 2020-04-02 11:44:52 -05:00
rodzic 45914f70f9
commit d936f14415
1 zmienionych plików z 17 dodań i 7 usunięć

Wyświetl plik

@ -271,6 +271,13 @@ transaction_write:
memcpy(cmd, cmdstr, len);
/* XXX the if is temporary, until all invocations are fixed */
if (cmdstr[len - 1] != ';' && cmdstr[len - 1] != '\r')
{
cmd[len] = caps->cmdtrm;
len++;
}
/* flush anything in the read buffer before command is sent */
if (rs->rigport.type.rig == RIG_PORT_NETWORK
|| rs->rigport.type.rig == RIG_PORT_UDP_NETWORK)
@ -1542,15 +1549,18 @@ int kenwood_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit)
shortfreq_t curr_rit;
int diff;
rig_debug(RIG_DEBUG_VERBOSE, "%s called: vfo=%s, rit=%ld\n", __func__, rig_strvfo(vfo), rit);
rig_debug(RIG_DEBUG_VERBOSE, "%s called: vfo=%s, rit=%ld\n", __func__,
rig_strvfo(vfo), rit);
retval = kenwood_get_rit(rig, vfo, &curr_rit);
if (retval != RIG_OK)
{
return retval;
return retval;
}
rig_debug(RIG_DEBUG_VERBOSE, "%s get_rit=%ld\n", __func__, curr_rit);
if (rit == 0)
{
return kenwood_transaction(rig, "RC", NULL, 0);
@ -1560,12 +1570,12 @@ int kenwood_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit)
if (retval != RIG_OK)
{
return retval;
return retval;
}
snprintf(buf, sizeof(buf), "R%c", (rit > 0) ? 'U' : 'D');
diff = abs((rit+5)/10); // round to nearest
diff = abs((rit + 5) / 10); // round to nearest
rig_debug(RIG_DEBUG_TRACE, "%s: rit change loop=%d\n", __func__, diff);
for (i = 0; i < diff; i++)