mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-13 15:41:50 -05:00
Correct the times displayed in Wide Graph in WSPR-LF mode.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7684 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
22e45c24e6
commit
e940b807ac
11
plotter.cpp
11
plotter.cpp
@ -97,7 +97,7 @@ void CPlotter::paintEvent(QPaintEvent *) // paint
|
|||||||
void CPlotter::draw(float swide[], bool bScroll, bool bRed)
|
void CPlotter::draw(float swide[], bool bScroll, bool bRed)
|
||||||
{
|
{
|
||||||
int j,j0;
|
int j,j0;
|
||||||
static int jtop=0,ktop=0;
|
static int ktop=0;
|
||||||
float y,y2,ymin;
|
float y,y2,ymin;
|
||||||
double fac = sqrt(m_binsPerPixel*m_waterfallAvg/15.0);
|
double fac = sqrt(m_binsPerPixel*m_waterfallAvg/15.0);
|
||||||
double gain = fac*pow(10.0,0.02*m_plotGain);
|
double gain = fac*pow(10.0,0.02*m_plotGain);
|
||||||
@ -193,7 +193,6 @@ void CPlotter::draw(float swide[], bool bScroll, bool bRed)
|
|||||||
painter2D.drawPolyline(LineBuf2,ktop);
|
painter2D.drawPolyline(LineBuf2,ktop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
jtop=j;
|
|
||||||
LineBuf[j].setX(i);
|
LineBuf[j].setX(i);
|
||||||
LineBuf[j].setY(int(0.9*m_h2-y2*m_h2/70.0));
|
LineBuf[j].setY(int(0.9*m_h2-y2*m_h2/70.0));
|
||||||
if(y2<y2min) y2min=y2;
|
if(y2<y2min) y2min=y2;
|
||||||
@ -205,13 +204,13 @@ void CPlotter::draw(float swide[], bool bScroll, bool bRed)
|
|||||||
if(m_line == painter1.fontMetrics ().height ()) {
|
if(m_line == painter1.fontMetrics ().height ()) {
|
||||||
painter1.setPen(Qt::white);
|
painter1.setPen(Qt::white);
|
||||||
QString t;
|
QString t;
|
||||||
|
qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000;
|
||||||
|
int n=(ms/1000) % m_TRperiod;
|
||||||
|
QDateTime t1=QDateTime::currentDateTimeUtc().addSecs(-n);
|
||||||
if(m_TRperiod < 60) {
|
if(m_TRperiod < 60) {
|
||||||
qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000;
|
|
||||||
int n=(ms/1000) % m_TRperiod;
|
|
||||||
QDateTime t1=QDateTime::currentDateTimeUtc().addSecs(-n);
|
|
||||||
t=t1.toString("hh:mm:ss") + " " + m_rxBand;
|
t=t1.toString("hh:mm:ss") + " " + m_rxBand;
|
||||||
} else {
|
} else {
|
||||||
t=QDateTime::currentDateTimeUtc().toString("hh:mm") + " " + m_rxBand;
|
t=t1.toString("hh:mm") + " " + m_rxBand;
|
||||||
}
|
}
|
||||||
painter1.drawText (5, painter1.fontMetrics ().ascent (), t);
|
painter1.drawText (5, painter1.fontMetrics ().ascent (), t);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user