From 5e60ae88f7d59a85e49207e68863bcc41eb0e1f0 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Sun, 24 Nov 2013 21:57:45 +0000 Subject: [PATCH] Fix Kenwood get split VFO function. kenwood_get_split_vfo was not returning its txvfo parameter. I have added code to calculate the TX VFO. --- kenwood/kenwood.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/kenwood/kenwood.c b/kenwood/kenwood.c index ef0eda572..805be317b 100644 --- a/kenwood/kenwood.c +++ b/kenwood/kenwood.c @@ -732,7 +732,26 @@ int kenwood_get_split_vfo_if(RIG *rig, vfo_t rxvfo, split_t *split, vfo_t *txvfo /* Remember whether split is on, for kenwood_set_vfo */ priv->split = *split; - /* TODO: find where is the txvfo.. */ + /* find where is the txvfo.. */ + switch (priv->info[30]) + { + case '0': + *txvfo = (*split) ? RIG_VFO_B : RIG_VFO_A; + break; + + case '1': + *txvfo = (*split) ? RIG_VFO_A : RIG_VFO_B; + break; + + case '2': + *txvfo = RIG_VFO_MEM; /* SPLIT MEM operation doesn't involve VFO A or VFO B */ + break; + + default: + rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %c\n", + __func__, priv->info[30]); + return -RIG_EPROTO; + } return RIG_OK; }