Ignore Hamlib error when using fake split without CAT split control.

Fake  split  mode attempts  to  take  the rig  out  of  split mode  on
initialization and this  caused an error when the  rig doesn't support
split control via CAT. This specfic error is now ignored to allow fake
split mode to start cleanly.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4174 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2014-06-16 09:39:04 +00:00
parent 154b64b183
commit 0b1c7252a2

View File

@ -533,7 +533,17 @@ void HamlibTransceiver::do_tx_frequency (Frequency tx, bool rationalise_mode)
qDebug () << "HamlibTransceiver::do_tx_frequency rig_set_split_vfo";
#endif
error_check (rig_set_split_vfo (rig_.data (), RIG_VFO_CURR, tx ? RIG_SPLIT_ON : RIG_SPLIT_OFF, tx_vfo), tr ("seting split mode"));
auto rc = rig_set_split_vfo (rig_.data (), RIG_VFO_CURR, tx ? RIG_SPLIT_ON : RIG_SPLIT_OFF, tx_vfo);
if (tx || -RIG_ENAVAIL != rc)
{
// On rigs that can't have split controlled only throw an
// exception when an error other than command not accepted
// is returned when trying to leave split mode. This allows
// fake split mode and non-split mode to work without error
// on such rigs without having to know anything about the
// specific rig.
error_check (rc, tr ("setting/unsetting split mode"));
}
}
update_split (tx);