From 4b9720a2e666b87d67c06adec976912d10020932 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Fri, 5 Mar 2021 17:27:23 +0000 Subject: [PATCH 1/2] Updated sample .WAV files build script --- samples/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index d074bdf30..2489b1922 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -21,7 +21,6 @@ set (SAMPLE_FILES JT9/130418_1742.wav MSK144/181211_120500.wav MSK144/181211_120800.wav - QRA64/QRA64C/161113_0111.wav WSPR/150426_0918.wav Q65/30A_Ionoscatter_6m/201203_022700.wav Q65/30A_Ionoscatter_6m/201203_022800.wav From ee05f5fed514cf2eb4282e65db21ab8b7781ea26 Mon Sep 17 00:00:00 2001 From: Steven Franke Date: Fri, 5 Mar 2021 13:00:28 -0600 Subject: [PATCH 2/2] Make CPlotter::draw bail out if it sees bad data in red.dat. --- widgets/plotter.cpp | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/widgets/plotter.cpp b/widgets/plotter.cpp index 14c13a50d..14aef1d15 100644 --- a/widgets/plotter.cpp +++ b/widgets/plotter.cpp @@ -283,20 +283,22 @@ void CPlotter::draw(float swide[], bool bScroll, bool bRed) int x,y; float freq,xdt,sync,sync2; f >> xdt; - for(int i=0; i<99999; i++) { - f >> freq >> sync >> sync2; - if(f.eof()) break; - x=XfromFreq(freq); - if(sync > -99.0 and sync != 0.0) { - y=m_h2*(0.9 - 0.09*gain2d*sync) - m_plot2dZero - 10; - LineBuf2[k2].setX(x); //Red sync curve - LineBuf2[k2].setY(y); - k2++; + if(f) { + for(int i=0; i<99999; i++) { + f >> freq >> sync >> sync2; + if(!f or f.eof()) break; + x=XfromFreq(freq); + if(sync > -99.0 and sync != 0.0) { + y=m_h2*(0.9 - 0.09*gain2d*sync) - m_plot2dZero - 10; + LineBuf2[k2].setX(x); //Red sync curve + 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(); QPen pen0(Qt::red,2);