diff --git a/plugins/channelrx/demodadsb/adsbdemodgui.cpp b/plugins/channelrx/demodadsb/adsbdemodgui.cpp index d241e9a60..9eece6bbe 100644 --- a/plugins/channelrx/demodadsb/adsbdemodgui.cpp +++ b/plugins/channelrx/demodadsb/adsbdemodgui.cpp @@ -811,44 +811,44 @@ void ADSBDemodGUI::handleADSB( } else if ((movement >= 2) && (movement <= 123)) { - float base, step; // In knts - int adjust; - if ((movement >= 2) && (movement <= 8)) - { - base = 0.125f; - step = 0.125f; - adjust = 2; - } - else if ((movement >= 9) && (movement <= 12)) - { - base = 1.0f; - step = 0.25f; - adjust = 9; - } - else if ((movement >= 13) && (movement <= 38)) - { - base = 2.0f; - step = 0.5f; - adjust = 13; - } - else if ((movement >= 39) && (movement <= 93)) - { - base = 15.0f; - step = 1.0f; - adjust = 39; - } - else if ((movement >= 94) && (movement <= 108)) - { - base = 70.0f; - step = 2.0f; - adjust = 94; - } - else - { - base = 100.0f; - step = 5.0f; - adjust = 109; - } + // float base, step; // In knts + // int adjust; + // if ((movement >= 2) && (movement <= 8)) + // { + // base = 0.125f; + // step = 0.125f; + // adjust = 2; + // } + // else if ((movement >= 9) && (movement <= 12)) + // { + // base = 1.0f; + // step = 0.25f; + // adjust = 9; + // } + // else if ((movement >= 13) && (movement <= 38)) + // { + // base = 2.0f; + // step = 0.5f; + // adjust = 13; + // } + // else if ((movement >= 39) && (movement <= 93)) + // { + // base = 15.0f; + // step = 1.0f; + // adjust = 39; + // } + // else if ((movement >= 94) && (movement <= 108)) + // { + // base = 70.0f; + // step = 2.0f; + // adjust = 94; + // } + // else + // { + // base = 100.0f; + // step = 5.0f; + // adjust = 109; + // } aircraft->m_speedType = Aircraft::GS; aircraft->m_speedValid = true; aircraft->m_speedItem->setData(Qt::DisplayRole, m_settings.m_siUnits ? knotsToKPHInt(aircraft->m_speed) : (int)std::round(aircraft->m_speed)); diff --git a/plugins/samplemimo/limesdrmimo/limesdrmimo.cpp b/plugins/samplemimo/limesdrmimo/limesdrmimo.cpp index cc91a7791..8b1d9e1a5 100644 --- a/plugins/samplemimo/limesdrmimo/limesdrmimo.cpp +++ b/plugins/samplemimo/limesdrmimo/limesdrmimo.cpp @@ -802,7 +802,7 @@ bool LimeSDRMIMO::applySettings(const LimeSDRMIMOSettings& settings, bool force) } if ((m_settings.m_ncoFrequencyRx != settings.m_ncoFrequencyRx) || - (m_settings.m_ncoEnableRx != settings.m_ncoEnableRx) || force) + (m_settings.m_ncoEnableRx != settings.m_ncoEnableRx) || force || forceRxNCOFrequency) { forwardChangeRxDSP = true; applyRxNCOFrequency(0, settings.m_ncoEnableRx, settings.m_ncoFrequencyRx); diff --git a/plugins/samplesink/xtrxoutput/xtrxoutput.cpp b/plugins/samplesink/xtrxoutput/xtrxoutput.cpp index cfeed2c1e..6f5cb7428 100644 --- a/plugins/samplesink/xtrxoutput/xtrxoutput.cpp +++ b/plugins/samplesink/xtrxoutput/xtrxoutput.cpp @@ -382,6 +382,10 @@ void XTRXOutput::stop() // remove old thread address from buddies (reset in all buddies) const std::vector& sinkBuddies = m_deviceAPI->getSinkBuddies(); std::vector::const_iterator it = sinkBuddies.begin(); + + for (; it != sinkBuddies.end(); ++it) { + ((DeviceXTRXShared*) (*it)->getBuddySharedPtr())->m_sink->setThread(nullptr); + } } else if (nbOriginalChannels == 2) // Reduce from MO to SO by deleting and re-creating the thread { @@ -398,6 +402,11 @@ void XTRXOutput::stop() // remove old thread address from buddies (reset in all buddies). The address being held only in the owning source. const std::vector& sinkBuddies = m_deviceAPI->getSinkBuddies(); std::vector::const_iterator it = sinkBuddies.begin(); + + for (; it != sinkBuddies.end(); ++it) { + ((DeviceXTRXShared*) (*it)->getBuddySharedPtr())->m_sink->setThread(nullptr); + } + applySettings(m_settings, true); xtrxOutputThread->startWork(); } diff --git a/plugins/samplesource/xtrxinput/xtrxinput.cpp b/plugins/samplesource/xtrxinput/xtrxinput.cpp index 17c40eb88..8370bd167 100644 --- a/plugins/samplesource/xtrxinput/xtrxinput.cpp +++ b/plugins/samplesource/xtrxinput/xtrxinput.cpp @@ -392,6 +392,10 @@ void XTRXInput::stop() // remove old thread address from buddies (reset in all buddies) const std::vector& sourceBuddies = m_deviceAPI->getSourceBuddies(); std::vector::const_iterator it = sourceBuddies.begin(); + + for (; it != sourceBuddies.end(); ++it) { + ((DeviceXTRXShared*) (*it)->getBuddySharedPtr())->m_source->setThread(nullptr); + } } else if (nbOriginalChannels == 2) // Reduce from MI to SI by deleting and re-creating the thread { @@ -409,6 +413,11 @@ void XTRXInput::stop() // remove old thread address from buddies (reset in all buddies). The address being held only in the owning source. const std::vector& sourceBuddies = m_deviceAPI->getSourceBuddies(); std::vector::const_iterator it = sourceBuddies.begin(); + + for (; it != sourceBuddies.end(); ++it) { + ((DeviceXTRXShared*) (*it)->getBuddySharedPtr())->m_source->setThread(nullptr); + } + applySettings(m_settings, true); xtrxInputThread->startWork(); } diff --git a/sdrbase/dsp/samplemififo.cpp b/sdrbase/dsp/samplemififo.cpp index f987fbe13..b95cc9ac9 100644 --- a/sdrbase/dsp/samplemififo.cpp +++ b/sdrbase/dsp/samplemififo.cpp @@ -157,7 +157,6 @@ void SampleMIFifo::readSync( } QMutexLocker mutexLocker(&m_mutex); - std::vector::iterator dataIt = m_data.begin(); vpart1Begin.resize(m_nbStreams); vpart1End.resize(m_nbStreams); vpart2Begin.resize(m_nbStreams); @@ -197,7 +196,6 @@ void SampleMIFifo::readSync( } QMutexLocker mutexLocker(&m_mutex); - std::vector::iterator dataIt = m_data.begin(); vpart1Begin.resize(m_nbStreams); vpart1End.resize(m_nbStreams); vpart2Begin.resize(m_nbStreams);