Don't keep querying split status on rigs where it doesn't work

Merged from wsjtx-1.4 branch.



git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4691 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2014-11-29 18:15:05 +00:00
parent eaea408189
commit 2b614fd9e2
2 changed files with 45 additions and 44 deletions

View File

@ -168,6 +168,7 @@ HamlibTransceiver::HamlibTransceiver (int model_number
, back_ptt_port_ {TransceiverFactory::TX_audio_source_rear == back_ptt_port}
, is_dummy_ {RIG_MODEL_DUMMY == model_number}
, reversed_ {false}
, split_query_works_ {true}
{
if (!rig_)
{
@ -265,23 +266,6 @@ void HamlibTransceiver::do_start ()
error_check (rig_open (rig_.data ()), tr ("opening connection to rig"));
init_rig ();
}
void HamlibTransceiver::do_stop ()
{
if (rig_)
{
rig_close (rig_.data ());
}
#if WSJT_TRACE_CAT
qDebug () << "HamlibTransceiver::do_stop: state:" << state () << "reversed =" << reversed_;
#endif
}
void HamlibTransceiver::init_rig ()
{
if (!is_dummy_)
{
freq_t f1;
@ -429,6 +413,18 @@ void HamlibTransceiver::init_rig ()
#endif
}
void HamlibTransceiver::do_stop ()
{
if (rig_)
{
rig_close (rig_.data ());
}
#if WSJT_TRACE_CAT
qDebug () << "HamlibTransceiver::do_stop: state:" << state () << "reversed =" << reversed_;
#endif
}
auto HamlibTransceiver::get_vfos () const -> std::tuple<vfo_t, vfo_t>
{
if (rig_->caps->get_vfo)
@ -696,6 +692,8 @@ void HamlibTransceiver::poll ()
update_mode (map_mode (m));
if (rig_->caps->get_split_vfo && split_query_works_)
{
#if WSJT_TRACE_CAT && WSJT_TRACE_CAT_POLLS
qDebug ().nospace () << "HamlibTransceiver::poll rig_get_split_vfo";
#endif
@ -728,11 +726,13 @@ void HamlibTransceiver::poll ()
#endif
// just report how we see it based on prior commands
split_query_works_ = false;
}
else
{
error_check (rc, tr ("getting split TX VFO"));
}
}
if (RIG_PTT_NONE != rig_->state.pttport.type.ptt && rig_->caps->get_ptt)
{

View File

@ -55,7 +55,6 @@ class HamlibTransceiver final
QByteArray get_conf (char const * item);
Transceiver::MODE map_mode (rmode_t) const;
rmode_t map_mode (Transceiver::MODE mode) const;
void init_rig ();
std::tuple<vfo_t, vfo_t> get_vfos () const;
struct RIGDeleter {static void cleanup (RIG *);};
@ -65,6 +64,8 @@ class HamlibTransceiver final
bool is_dummy_;
bool mutable reversed_;
bool split_query_works_;
};
#endif