From f157fcfc66a353ac58174b29266af58e1733a5ae Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 14 Jan 2017 02:35:43 +0000 Subject: [PATCH] Big improvement in the way red Sync indicators are displayed. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@7495 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- libm65/map65a.f90 | 2 +- mainwindow.cpp | 1 + plotter.cpp | 15 +++++++++++---- plotter.h | 2 ++ widegraph.cpp | 4 ++++ widegraph.h | 1 + 6 files changed, 20 insertions(+), 5 deletions(-) diff --git a/libm65/map65a.f90 b/libm65/map65a.f90 index 50ed1d01a..7fad086de 100644 --- a/libm65/map65a.f90 +++ b/libm65/map65a.f90 @@ -349,7 +349,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, & endif if(ndphi.eq.1 .and.iloop.eq.12) call getdphi(qphi) - if(nqd.eq.1) then + if(nqd.ge.1) then write(*,1013) nsum,nsave 1013 format('',2i4) flush(6) diff --git a/mainwindow.cpp b/mainwindow.cpp index 817cda68d..cd50442a2 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1330,6 +1330,7 @@ void MainWindow::readFromStdout() //readFromStdout QString t2; t2.sprintf("Avg: %d",m_nsum); lab6->setText(t2); + if(m_bQRA64) g_pWideGraph->setDecodeFinished(); } if(t.indexOf("") >= 0) { if(m_widebandDecode) { diff --git a/plotter.cpp b/plotter.cpp index 9df4e1f99..286d50476 100644 --- a/plotter.cpp +++ b/plotter.cpp @@ -36,6 +36,7 @@ CPlotter::CPlotter(QWidget *parent) : //CPlotter Constructor m_fSample = 96000; m_paintAllZoom = false; m_TxDF=0; + m_bDecodeFinished=false; } CPlotter::~CPlotter() { } // Destructor @@ -130,12 +131,12 @@ void CPlotter::paintEvent(QPaintEvent *) // paintEvent() painter2.drawText(5,10,m_sutc); } - if(m_line==63) { +// if(m_line==63) { + if(m_bDecodeFinished) { std::ifstream f; f.open("./red.dat"); if(f) { int x,y; - int y0=30; float freq,sync; QPen pen0(Qt::red,1); painter2.setPen(pen0); @@ -145,13 +146,13 @@ void CPlotter::paintEvent(QPaintEvent *) // paintEvent() x=(freq - m_ZoomStartFreq)/df; y=(sync-1.5)*2.0; if(y>15.0) y=15.0; - if(x>=0 and x<=w) painter2.drawLine(x,y0-y,x,y0); + if(x>=0 and x<=w) painter2.drawLine(x,0,x,y); } f.close(); } + m_bDecodeFinished=false; } - m_paintAllZoom=false; x00=x0; @@ -161,6 +162,12 @@ void CPlotter::paintEvent(QPaintEvent *) // paintEvent() m_paintEventBusy=false; } +void CPlotter::DecodeFinished() +{ + m_bDecodeFinished=true; + update(); //trigger a new paintEvent +} + void CPlotter::draw(float s[], int i0, float splot[]) //draw() { int i,j,w,h; diff --git a/plotter.h b/plotter.h index 0fdefed8d..7169236c9 100644 --- a/plotter.h +++ b/plotter.h @@ -26,6 +26,7 @@ public: QSize minimumSizeHint() const; QSize sizeHint() const; QColor m_ColorTbl[256]; + bool m_bDecodeFinished; int m_plotZero; int m_plotGain; float m_fSpan; @@ -58,6 +59,7 @@ public: void setFQSO(int n, bool bf); void setFcal(int n); void setNkhz(int n); + void DecodeFinished(); void DrawOverlay(); int fQSO(); int DF(); diff --git a/widegraph.cpp b/widegraph.cpp index 12aff93ea..a038aa8bb 100644 --- a/widegraph.cpp +++ b/widegraph.cpp @@ -247,6 +247,10 @@ void WideGraph::setFcal(int n) ui->widePlot->setFcal(n); } +void WideGraph::setDecodeFinished() +{ + ui->widePlot->DecodeFinished(); +} int WideGraph::DF() { diff --git a/widegraph.h b/widegraph.h index c70e6dd8e..1300f79f1 100644 --- a/widegraph.h +++ b/widegraph.h @@ -39,6 +39,7 @@ public: void setFsample(int n); void setMode65(int n); void setPeriod(int n); + void setDecodeFinished(); double fGreen(); void rx570(); void tx570();