diff options
| author | Christoph Berg <myon@debian.org> | 2019-06-02 22:17:11 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2019-06-02 22:17:11 +0200 |
| commit | 851b658298afb9bafeda98ffbfa2ade612c656be (patch) | |
| tree | 826d54e9dac4ce15fdd1b6af3360eeba7993a7d2 /widgets/widegraph.cpp | |
| parent | b7238399ea4f1ca51d8f7b8f9220af3da0913edf (diff) | |
New upstream version 2.1.0~rc6+repackupstream/2.1.0_rc6+repack
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 |
