kopia lustrzana https://gitlab.com/eliggett/wfview
Removed issue with plasma buffer resizing with the waterfall.
rodzic
7093ac104a
commit
c59050e632
35
wfmain.cpp
35
wfmain.cpp
|
@ -1079,7 +1079,7 @@ void wfmain::setUIToPrefs()
|
|||
|
||||
ui->wfLengthSlider->setValue(prefs.wflength);
|
||||
prepareWf(prefs.wflength);
|
||||
|
||||
preparePlasma();
|
||||
ui->topLevelSlider->setValue(prefs.plotCeiling);
|
||||
ui->botLevelSlider->setValue(prefs.plotFloor);
|
||||
|
||||
|
@ -2079,17 +2079,6 @@ void wfmain::prepareWf(unsigned int wfLength)
|
|||
QByteArray empty((int)spectWidth, '\x01');
|
||||
spectrumPeaks = QByteArray( (int)spectWidth, '\x01' );
|
||||
|
||||
if(spectrumPlasmaSize == 0)
|
||||
spectrumPlasmaSize = 128;
|
||||
|
||||
//spectrumPlasma.resize(spectrumPlasmaSize);
|
||||
for(unsigned int p=0; p < spectrumPlasmaSize; p++)
|
||||
{
|
||||
spectrumPlasma.append(empty);
|
||||
}
|
||||
|
||||
//wfimage.resize(wfLengthMax);
|
||||
|
||||
if((unsigned int)wfimage.size() < wfLengthMax)
|
||||
{
|
||||
unsigned int i=0;
|
||||
|
@ -3646,6 +3635,28 @@ void wfmain::receiveSpectrumData(QByteArray spectrum, double startFreq, double e
|
|||
}
|
||||
}
|
||||
|
||||
void wfmain::preparePlasma()
|
||||
{
|
||||
if(plasmaPrepared)
|
||||
return;
|
||||
QByteArray empty((int)spectWidth, '\x01');
|
||||
|
||||
if(spectrumPlasmaSize == 0)
|
||||
spectrumPlasmaSize = 128;
|
||||
|
||||
plasmaMutex.lock();
|
||||
spectrumPlasma.clear();
|
||||
|
||||
for(unsigned int p=0; p < spectrumPlasmaSize; p++)
|
||||
{
|
||||
spectrumPlasma.append(empty);
|
||||
}
|
||||
|
||||
spectrumPlasma.squeeze();
|
||||
plasmaMutex.unlock();
|
||||
plasmaPrepared = true;
|
||||
}
|
||||
|
||||
void wfmain::computePlasma()
|
||||
{
|
||||
plasmaMutex.lock();
|
||||
|
|
2
wfmain.h
2
wfmain.h
|
@ -573,6 +573,8 @@ private:
|
|||
void setPlotTheme(QCustomPlot *plot, bool isDark);
|
||||
void prepareWf();
|
||||
void prepareWf(unsigned int wfLength);
|
||||
void preparePlasma();
|
||||
bool plasmaPrepared = false;
|
||||
void computePlasma();
|
||||
void showHideSpectrum(bool show);
|
||||
void getInitialRigState();
|
||||
|
|
Ładowanie…
Reference in New Issue