From 7ff8b8329dd76f9cc199648e89519f6850fb80d9 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Thu, 2 Oct 2014 01:21:56 +0000 Subject: [PATCH] Only poll split frequency if in split mode Because PowerSDR for the FlexRadio rigs doesn't implement split or VFO B, querying the TX VFO in transceiver polls causes an error with them. This query is unecessary. Removing it will cause a delay of one poll period after split is set for the Tx frequency to appear. This should be harmless, if not then there is a possibility of querying split before the Tx frequency. This seems obvious but I believe the order matters with some rigs so it needs more investigation. Merged from wsjtx-1.4 branch. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4435 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- DXLabSuiteCommanderTransceiver.cpp | 25 ++++++++++++++----------- HamlibTransceiver.cpp | 9 +++++++-- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/DXLabSuiteCommanderTransceiver.cpp b/DXLabSuiteCommanderTransceiver.cpp index 85736eae2..2754bd55a 100644 --- a/DXLabSuiteCommanderTransceiver.cpp +++ b/DXLabSuiteCommanderTransceiver.cpp @@ -206,23 +206,26 @@ void DXLabSuiteCommanderTransceiver::poll () throw error {tr ("DX Lab Suite Commander didn't respond correctly polling frequency")}; } - reply = command_with_reply ("CmdSendTXFreq", quiet); - if (0 == reply.indexOf ("') + 1).replace (",", "").replace (".", ""); - if ("000" != text) + reply = command_with_reply ("CmdSendTXFreq", quiet); + if (0 == reply.indexOf ("') + 1).replace (",", "").replace (".", ""); + if ("000" != text) + { + update_other_frequency (text.toUInt ()); + } } - } - else - { + else + { #if WSJT_TRACE_CAT - qDebug () << "DXLabSuiteCommanderTransceiver::poll: get tx frequency unexpected response"; + qDebug () << "DXLabSuiteCommanderTransceiver::poll: get tx frequency unexpected response"; #endif - throw error {tr ("DX Lab Suite Commander didn't respond correctly polling TX frequency")}; + throw error {tr ("DX Lab Suite Commander didn't respond correctly polling TX frequency")}; + } } reply = command_with_reply ("CmdSendSplit", quiet); diff --git a/HamlibTransceiver.cpp b/HamlibTransceiver.cpp index 08fc0d9bf..778107bfc 100644 --- a/HamlibTransceiver.cpp +++ b/HamlibTransceiver.cpp @@ -667,9 +667,14 @@ void HamlibTransceiver::poll () update_rx_frequency (f); - if (rig_->caps->targetable_vfo & (RIG_TARGETABLE_FREQ | RIG_TARGETABLE_PURE)) + if (state ().split () && (rig_->caps->targetable_vfo & (RIG_TARGETABLE_FREQ | RIG_TARGETABLE_PURE))) { - // we can only probe current VFO unless rig supports reading the other one directly + // only read "other" VFO if in split, this allows rigs like + // FlexRadio to work in Kenwood TS-2000 mode despite them + // not having a FB; command + + // we can only probe current VFO unless rig supports reading + // the other one directly because we can't glitch the Rx #if WSJT_TRACE_CAT && WSJT_TRACE_CAT_POLLS qDebug () << "HamlibTransceiver::poll rig_get_freq other VFO"; #endif