From c4debeef8e5a8e901796e5ae11aca7555ead62f5 Mon Sep 17 00:00:00 2001 From: f4exb Date: Tue, 11 Jul 2023 11:44:25 +0200 Subject: [PATCH] PlutoSDR input/output: do not apply settings to self when coming from a buddy change. Fixes #1690 --- plugins/samplesink/plutosdroutput/plutosdroutput.cpp | 10 +++++----- plugins/samplesource/plutosdrinput/plutosdrinput.cpp | 11 ++++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/plugins/samplesink/plutosdroutput/plutosdroutput.cpp b/plugins/samplesink/plutosdroutput/plutosdroutput.cpp index f8a32a812..801e50e0e 100644 --- a/plugins/samplesink/plutosdroutput/plutosdroutput.cpp +++ b/plugins/samplesink/plutosdroutput/plutosdroutput.cpp @@ -210,14 +210,14 @@ bool PlutoSDROutput::handleMessage(const Message& message) else if (DevicePlutoSDRShared::MsgCrossReportToBuddy::match(message)) // message from buddy { DevicePlutoSDRShared::MsgCrossReportToBuddy& conf = (DevicePlutoSDRShared::MsgCrossReportToBuddy&) message; - m_settings.m_devSampleRate = conf.getDevSampleRate(); - m_settings.m_lpfFIRlog2Interp = conf.getLpfFiRlog2IntDec(); - m_settings.m_lpfFIRBW = conf.getLpfFirbw(); - m_settings.m_LOppmTenths = conf.getLoPPMTenths(); PlutoSDROutputSettings newSettings = m_settings; + newSettings.m_devSampleRate = conf.getDevSampleRate(); + newSettings.m_lpfFIRlog2Interp = conf.getLpfFiRlog2IntDec(); + newSettings.m_lpfFIRBW = conf.getLpfFirbw(); + newSettings.m_LOppmTenths = conf.getLoPPMTenths(); newSettings.m_lpfFIREnable = conf.isLpfFirEnable(); - applySettings(newSettings, QList{"devSampleRate", "lpfFIRlog2Interp", "lpfFIRBW", "LOppmTenths", "lpfFIREnable"}); + m_settings.applySettings(QList{"devSampleRate", "lpfFIRlog2Interp", "lpfFIRBW", "LOppmTenths", "lpfFIREnable"}, newSettings); return true; } diff --git a/plugins/samplesource/plutosdrinput/plutosdrinput.cpp b/plugins/samplesource/plutosdrinput/plutosdrinput.cpp index 76e760808..bb2f18659 100644 --- a/plugins/samplesource/plutosdrinput/plutosdrinput.cpp +++ b/plugins/samplesource/plutosdrinput/plutosdrinput.cpp @@ -234,13 +234,14 @@ bool PlutoSDRInput::handleMessage(const Message& message) else if (DevicePlutoSDRShared::MsgCrossReportToBuddy::match(message)) // message from buddy { DevicePlutoSDRShared::MsgCrossReportToBuddy& conf = (DevicePlutoSDRShared::MsgCrossReportToBuddy&) message; - m_settings.m_devSampleRate = conf.getDevSampleRate(); - m_settings.m_lpfFIRlog2Decim = conf.getLpfFiRlog2IntDec(); - m_settings.m_lpfFIRBW = conf.getLpfFirbw(); - m_settings.m_LOppmTenths = conf.getLoPPMTenths(); PlutoSDRInputSettings newSettings = m_settings; + newSettings.m_devSampleRate = conf.getDevSampleRate(); + newSettings.m_lpfFIRlog2Decim = conf.getLpfFiRlog2IntDec(); + newSettings.m_lpfFIRBW = conf.getLpfFirbw(); + newSettings.m_LOppmTenths = conf.getLoPPMTenths(); newSettings.m_lpfFIREnable = conf.isLpfFirEnable(); - applySettings(newSettings, QList{"devSampleRate", "lpfFIRlog2Decim", "lpfFIRBW", "LOppmTenths", "lpfFIREnable"}); + + m_settings.applySettings(QList{"devSampleRate", "lpfFIRlog2Decim", "lpfFIRBW", "LOppmTenths", "lpfFIREnable"}, newSettings); return true; }