From 5b47bbf22eccfcca8c917de4f4a189dbc94f7481 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 24 Oct 2016 14:56:14 +0000 Subject: [PATCH] Don't display dupes in JT65, even if minsync<0. Use VHFfeatures rather than single_decode to control display of Tol, etc., in plotter. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7224 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/jt65_decode.f90 | 3 ++- mainwindow.cpp | 7 +++---- plotter.cpp | 8 ++++++-- plotter.h | 2 ++ widegraph.cpp | 5 +++++ widegraph.h | 1 + 6 files changed, 19 insertions(+), 7 deletions(-) diff --git a/lib/jt65_decode.f90 b/lib/jt65_decode.f90 index 2f8df3c33..221eb0d9a 100644 --- a/lib/jt65_decode.f90 +++ b/lib/jt65_decode.f90 @@ -299,7 +299,8 @@ contains endif enddo - if(ndupe.ne.1 .or. minsync.lt.0) then +! if(ndupe.ne.1 .or. minsync.lt.0) then + if(ndupe.ne.1) then if(ipass.eq.1) n65a=n65a + 1 if(ipass.eq.2) n65b=n65b + 1 if(ndecoded.lt.50) ndecoded=ndecoded+1 diff --git a/mainwindow.cpp b/mainwindow.cpp index 058858267..bafe55f4c 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -133,7 +133,6 @@ int fast_jh {0}; int fast_jh2 {0}; int narg[15]; QVector g_ColorTbl; -bool g_single_decode; namespace { @@ -814,7 +813,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, } fixStop(); VHF_features_enabled(m_config.enable_VHF_features()); - g_single_decode=m_config.single_decode(); + m_wideGraph->setVHF(m_config.enable_VHF_features()); progressBar.setMaximum(m_TRperiod); m_modulator->setPeriod(m_TRperiod); // TODO - not thread safe @@ -1395,7 +1394,8 @@ void MainWindow::on_actionSettings_triggered() //Setup Dialog auto_tx_label.setText (m_config.quick_call () ? "Auto-Tx-Enable Armed" : "Auto-Tx-Enable Disarmed"); displayDialFrequency (); - bool vhf {m_config.enable_VHF_features ()}; + bool vhf {m_config.enable_VHF_features()}; + m_wideGraph->setVHF(vhf); if (!vhf) ui->sbSubmode->setValue (0); setup_status_bar (vhf); bool b = vhf && (m_mode=="JT4" or m_mode=="JT65" or m_mode=="ISCAT" or @@ -2940,7 +2940,6 @@ void MainWindow::guiUpdate() //Once per second: if(nsec != m_sec0) { - g_single_decode=m_config.single_decode(); if(m_auto and m_mode=="Echo" and m_bEchoTxOK) { progressBar.setMaximum(6); progressBar.setValue(int(m_s6)); diff --git a/plotter.cpp b/plotter.cpp index c036fd7ae..e28e817de 100644 --- a/plotter.cpp +++ b/plotter.cpp @@ -424,7 +424,7 @@ void CPlotter::DrawOverlay() //DrawOverlay() } if(m_mode=="JT9" or m_mode=="JT65" or m_mode=="JT9+JT65" or m_mode=="QRA64") { - if(m_mode=="QRA64" or (g_single_decode and m_mode=="JT65")) { + if(m_mode=="QRA64" or (m_mode=="JT65" and m_bVHF)) { painter0.setPen(penGreen); x1=XfromFreq(m_rxFreq-m_tol); x2=XfromFreq(m_rxFreq+m_tol); @@ -717,6 +717,10 @@ void CPlotter::SetPercent2DScreen(int percent) { m_Percent2DScreen=percent; resizeEvent(NULL); -// DrawOverlay(); update(); } +void CPlotter::setVHF(bool bVHF) +{ + m_bVHF=bVHF; + qDebug() << "A" << m_bVHF; +} diff --git a/plotter.h b/plotter.h index ae4f4de70..678106ddb 100644 --- a/plotter.h +++ b/plotter.h @@ -83,6 +83,7 @@ public: void setReference(bool b) {m_bReference = b;} bool Reference() const {return m_bReference;} void drawRed(int ia, int ib, float swide[]); + void setVHF(bool bVHF); signals: void freezeDecode1(int n); @@ -105,6 +106,7 @@ private: bool m_bReference; bool m_bReference0; bool m_lockTxFreq; + bool m_bVHF; float m_fSpan; diff --git a/widegraph.cpp b/widegraph.cpp index f4f21adc7..0c5d50c79 100644 --- a/widegraph.cpp +++ b/widegraph.cpp @@ -480,6 +480,11 @@ void WideGraph::setWSPRtransmitted() m_bHaveTransmitted=true; } +void WideGraph::setVHF(bool bVHF) +{ + ui->widePlot->setVHF(bVHF); +} + void WideGraph::on_sbPercent2dPlot_valueChanged(int n) { m_Percent2DScreen=n; diff --git a/widegraph.h b/widegraph.h index de33bf369..36ce6014b 100644 --- a/widegraph.h +++ b/widegraph.h @@ -47,6 +47,7 @@ public: void setRxBand(QString band); void setWSPRtransmitted(); void drawRed(int ia, int ib); + void setVHF(bool bVHF); signals: void freezeDecode2(int n);