mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-07-03 18:35:16 -04:00
Make CPlotter::draw bail out if it sees bad data in red.dat.
This commit is contained in:
parent
f60b867a9a
commit
ee05f5fed5
@ -283,20 +283,22 @@ void CPlotter::draw(float swide[], bool bScroll, bool bRed)
|
|||||||
int x,y;
|
int x,y;
|
||||||
float freq,xdt,sync,sync2;
|
float freq,xdt,sync,sync2;
|
||||||
f >> xdt;
|
f >> xdt;
|
||||||
for(int i=0; i<99999; i++) {
|
if(f) {
|
||||||
f >> freq >> sync >> sync2;
|
for(int i=0; i<99999; i++) {
|
||||||
if(f.eof()) break;
|
f >> freq >> sync >> sync2;
|
||||||
x=XfromFreq(freq);
|
if(!f or f.eof()) break;
|
||||||
if(sync > -99.0 and sync != 0.0) {
|
x=XfromFreq(freq);
|
||||||
y=m_h2*(0.9 - 0.09*gain2d*sync) - m_plot2dZero - 10;
|
if(sync > -99.0 and sync != 0.0) {
|
||||||
LineBuf2[k2].setX(x); //Red sync curve
|
y=m_h2*(0.9 - 0.09*gain2d*sync) - m_plot2dZero - 10;
|
||||||
LineBuf2[k2].setY(y);
|
LineBuf2[k2].setX(x); //Red sync curve
|
||||||
k2++;
|
LineBuf2[k2].setY(y);
|
||||||
|
k2++;
|
||||||
|
}
|
||||||
|
y=m_h2*(0.9 - 0.09*gain2d*sync2) - m_plot2dZero;
|
||||||
|
LineBuf3[k].setX(x); //Orange sync curve
|
||||||
|
LineBuf3[k].setY(y);
|
||||||
|
k++;
|
||||||
}
|
}
|
||||||
y=m_h2*(0.9 - 0.09*gain2d*sync2) - m_plot2dZero;
|
|
||||||
LineBuf3[k].setX(x); //Orange sync curve
|
|
||||||
LineBuf3[k].setY(y);
|
|
||||||
k++;
|
|
||||||
}
|
}
|
||||||
f.close();
|
f.close();
|
||||||
QPen pen0(Qt::red,2);
|
QPen pen0(Qt::red,2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user