From 450249dd4cdbc7b6dfe93fbeabc95b946e8f9549 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 18 Dec 2020 16:19:01 -0500 Subject: [PATCH] Add a DT label to the Q65 red sync curve. --- lib/q65_sync.f90 | 4 ++-- widgets/plotter.cpp | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/q65_sync.f90 b/lib/q65_sync.f90 index ff2cebcb5..95fa5c9ff 100644 --- a/lib/q65_sync.f90 +++ b/lib/q65_sync.f90 @@ -241,8 +241,8 @@ subroutine q65_sync(nutc,iwave,nmax,mode_q65,codewords,ncw,nsps,nfqso,ntol, & 200 do i=-ia,ia freq=nfqso + i*df - write(17,1100) freq,ccf1(i) -1100 format(2f10.3) + write(17,1100) freq,ccf1(i),xdt +1100 format(3f10.3) enddo close(17) diff --git a/widgets/plotter.cpp b/widgets/plotter.cpp index 737658de3..5dfacb3d2 100644 --- a/widgets/plotter.cpp +++ b/widgets/plotter.cpp @@ -273,20 +273,27 @@ void CPlotter::draw(float swide[], bool bScroll, bool bRed) f.open(m_redFile.toLatin1()); if(f) { int x,y; - float freq,sync; + float freq,sync,xdt; for(int i=0; i<99999; i++) { - f >> freq >> sync; + f >> freq >> sync >> xdt; if(f.eof()) break; x=XfromFreq(freq); y=m_h2*(0.9 - 0.09*gain2d*sync) - m_plot2dZero; LineBuf2[k].setX(x); LineBuf2[k].setY(y); + k++; } f.close(); QPen pen0(Qt::red,2); painter2D.setPen(pen0); painter2D.drawPolyline(LineBuf2,k); + QString t; + t = t.asprintf("DT = %6.2f",xdt); + painter2D.setPen(Qt::white); + Font.setWeight(QFont::Bold); + painter2D.setFont(Font); + painter2D.drawText(m_w-100,m_h2/2,t); } } update(); //trigger a new paintEvent