From 35e377d3649bfa14eca25d2f0ff07a0412c0154d Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Sat, 28 Feb 2015 13:40:07 +0000 Subject: [PATCH] Use freq-mode-freq-mode sequency to set freqquency Because setting frequency can change mode and setting mode can change frequency on various rigs it is necessary to set a frequency by first setting a frequency which gets to the correct band and potentially band stack register. Then to set the mode to ensure that any band remembered mode is cleared. Then set frequency again in case the prior mode change moved the frequency (e.g. CW correction). Then set mode again because some rigs set the mode according to frequency. Who would have thought setting the rig frequency via CAT could be so complicated :( TODO: Even this is flawed on some Yaesu rigs that must be band changed to select some settings like aerial socket and pre-amp settings. Merged from wsjtx-1.4 branch. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4997 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- HamlibTransceiver.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/HamlibTransceiver.cpp b/HamlibTransceiver.cpp index eebcdda4e..b2f1eb6a0 100644 --- a/HamlibTransceiver.cpp +++ b/HamlibTransceiver.cpp @@ -497,6 +497,13 @@ void HamlibTransceiver::do_frequency (Frequency f, MODE m) error_check (rig_set_freq (rig_.data (), RIG_VFO_CURR, f), tr ("setting frequency")); } + if (UNK != m) + { + // for the second time because some rigs change mode according + // to frequency such as the TS-2000 auto mode setting + do_mode (m, false); + } + update_rx_frequency (f); }