diff options
| author | Christoph Berg <myon@debian.org> | 2019-06-02 22:20:23 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2019-06-02 22:20:23 +0200 |
| commit | e6817de24bdd0a9f5677b07d6bff897a5db47794 (patch) | |
| tree | 1eba79fe1a06ab93d1025297cee39e95dfab98a4 /widgets/widegraph.cpp | |
| parent | 58a14345036378f9040e269fa276ba0c97795037 (diff) | |
| parent | 851b658298afb9bafeda98ffbfa2ade612c656be (diff) | |
Update upstream source from tag 'upstream/2.1.0_rc6+repack'
Update to upstream version '2.1.0~rc6+repack'
with Debian dir 2aba196aec0548f1bb333214231be9cc9efe2d4c
Diffstat (limited to 'widgets/widegraph.cpp')
| -rw-r--r-- | widgets/widegraph.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/widgets/widegraph.cpp b/widgets/widegraph.cpp index 1f3110ce..6234f731 100644 --- a/widgets/widegraph.cpp +++ b/widgets/widegraph.cpp @@ -5,6 +5,7 @@ #include <QSettings> #include <QDateTime> #include <QKeyEvent> +#include <math.h> #include "ui_widegraph.h" #include "commons.h" #include "Configuration.hpp" @@ -23,7 +24,7 @@ WideGraph::WideGraph(QSettings * settings, QWidget *parent) : ui(new Ui::WideGraph), m_settings (settings), m_palettes_path {":/Palettes"}, - m_ntr0 {0}, + m_tr0 {0.0}, m_n {0}, m_bHaveTransmitted {false} { @@ -186,9 +187,8 @@ void WideGraph::dataSink2(float s[], float df3, int ihsym, int ndiskdata) //dat // Time according to this computer qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000; - int ntr = (ms/1000) % m_TRperiod; - if((ndiskdata && ihsym <= m_waterfallAvg) || (!ndiskdata && - (ntr<m_ntr0 || (m_mode=="FT4" and m_bHaveTransmitted)))) { + double tr = fmod(0.001*ms,m_TRperiod); + if((ndiskdata && ihsym <= m_waterfallAvg) || (!ndiskdata && (tr<m_tr0))) { float flagValue=1.0e30; if(m_bHaveTransmitted) flagValue=2.0e30; for(int i=0; i<MAX_SCREENSIZE; i++) { @@ -199,7 +199,7 @@ void WideGraph::dataSink2(float s[], float df3, int ihsym, int ndiskdata) //dat } m_bHaveTransmitted=false; } - m_ntr0=ntr; + m_tr0=tr; ui->widePlot->draw(swide,true,false); } } @@ -278,11 +278,11 @@ int WideGraph::fSpan() return ui->widePlot->fSpan (); } -void WideGraph::setPeriod(int ntrperiod, int nsps) //SetPeriod +void WideGraph::setPeriod(double trperiod, int nsps) //SetPeriod { - m_TRperiod=ntrperiod; + m_TRperiod=trperiod; m_nsps=nsps; - ui->widePlot->setNsps(ntrperiod, nsps); + ui->widePlot->setNsps(trperiod, nsps); } void WideGraph::setTxFreq(int n) //setTxFreq |
