From 9b9749aaabc449a2884348e022d7d565ea30d862 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Wed, 14 May 2014 12:00:31 +0000 Subject: [PATCH] Correct ordering of commands sent to HRD when emulating split mode. Frequency changes must be made while the rig is in RX mode otherwise they can end up getting ignored on some rigs. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4137 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- EmulateSplitTransceiver.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/EmulateSplitTransceiver.cpp b/EmulateSplitTransceiver.cpp index a13e40c6b..3769b1bd9 100644 --- a/EmulateSplitTransceiver.cpp +++ b/EmulateSplitTransceiver.cpp @@ -52,14 +52,23 @@ void EmulateSplitTransceiver::ptt (bool on) noexcept #endif // Save TX state for future frequency change requests. - tx_ = on; + if ((tx_ = on)) + { + // Switch to other frequency if we have one i.e. client wants + // split operation). + wrapped_->frequency (frequency_[frequency_[1] ? 1 : 0]); - // Switch to other frequency if we have one i.e. client wants split - // operation). - wrapped_->frequency (frequency_[(on && frequency_[1]) ? 1 : 0]); + // Change TX state. + wrapped_->ptt (true); + } + else + { + // Change TX state. + wrapped_->ptt (false); - // Change TX state. - wrapped_->ptt (on); + // Switch to RX frequency. + wrapped_->frequency (frequency_[0]); + } } void EmulateSplitTransceiver::handle_update (TransceiverState state)