diff options
| author | Christoph Berg <myon@debian.org> | 2022-08-08 23:08:17 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2022-08-08 23:08:17 +0200 |
| commit | 43bebfbad6e7ba026bd3d55720c7d9e12a7ef8ef (patch) | |
| tree | fac973fdc7378510849f4d749cd311176c023ebb /Transceiver/OmniRigTransceiver.cpp | |
| parent | d47341d71ff3df889c1180eb7bfb4fc0272eb26b (diff) | |
New upstream version 2.6.0~rc2+repackupstream/2.6.0_rc2+repack
Diffstat (limited to 'Transceiver/OmniRigTransceiver.cpp')
| -rwxr-xr-x | Transceiver/OmniRigTransceiver.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/Transceiver/OmniRigTransceiver.cpp b/Transceiver/OmniRigTransceiver.cpp index 952af9a7..4aa68994 100755 --- a/Transceiver/OmniRigTransceiver.cpp +++ b/Transceiver/OmniRigTransceiver.cpp @@ -280,17 +280,30 @@ int OmniRigTransceiver::do_start () resolution = 2; // 20Hz rounded } } + + // For OmniRig v1.19 or later we need a delay between GetRxFrequency () and SetFreq (f), + // otherwise rig QRG stays at f+55 Hz. 200 ms should do job for all modern transceivers. + // However, with very slow rigs, QRG may still stay at f+55 Hz. Such rigs should use v1.18. + // Due to the asynchronous nature of Omnirig commands, a better solution would be to implement + // an event handler for OmniRig's OnParamChange event and read the frequency inside that handler. + if (OmniRig::PM_FREQ & writable_params_) { - rig_->SetFreq (f); + QTimer::singleShot (200, [=] { + rig_->SetFreq (f); + }); } else if (reversed_ && (OmniRig::PM_FREQB & writable_params_)) { - rig_->SetFreqB (f); + QTimer::singleShot (200, [=] { + rig_->SetFreqB (f); + }); } else if (!reversed_ && (OmniRig::PM_FREQA & writable_params_)) { - rig_->SetFreqA (f); + QTimer::singleShot (200, [=] { + rig_->SetFreqA (f); + }); } update_rx_frequency (f); CAT_TRACE ("started"); |
