For Kenwood rigs read split status to see if split needs to be set

https://github.com/Hamlib/Hamlib/issues/863
pull/875/head
Mike Black W9MDB 2021-11-09 13:20:14 -06:00
rodzic 40546d9e5a
commit aa86f25321
1 zmienionych plików z 9 dodań i 1 usunięć

Wyświetl plik

@ -1239,7 +1239,7 @@ int kenwood_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo)
char cmdbuf[12];
int retval;
unsigned char vfo_function;
split_t tsplit;
split_t tsplit=0;
rig_debug(RIG_DEBUG_VERBOSE, "%s called %s,%d,%s\n", __func__, rig_strvfo(vfo), split, rig_strvfo(txvfo));
@ -1272,6 +1272,14 @@ int kenwood_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo)
RETURNFUNC(-RIG_EINVAL);
}
rig_get_split(rig, vfo, &tsplit);
if (tsplit == split)
{
rig_debug(RIG_DEBUG_TRACE, "%s: split already set\n", __func__);
RETURNFUNC(RIG_OK);
}
/* set RX VFO */
snprintf(cmdbuf, sizeof(cmdbuf), "FR%c", vfo_function);