diff options
| author | tony mancill <tmancill@debian.org> | 2023-09-03 19:46:43 -0700 |
|---|---|---|
| committer | tony mancill <tmancill@debian.org> | 2023-09-03 19:46:43 -0700 |
| commit | 393a486ee1d7e308a49f8e0b8c3a4b2f43223248 (patch) | |
| tree | 6a6e8a56ace360795e1cf1a310d5652bb23f1386 /widgets/plotter.cpp | |
| parent | 6a285ab382ebff18c88e52bec75dc1773ac33b74 (diff) | |
New upstream version 2.7.0~rc2+repackupstream/2.7.0_rc2+repack
Diffstat (limited to 'widgets/plotter.cpp')
| -rwxr-xr-x | widgets/plotter.cpp | 15 |
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++;
|
