From c0800fbcec981ae7c17c2899139a8ac7811fd5b1 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 13 Sep 2012 01:00:05 +0000 Subject: [PATCH] Cleaned up some display matters for nfast=2 modes. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@2577 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- libm65/fchisq.f | 2 +- mainwindow.cpp | 5 +++++ plotter.cpp | 19 ++++++++++++------- widegraph.cpp | 13 +++++++++---- widegraph.h | 2 ++ 5 files changed, 29 insertions(+), 12 deletions(-) diff --git a/libm65/fchisq.f b/libm65/fchisq.f index 3bb56d3d8..fa311d95f 100644 --- a/libm65/fchisq.f +++ b/libm65/fchisq.f @@ -5,7 +5,7 @@ complex cx(npts),cy(npts) real a(5) complex w,wstep,za,zb,z - real ss(2600) + real ss(3000) complex csx(0:NMAX/64),csy(0:NMAX/64) data twopi/6.283185307/a1,a2,a3/99.,99.,99./ save diff --git a/mainwindow.cpp b/mainwindow.cpp index 1363679b8..d2dc2122d 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1960,6 +1960,7 @@ void MainWindow::on_actionJT65A_triggered() soundInThread.setPeriod(m_TRperiod); soundOutThread.setPeriod(m_TRperiod); g_pWideGraph->setMode65(m_mode65); + g_pWideGraph->setPeriod(m_TRperiod); lab5->setStyleSheet("QLabel{background-color: #ff6ec7}"); lab5->setText(m_mode); ui->actionJT65A->setChecked(true); @@ -1974,6 +1975,7 @@ void MainWindow::on_actionJT65B_triggered() soundInThread.setPeriod(m_TRperiod); soundOutThread.setPeriod(m_TRperiod); g_pWideGraph->setMode65(m_mode65); + g_pWideGraph->setPeriod(m_TRperiod); lab5->setStyleSheet("QLabel{background-color: #ffff00}"); lab5->setText(m_mode); ui->actionJT65B->setChecked(true); @@ -1988,6 +1990,7 @@ void MainWindow::on_actionJT65C_triggered() soundInThread.setPeriod(m_TRperiod); soundOutThread.setPeriod(m_TRperiod); g_pWideGraph->setMode65(m_mode65); + g_pWideGraph->setPeriod(m_TRperiod); lab5->setStyleSheet("QLabel{background-color: #ffa500}"); lab5->setText(m_mode); ui->actionJT65C->setChecked(true); @@ -2002,6 +2005,7 @@ void MainWindow::on_actionJT65B2_triggered() soundInThread.setPeriod(m_TRperiod); soundOutThread.setPeriod(m_TRperiod); g_pWideGraph->setMode65(m_mode65); + g_pWideGraph->setPeriod(m_TRperiod); lab5->setStyleSheet("QLabel{background-color: #7fff00}"); lab5->setText(m_mode); ui->actionJT65B2->setChecked(true); @@ -2016,6 +2020,7 @@ void MainWindow::on_actionJT65C2_triggered() soundInThread.setPeriod(m_TRperiod); soundOutThread.setPeriod(m_TRperiod); g_pWideGraph->setMode65(m_mode65); + g_pWideGraph->setPeriod(m_TRperiod); lab5->setStyleSheet("QLabel{background-color: #97ffff}"); lab5->setText(m_mode); ui->actionJT65C2->setChecked(true); diff --git a/plotter.cpp b/plotter.cpp index 911b96e8c..ca71ba51a 100644 --- a/plotter.cpp +++ b/plotter.cpp @@ -109,16 +109,18 @@ void CPlotter::paintEvent(QPaintEvent *) // paintEvent() int k=x0; for(int j=1; j1.0e29) m_line=0; m_line++; - if(m_line == 15) { + if(m_line == 13) { UTCstr(); painter1.setPen(m_ColorTbl[255]); painter1.drawText(5,10,m_sutc); + m_paintAllZoom=true; } update(); //trigger a new paintEvent } @@ -229,6 +232,8 @@ void CPlotter::UTCstr() imin=imin % 60; isec=(ms/1000) % 60; } + if(isec<30) isec=0; + if(isec>=30) isec=30; sprintf(m_sutc,"%2.2d:%2.2d:%2.2d",ihr,imin,isec); } diff --git a/widegraph.cpp b/widegraph.cpp index 93c21cf57..bef91367f 100644 --- a/widegraph.cpp +++ b/widegraph.cpp @@ -80,7 +80,7 @@ void WideGraph::dataSink2(float s[], int nkhz, int ihsym, int ndiskdata, int nbpp = ui->widePlot->binsPerPixel(); static int n=0; static int nkhz0=-999; - static int n60z=0; + static int ntrz=0; df = m_fSample/32768.0; if(nkhz != nkhz0) { @@ -123,9 +123,9 @@ void WideGraph::dataSink2(float s[], int nkhz, int ihsym, int ndiskdata, // Time according to this computer qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000; - int n60 = (ms/1000) % 60; + int ntr = (ms/1000) % m_TRperiod; - if((ndiskdata && ihsym <= m_waterfallAvg) || (!ndiskdata && n60widePlot->draw(swide,i0,splot); } } @@ -316,3 +316,8 @@ double WideGraph::fGreen() { return ui->widePlot->fGreen(); } + +void WideGraph::setPeriod(int n) +{ + m_TRperiod=n; +} diff --git a/widegraph.h b/widegraph.h index f78d7b455..becdcedd2 100644 --- a/widegraph.h +++ b/widegraph.h @@ -34,6 +34,7 @@ public: void setPalette(QString palette); void setFsample(int n); void setMode65(int n); + void setPeriod(int n); double fGreen(); qint32 m_qsoFreq; @@ -66,6 +67,7 @@ private: qint32 m_fCal; qint32 m_fSample; qint32 m_mode65; + qint32 m_TRperiod; Ui::WideGraph *ui; };