From 52f7656c0aa36646e8fb37a940799f1b9597be00 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 30 Nov 2012 13:56:55 +0000 Subject: [PATCH] Remove the Auto Zero button and associated code. Other code cleanup. Display UTC at start of sequence on decoded text line. Install DLLs to {app} rather than {sys}. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2788 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- mainwindow.cpp | 3 ++- mainwindow.ui | 2 +- plotter.cpp | 33 +++------------------------------ plotter.h | 4 ---- widegraph.cpp | 6 ------ widegraph.h | 1 - widegraph.ui | 23 ----------------------- wsjtx.iss | 4 ++-- 8 files changed, 8 insertions(+), 68 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 3eeb75306..2f27999e2 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,4 +1,4 @@ -//--------------------------------------------------------------- MainWindow +//---------------------------------------------------------------- MainWindow #include "mainwindow.h" #include "ui_mainwindow.h" #include "devsetup.h" @@ -887,6 +887,7 @@ void MainWindow::decode() //decode() int imin=ms/60000; int ihr=imin/60; imin=imin % 60; + imin=imin - (imin % (m_TRperiod/60)); jt9com_.nutc=100*ihr + imin; } diff --git a/mainwindow.ui b/mainwindow.ui index cb2a58b84..b3242aa09 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -59,7 +59,7 @@ - UTC Sync dB DT Freq Drift + UTC Sync dB DT Freq Drift diff --git a/plotter.cpp b/plotter.cpp index ed456795f..2842211c3 100644 --- a/plotter.cpp +++ b/plotter.cpp @@ -97,10 +97,6 @@ void CPlotter::draw(float swide[], float red[], int i0) //draw() m_2DPixmap = m_OverlayPixmap.copy(0,0,m_w,m_h2); QPainter painter2D(&m_2DPixmap); - for(int i=0; i<256; i++) { //Zero the histograms - m_hist1[i]=0; - } - painter2D.setPen(Qt::green); if(m_bJT9Sync) painter2D.setPen(Qt::red); @@ -122,13 +118,12 @@ void CPlotter::draw(float swide[], float red[], int i0) //draw() if (y1<0) y1=0; if (y1>254) y1=254; if (swide[i]>1.e29) y1=255; - m_hist1[y1]++; painter1.setPen(m_ColorTbl[y1]); painter1.drawPoint(i,0); y2=0; - if(m_bCurrent) y2 = gain*y + 30; - if(m_bCumulative) y2=3*gain*10.0*log10(jt9com_.savg[i]); - if(m_bJT9Sync) y2=3.0*gain*red[i] - 20; + if(m_bCurrent) y2 = 0.4*gain*y - 15; + if(m_bCumulative) y2=1.5*gain*10.0*log10(jt9com_.savg[i]) - 20; + if(m_bJT9Sync) y2=3.0*gain*red[i] - 15; if(strong != strong0 or i==m_w-1) { painter2D.drawPolyline(LineBuf,j); j=0; @@ -442,28 +437,6 @@ void CPlotter::mouseDoubleClickEvent(QMouseEvent *event) //mouse2click emit freezeDecode1(2); //### ??? } -int CPlotter::autoZero() //autoZero() -{ - int w = m_Size.width(); - m_z1=0; - int sum1=0; - for(int i=0; i<256; i++) { - sum1 += m_hist1[i]; - if(sum1 > int(0.7*w)) { - m_z1=i; - break; - } - } - - double gain = pow(10.0,0.05*(m_plotGain+7)); - if(m_z1 < 255) { - double dz1 = m_z1/(5.0*gain); - m_plotZero = int(m_plotZero + dz1 + 0.5); - if(m_z1==0) m_plotZero = m_plotZero - 5; - } - return m_plotZero; -} - void CPlotter::setNSpan(int n) //setNSpan() { m_nSpan=n; diff --git a/plotter.h b/plotter.h index 9cbc85d17..beb94a398 100644 --- a/plotter.h +++ b/plotter.h @@ -58,7 +58,6 @@ public: void setFcal(int n); void DrawOverlay(); int fQSO(); - int autoZero(); void setPalette(QString palette); void setFsample(int n); void setNsps(int ntrperiod, int nsps); @@ -102,9 +101,6 @@ private: bool m_dataFromDisk; char m_sutc[5]; qint32 m_line; - qint32 m_hist1[256]; - qint32 m_z1; - qint32 m_z2; qint32 m_fSample; qint32 m_i0; qint32 m_xClick; diff --git a/widegraph.cpp b/widegraph.cpp index 2e7b77c74..8955299e5 100644 --- a/widegraph.cpp +++ b/widegraph.cpp @@ -221,12 +221,6 @@ void WideGraph::setFcal(int n) ui->widePlot->setFcal(n); } -void WideGraph::on_autoZeroPushButton_clicked() -{ - int nzero=ui->widePlot->autoZero(); - ui->zeroSpinBox->setValue(nzero); -} - void WideGraph::setPalette(QString palette) { ui->widePlot->setPalette(palette); diff --git a/widegraph.h b/widegraph.h index 13cbd8cf8..5289c74e6 100644 --- a/widegraph.h +++ b/widegraph.h @@ -49,7 +49,6 @@ private slots: void on_freqSpanSpinBox_valueChanged(int arg1); void on_zeroSpinBox_valueChanged(int arg1); void on_gainSpinBox_valueChanged(int arg1); - void on_autoZeroPushButton_clicked(); void on_fDialLineEdit_editingFinished(); void on_rbCurrent_clicked(); void on_rbCumulative_clicked(); diff --git a/widegraph.ui b/widegraph.ui index 9866f675d..c7e179fd5 100644 --- a/widegraph.ui +++ b/widegraph.ui @@ -257,29 +257,6 @@ - - - - Auto Zero - - - - - - - Qt::Horizontal - - - QSizePolicy::Preferred - - - - 20 - 20 - - - - diff --git a/wsjtx.iss b/wsjtx.iss index ff7a42865..11c6126df 100644 --- a/wsjtx.iss +++ b/wsjtx.iss @@ -1,6 +1,6 @@ [Setup] AppName=wsjtx -AppVerName=wsjtx Version 0.5 r2783 +AppVerName=wsjtx Version 0.5 r2788 AppCopyright=Copyright (C) 2001-2012 by Joe Taylor, K1JT DefaultDirName=c:\wsjtx DefaultGroupName=wsjtx @@ -13,7 +13,7 @@ Source: "c:\Users\joe\wsjt\wsjtx_install\afmhot.dat"; DestDir: "{app}"; Source: "c:\Users\joe\wsjt\wsjtx_install\blue.dat"; DestDir: "{app}"; Source: "c:\Users\joe\wsjt\wsjtx_install\CALL3.TXT"; DestDir: "{app}"; Source: "c:\Users\joe\wsjt\wsjtx\WSJT-X_Users_Guide.pdf"; DestDir: "{app}"; -Source: "c:\Users\joe\wsjt\QtSupport\*.dll"; DestDir: "{sys}"; Flags: onlyifdoesntexist +Source: "c:\Users\joe\wsjt\QtSupport\*.dll"; DestDir: "{app}"; Flags: onlyifdoesntexist Source: "c:\Users\joe\wsjt\wsjtx_install\save\Samples\000000_0000.wav"; DestDir: "{app}\save\Samples"; [Icons]