summaryrefslogtreecommitdiff
path: root/widgets/plotter.cpp
diff options
context:
space:
mode:
authortony mancill <tmancill@debian.org>2023-09-03 19:46:51 -0700
committertony mancill <tmancill@debian.org>2023-09-03 19:46:51 -0700
commit1fc24d9474229c0f382da5def559f5de7b903f86 (patch)
tree8a745660a498dbd6209a198679b821799f107024 /widgets/plotter.cpp
parent65e5ae53a0358d9a3d040b13e0cf84556a7b4812 (diff)
parent393a486ee1d7e308a49f8e0b8c3a4b2f43223248 (diff)
Update upstream source from tag 'upstream/2.7.0_rc2+repack'
Update to upstream version '2.7.0~rc2+repack' with Debian dir c24f4e90e5ec8585c79007453c538689dc460e86
Diffstat (limited to 'widgets/plotter.cpp')
-rwxr-xr-xwidgets/plotter.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/widgets/plotter.cpp b/widgets/plotter.cpp
index b237d5cb..4ed6cd28 100755
--- a/widgets/plotter.cpp
+++ b/widgets/plotter.cpp
@@ -280,27 +280,28 @@ void CPlotter::draw(float swide[], bool bScroll, bool bRed)
painter2D.drawText(x1-4,y,"73");
}
- if(bRed and m_bQ65_Sync) { //Plot the Q65 red/orange sync curves
+ if(bRed and m_bQ65_Sync) { //Plot the Q65 orange (current) and red (average) sync curves
int k=0;
int k2=0;
std::ifstream f;
f.open(m_redFile.toLatin1());
if(f) {
int x,y;
- float freq,xdt,smin,smax,sync,sync2;
+ float freq,xdt,smin,smax,sync_avg,sync_current;
f >> xdt >> smin >> smax;
if(f) {
for(int i=0; i<99999; i++) {
- f >> freq >> sync >> sync2;
+ f >> freq >> sync_avg >> sync_current;
if(!f or f.eof() or k>=MAX_SCREENSIZE or k2>=MAX_SCREENSIZE) break;
x=XfromFreq(freq);
- if(sync > -99.0 and (smin!=0.0 or smax != 0.0)) {
- y=m_h2*(0.9 - 0.09*gain2d*sync) - m_plot2dZero - 10;
- LineBuf2[k2].setX(x); //Red sync curve
+ // Plot the red curve only if we have averaged 2 or more Rx sequences.
+ if(sync_avg > -99.0 and (smin!=0.0 or smax != 0.0)) {
+ y=m_h2*(0.9 - 0.09*gain2d*gain2d*sync_avg) - m_plot2dZero - 10;
+ LineBuf2[k2].setX(x); //Red sync curve (average)
LineBuf2[k2].setY(y);
k2++;
}
- y=m_h2*(0.9 - 0.09*gain2d*sync2) - m_plot2dZero;
+ y=m_h2*(0.9 - 0.09*gain2d*gain2d*sync_current) - m_plot2dZero;
LineBuf3[k].setX(x); //Orange sync curve
LineBuf3[k].setY(y);
k++;