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,9 +283,10 @@ 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;
|
||||||
|
if(f) {
|
||||||
for(int i=0; i<99999; i++) {
|
for(int i=0; i<99999; i++) {
|
||||||
f >> freq >> sync >> sync2;
|
f >> freq >> sync >> sync2;
|
||||||
if(f.eof()) break;
|
if(!f or f.eof()) break;
|
||||||
x=XfromFreq(freq);
|
x=XfromFreq(freq);
|
||||||
if(sync > -99.0 and sync != 0.0) {
|
if(sync > -99.0 and sync != 0.0) {
|
||||||
y=m_h2*(0.9 - 0.09*gain2d*sync) - m_plot2dZero - 10;
|
y=m_h2*(0.9 - 0.09*gain2d*sync) - m_plot2dZero - 10;
|
||||||
@ -298,6 +299,7 @@ void CPlotter::draw(float swide[], bool bScroll, bool bRed)
|
|||||||
LineBuf3[k].setY(y);
|
LineBuf3[k].setY(y);
|
||||||
k++;
|
k++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
f.close();
|
f.close();
|
||||||
QPen pen0(Qt::red,2);
|
QPen pen0(Qt::red,2);
|
||||||
painter2D.setPen(pen0);
|
painter2D.setPen(pen0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user