From d858df3c7bac193d225f6167e71da052ee430333 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Sat, 9 Jan 2016 12:15:10 +0000 Subject: [PATCH] Be lenient with failing mode queries Recent Yaesu rigs report an invalid bandwidth when set for split and different modes on the two VFOs, unfortunately this setup is required to get 4kHz bandwidth on Rx with Tx audio taken bypassing the mic gain and processor on the FTdx... rigs. This change ignores failures to read the mode when polling. Merged from ^/branches/wsjtx-1.6 git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6371 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- HamlibTransceiver.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/HamlibTransceiver.cpp b/HamlibTransceiver.cpp index 344882db9..32fcb2600 100644 --- a/HamlibTransceiver.cpp +++ b/HamlibTransceiver.cpp @@ -785,9 +785,22 @@ void HamlibTransceiver::poll () if (mode_query_works_) { - error_check (rig_get_mode (rig_.data (), RIG_VFO_CURR, &m, &w), tr ("getting current VFO mode")); - TRACE_CAT_POLL ("rig_get_mode mode =" << rig_strrmode (m) << "bw =" << w); - update_mode (map_mode (m)); + // We have to ignore errors here because Yaesu FTdx... rigs can + // report the wrong mode when transmitting split with different + // modes per VFO. This is unfortunate because that is exactly + // what you need to do to get 4kHz Rx b.w and modulation into + // the rig through the data socket or USB. I.e. USB for Rx and + // DATA-USB for Tx. + auto rc = rig_get_mode (rig_.data (), RIG_VFO_CURR, &m, &w); + if (RIG_OK == rc) + { + TRACE_CAT_POLL ("rig_get_mode mode =" << rig_strrmode (m) << "bw =" << w); + update_mode (map_mode (m)); + } + else + { + TRACE_CAT_POLL ("rig_get_mode mode failed with rc:" << rc << "ignoring"); + } } if (!is_dummy_ && rig_->caps->get_split_vfo && split_query_works_)