SoapySDR support: fixed update settings processing in GUIs

This commit is contained in:
f4exb 2018-11-04 19:17:47 +01:00
parent 2bc59154bf
commit 45a569655a
4 changed files with 28 additions and 7 deletions

View File

@ -583,12 +583,13 @@ bool SoapySDROutput::handleMessage(const Message& message)
SoapySDROutputSettings settings = m_settings;
//bool fromRxBuddy = report.getRxElseTx();
settings.m_centerFrequency = m_deviceShared.m_device->getFrequency(
double centerFrequency = m_deviceShared.m_device->getFrequency(
SOAPY_SDR_TX,
requestedChannel,
m_deviceShared.m_deviceParams->getTxChannelMainTunableElementName(requestedChannel));
settings.m_devSampleRate = m_deviceShared.m_device->getSampleRate(SOAPY_SDR_TX, requestedChannel);
settings.m_centerFrequency = round(centerFrequency/1000.0) * 1000;
settings.m_devSampleRate = round(m_deviceShared.m_device->getSampleRate(SOAPY_SDR_TX, requestedChannel));
//SoapySDROutputThread *outputThread = findThread();

View File

@ -168,7 +168,17 @@ bool SoapySDROutputGui::deserialize(const QByteArray& data)
bool SoapySDROutputGui::handleMessage(const Message& message)
{
if (SoapySDROutput::MsgStartStop::match(message))
if (SoapySDROutput::MsgConfigureSoapySDROutput::match(message))
{
const SoapySDROutput::MsgConfigureSoapySDROutput& cfg = (SoapySDROutput::MsgConfigureSoapySDROutput&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
displaySettings();
blockApplySettings(false);
return true;
}
else if (SoapySDROutput::MsgStartStop::match(message))
{
SoapySDROutput::MsgStartStop& notif = (SoapySDROutput::MsgStartStop&) message;
blockApplySettings(true);

View File

@ -620,12 +620,13 @@ bool SoapySDRInput::handleMessage(const Message& message __attribute__((unused))
settings.m_fcPos = (SoapySDRInputSettings::fcPos_t) report.getFcPos();
//bool fromRxBuddy = report.getRxElseTx();
settings.m_centerFrequency = m_deviceShared.m_device->getFrequency(
double centerFrequency = m_deviceShared.m_device->getFrequency(
SOAPY_SDR_RX,
requestedChannel,
m_deviceShared.m_deviceParams->getRxChannelMainTunableElementName(requestedChannel));
settings.m_devSampleRate = m_deviceShared.m_device->getSampleRate(SOAPY_SDR_RX, requestedChannel);
settings.m_centerFrequency = round(centerFrequency/1000.0) * 1000;
settings.m_devSampleRate = round(m_deviceShared.m_device->getSampleRate(SOAPY_SDR_RX, requestedChannel));
SoapySDRInputThread *inputThread = findThread();

View File

@ -191,10 +191,19 @@ bool SoapySDRInputGui::deserialize(const QByteArray& data)
}
}
bool SoapySDRInputGui::handleMessage(const Message& message)
{
if (SoapySDRInput::MsgStartStop::match(message))
if (SoapySDRInput::MsgConfigureSoapySDRInput::match(message))
{
const SoapySDRInput::MsgConfigureSoapySDRInput& cfg = (SoapySDRInput::MsgConfigureSoapySDRInput&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
displaySettings();
blockApplySettings(false);
return true;
}
else if (SoapySDRInput::MsgStartStop::match(message))
{
SoapySDRInput::MsgStartStop& notif = (SoapySDRInput::MsgStartStop&) message;
blockApplySettings(true);