Fix RIT for TS-480

pull/680/head
Mikael Nousiainen 2021-04-25 17:14:59 +03:00
rodzic 6fd5371b12
commit 95b08de780
1 zmienionych plików z 15 dodań i 1 usunięć

Wyświetl plik

@ -724,12 +724,18 @@ kenwood_ts480_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
static int ts480_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit)
{
char buf[20];
int retval;
int rit_enabled;
int xit_enabled;
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
if (rit < 9999 || rit > 9999)
{
RETURNFUNC(-RIG_EINVAL);
}
// RC clear command cannot be executed if RIT/XIT is not enabled
retval = kenwood_get_func(rig, vfo, RIG_FUNC_RIT, &rit_enabled);
@ -770,7 +776,15 @@ static int ts480_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit)
}
}
RETURNFUNC(kenwood_set_rit(rig, vfo, rit));
if (rit == 0)
{
RETURNFUNC(RIG_OK);
}
snprintf(buf, sizeof(buf), "R%c%05ld", (rit > 0) ? 'U' : 'D', rit);
retval = kenwood_transaction(rig, buf, NULL, 0);
RETURNFUNC(retval);
}
static int ts480_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit)