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
This commit is contained in:
Bill Somerville 2014-05-14 12:00:31 +00:00
parent f2f3204570
commit 36b154e01f

View File

@ -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)