Ensure that PTT is actually off when opening Hamlib connection. (#1308)
* Ensure that PTT is actually off when opening Hamlib connection. * Fix TSan warnings during testing of Tune feature. * Add PR #1308 to changelog. * Tweak mock Hamlib server to fix tests. * Clarify multiple config behavior in user manual.pull/1306/head^2
parent
7c1abacffd
commit
fd0a760228
|
|
@ -365,7 +365,8 @@ to the following locations:
|
|||
|
||||
You can also save and restore different configuration files by using the Tools->Export Configuration
|
||||
and Use Configuration menu items. These menu options allow for switching of configurations without
|
||||
restarting FreeDV.
|
||||
restarting FreeDV. Note that restoring a configuration file does not modify the default configuration
|
||||
nor does FreeDV begin using it by default on subsequent application starts.
|
||||
|
||||
## Executing FreeDV With a Different Configuration (Windows)
|
||||
|
||||
|
|
@ -931,6 +932,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes
|
|||
* FreeDV Reporter: Fix inability to use mouse wheel on Msg column. (PR #1289)
|
||||
* Fix RADE related compiler errors. (PR #1299)
|
||||
* Logging: fix incorrect time when using UTC due to DST. (PR #1302) - thanks @barjac!
|
||||
* Ensure that PTT is actually off when opening Hamlib connection. (PR #1308)
|
||||
2. Enhancements:
|
||||
* FreeDV Reporter: Use ItemsAdded/ItemsDeleted instead of Cleared() for performance. (PR #1212)
|
||||
* Optimize "From XXX" plot performance. (PR #1238, #1239)
|
||||
|
|
|
|||
|
|
@ -3757,12 +3757,14 @@ void MainFrame::OnTxOutAudioData_(IAudioDevice& dev, void* data, size_t size, vo
|
|||
auto txLevel = g_tuneLevelScale.load(std::memory_order_acquire) * (SHRT_MAX / 2);
|
||||
for (unsigned long index = 0; index < size; index++)
|
||||
{
|
||||
auto carrierSample = txLevel * sin(2 * M_PI * FDMDV_FCENTRE * cbData->tuneSineWaveSampleNumber / sr);
|
||||
auto sineWaveSampleNumber = cbData->tuneSineWaveSampleNumber.load(std::memory_order_acquire);
|
||||
auto carrierSample = txLevel * sin(2 * M_PI * FDMDV_FCENTRE * sineWaveSampleNumber / sr);
|
||||
for (int i = 0; i < numChannels; i++)
|
||||
{
|
||||
*audioData++ = carrierSample;
|
||||
}
|
||||
cbData->tuneSineWaveSampleNumber = (cbData->tuneSineWaveSampleNumber + 1) % sr;
|
||||
sineWaveSampleNumber = (sineWaveSampleNumber + 1) % sr;
|
||||
cbData->tuneSineWaveSampleNumber.store(sineWaveSampleNumber, std::memory_order_release);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1441,7 +1441,7 @@ void MainFrame::OnTogBtnTune(wxCommandEvent&)
|
|||
m_cboReportFrequency->Enable(!newTx);
|
||||
|
||||
// Enable tuning carrier
|
||||
g_rxUserdata->tuneSineWaveSampleNumber = 0;
|
||||
g_rxUserdata->tuneSineWaveSampleNumber.store(0, std::memory_order_release);
|
||||
g_rxUserdata->isTuning.store(newTx, std::memory_order_release);
|
||||
|
||||
wxString fmtString;
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ typedef struct paCallBackData
|
|||
|
||||
// Tune state
|
||||
std::atomic<bool> isTuning;
|
||||
int tuneSineWaveSampleNumber;
|
||||
std::atomic<int> tuneSineWaveSampleNumber;
|
||||
} paCallBackData;
|
||||
|
||||
#endif // AUDIO_PIPELINE_PA_CALLBACK_DATA_H
|
||||
|
|
|
|||
|
|
@ -438,6 +438,14 @@ void HamlibRigController::connectImpl_()
|
|||
multipleVfos_ = true;
|
||||
}
|
||||
|
||||
// Make sure PTT is not enabled as there have been reports of some
|
||||
// radios starting off in this state.
|
||||
result = rig_set_ptt(tmpRig, RIG_VFO_CURR, RIG_PTT_OFF);
|
||||
if (result != RIG_OK)
|
||||
{
|
||||
log_warn("Could not ensure that radio starts with PTT off: %s", rigerror(result));
|
||||
}
|
||||
|
||||
// Get current frequency and mode when we first connect so we can
|
||||
// revert on close.
|
||||
requestCurrentFrequencyModeImpl_();
|
||||
|
|
|
|||
|
|
@ -150,6 +150,9 @@ void OmniRigController::connectImpl_()
|
|||
// Get list of writable parameters.
|
||||
rig_->get_WriteableParams(&writableParams_);
|
||||
|
||||
// Make sure radio starts in RX mode.
|
||||
rig_->put_Tx(PM_RX);
|
||||
|
||||
// Get current frequency and mode when we first connect so we can
|
||||
// revert on close.
|
||||
requestCurrentFrequencyModeImpl_();
|
||||
|
|
|
|||
|
|
@ -331,8 +331,9 @@ class HamlibHandler:
|
|||
if x:
|
||||
self.app.ptt = 1
|
||||
else:
|
||||
if self.app.ptt:
|
||||
self.app.timesBeforeKill = self.app.timesBeforeKill - 1
|
||||
self.app.ptt = 0
|
||||
self.app.timesBeforeKill = self.app.timesBeforeKill - 1
|
||||
def GetSplitVfo(self):
|
||||
self.Reply('SPLIT', self.app.splitenable, 'TXVFO', self.app.txvfo, 0)
|
||||
def SetSplitVfo(self):
|
||||
|
|
|
|||
Loading…
Reference in New Issue