mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-23 20:58:55 -05:00
Allow Hamlib rig_get_ptt call to fail if function unavailable.
The Hamlib backe end capabilities table is not reliable when the back end is the Hamlib Net one. This is because that back end claims all functions available but a call may fail on execution due to the actual remote back end target not supporting it. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4234 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
05b7c4680b
commit
124c0ac70c
@ -709,13 +709,18 @@ void HamlibTransceiver::poll ()
|
||||
if (RIG_PTT_NONE != rig_->state.pttport.type.ptt && rig_->caps->get_ptt)
|
||||
{
|
||||
ptt_t p;
|
||||
error_check (rig_get_ptt (rig_.data (), RIG_VFO_CURR, &p), tr ("getting PTT state"));
|
||||
auto rc = rig_get_ptt (rig_.data (), RIG_VFO_CURR, &p);
|
||||
if (RIG_ENAVAIL != rc) // may fail if Net rig ctl and target
|
||||
// doesn't support command
|
||||
{
|
||||
error_check (rc, tr ("getting PTT state"));
|
||||
|
||||
#if WSJT_TRACE_CAT && WSJT_TRACE_CAT_POLLS
|
||||
qDebug () << "HamlibTransceiver::state rig_get_ptt =" << p;
|
||||
qDebug () << "HamlibTransceiver::state rig_get_ptt =" << p;
|
||||
#endif
|
||||
|
||||
update_PTT (!(RIG_PTT_OFF == p));
|
||||
update_PTT (!(RIG_PTT_OFF == p));
|
||||
}
|
||||
}
|
||||
|
||||
#if !WSJT_TRACE_CAT_POLLS
|
||||
|
Loading…
Reference in New Issue
Block a user