kopia lustrzana https://gitlab.com/eliggett/wfview
Added clearing to the plasma underlay display.
rodzic
9367d605f4
commit
8cfb3f70e5
21
wfmain.cpp
21
wfmain.cpp
|
@ -3903,10 +3903,12 @@ void wfmain::receiveSpectrumData(QByteArray spectrum, double startFreq, double e
|
|||
// TODO: create non-button function to do this
|
||||
// This will break if the button is ever moved or renamed.
|
||||
on_clearPeakBtn_clicked();
|
||||
} else {
|
||||
plasmaPrepared = false;
|
||||
preparePlasma();
|
||||
}
|
||||
// Inform other threads (cluster) that the frequency range has changed.
|
||||
emit setFrequencyRange(startFreq, endFreq);
|
||||
// TODO: Add clear-out for the buffer
|
||||
}
|
||||
|
||||
oldLowerFreq = startFreq;
|
||||
|
@ -3949,8 +3951,10 @@ void wfmain::receiveSpectrumData(QByteArray spectrum, double startFreq, double e
|
|||
}
|
||||
plasmaMutex.lock();
|
||||
spectrumPlasma.push_front(spectrum);
|
||||
spectrumPlasma.pop_back();
|
||||
//spectrumPlasma.resize(spectrumPlasmaSize);
|
||||
if(spectrumPlasma.size() > (int)spectrumPlasmaSize)
|
||||
{
|
||||
spectrumPlasma.pop_back();
|
||||
}
|
||||
plasmaMutex.unlock();
|
||||
|
||||
|
||||
|
@ -4065,10 +4069,13 @@ void wfmain::preparePlasma()
|
|||
plasmaMutex.lock();
|
||||
spectrumPlasma.clear();
|
||||
|
||||
for(unsigned int p=0; p < spectrumPlasmaSize; p++)
|
||||
{
|
||||
spectrumPlasma.append(empty);
|
||||
}
|
||||
// spectrumPlasma.append(empty);
|
||||
|
||||
// It may be possible to skip this.
|
||||
// for(unsigned int p=0; p < spectrumPlasmaSize; p++)
|
||||
// {
|
||||
// spectrumPlasma.append(empty);
|
||||
// }
|
||||
|
||||
spectrumPlasma.squeeze();
|
||||
plasmaMutex.unlock();
|
||||
|
|
Ładowanie…
Reference in New Issue