Merge branch 'filterwidth' of https://gitlab.com/eliggett/wfview into filterwidth

half-duplex
Phil Taylor 2023-01-24 11:11:20 +00:00
commit 646ee94341
1 zmienionych plików z 16 dodań i 0 usunięć

Wyświetl plik

@ -4667,7 +4667,11 @@ void wfmain::receiveSpectrumData(QByteArray spectrum, double startFreq, double e
if ((plotFloor != oldPlotFloor) || (plotCeiling != oldPlotCeiling)){ if ((plotFloor != oldPlotFloor) || (plotCeiling != oldPlotCeiling)){
updateRange = true; updateRange = true;
} }
#if QCUSTOMPLOT_VERSION < 0x020000
plot->graph(0)->setData(x, y);
#else
plot->graph(0)->setData(x, y, true); plot->graph(0)->setData(x, y, true);
#endif
if((freq.MHzDouble < endFreq) && (freq.MHzDouble > startFreq)) if((freq.MHzDouble < endFreq) && (freq.MHzDouble > startFreq))
{ {
@ -4733,14 +4737,26 @@ void wfmain::receiveSpectrumData(QByteArray spectrum, double startFreq, double e
if (underlayMode == underlayPeakHold) if (underlayMode == underlayPeakHold)
{ {
#if QCUSTOMPLOT_VERSION < 0x020000
plot->graph(1)->setData(x, y2); // peaks
#else
plot->graph(1)->setData(x, y2, true); // peaks plot->graph(1)->setData(x, y2, true); // peaks
#endif
} }
else if (underlayMode != underlayNone) { else if (underlayMode != underlayNone) {
computePlasma(); computePlasma();
#if QCUSTOMPLOT_VERSION < 0x020000
plot->graph(1)->setData(x, spectrumPlasmaLine);
#else
plot->graph(1)->setData(x, spectrumPlasmaLine, true); plot->graph(1)->setData(x, spectrumPlasmaLine, true);
#endif
} }
else { else {
#if QCUSTOMPLOT_VERSION < 0x020000
plot->graph(1)->setData(x, y2); // peaks, but probably cleared out
#else
plot->graph(1)->setData(x, y2, true); // peaks, but probably cleared out plot->graph(1)->setData(x, y2, true); // peaks, but probably cleared out
#endif
} }
if(updateRange) if(updateRange)