diff options
| author | Christoph Berg <myon@debian.org> | 2020-06-02 20:44:28 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2020-06-02 20:44:28 +0200 |
| commit | 5c05cfa3903d8a71d77f4b3dc1d2d0c7a043c6d6 (patch) | |
| tree | b6617065dc8e840bccb26a72d22d945353a8f064 /Transceiver | |
| parent | 458b033b8ae7818d50e80f51b12c0c43bbd0d3e2 (diff) | |
New upstream version 2.2.0+repackupstream/2.2.0+repack
Diffstat (limited to 'Transceiver')
| -rw-r--r-- | Transceiver/HamlibTransceiver.cpp | 6 | ||||
| -rw-r--r-- | Transceiver/OmniRigTransceiver.cpp | 20 |
2 files changed, 18 insertions, 8 deletions
diff --git a/Transceiver/HamlibTransceiver.cpp b/Transceiver/HamlibTransceiver.cpp index dd468eb8..cf76032d 100644 --- a/Transceiver/HamlibTransceiver.cpp +++ b/Transceiver/HamlibTransceiver.cpp @@ -374,9 +374,11 @@ HamlibTransceiver::HamlibTransceiver (int model_number, TransceiverFactory::Para case TransceiverFactory::PTT_method_DTR: case TransceiverFactory::PTT_method_RTS: - if (!params.ptt_port.isEmpty () + if (params.ptt_port.size () && params.ptt_port != "None" - && (is_dummy_ || params.ptt_port != params.serial_port)) + && (is_dummy_ + || RIG_PORT_SERIAL != rig_->caps->port_type + || params.ptt_port != params.serial_port)) { #if defined (WIN32) set_conf ("ptt_pathname", ("\\\\.\\" + params.ptt_port).toLatin1 ().data ()); diff --git a/Transceiver/OmniRigTransceiver.cpp b/Transceiver/OmniRigTransceiver.cpp index 48219ecd..62c34ebf 100644 --- a/Transceiver/OmniRigTransceiver.cpp +++ b/Transceiver/OmniRigTransceiver.cpp @@ -162,6 +162,9 @@ int OmniRigTransceiver::do_start () Q_ASSERT (rig_); Q_ASSERT (!rig_->isNull ()); + // COM/OLE exceptions get signaled + connect (&*rig_, SIGNAL (exception (int, QString, QString, QString)), this, SLOT (handle_COM_exception (int, QString, QString, QString))); + offline_timer_.reset (new QTimer); // instantiate here as // constructor runs in wrong // thread @@ -175,12 +178,17 @@ int OmniRigTransceiver::do_start () Q_ASSERT (port_); Q_ASSERT (!port_->isNull ()); + + // COM/OLE exceptions get signaled + connect (&*port_, SIGNAL (exception (int, QString, QString, QString)), this, SLOT (handle_COM_exception (int, QString, QString, QString))); + TRACE_CAT ("OmniRigTransceiver", "OmniRig RTS state:" << port_->Rts ()); - if (!port_->Lock ()) // try to take exclusive use of the OmniRig serial port for PTT - { - TRACE_CAT ("OmniRigTransceiver", "Failed to get exclusive use of serial port for PTT from OmniRig"); - } + // remove locking because it doesn't seem to work properly + // if (!port_->Lock ()) // try to take exclusive use of the OmniRig serial port for PTT + // { + // TRACE_CAT ("OmniRigTransceiver", "Failed to get exclusive use of serial port for PTT from OmniRig"); + // } // start off so we don't accidentally key the radio if (TransceiverFactory::PTT_method_DTR == ptt_type_) @@ -314,9 +322,9 @@ void OmniRigTransceiver::do_stop () // destructor as destructor runs in // wrong thread - if (port_) + if (port_ && !port_->isNull ()) { - port_->Unlock (); // release serial port + // port_->Unlock (); // release serial port port_->clear (); port_.reset (); } |
