mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-21 19:55:20 -05:00
Display original UTC on waterfall for data read from .wav files. Should replace "sprintf" in plotter.cpp lines 263 and 265.
This commit is contained in:
parent
61ba34a0b4
commit
75fbe1cb13
@ -1443,6 +1443,7 @@ void MainWindow::dataSink(qint64 frames)
|
||||
dec_data.params.ndiskdat=1;
|
||||
} else {
|
||||
dec_data.params.ndiskdat=0;
|
||||
m_wideGraph->setDiskUTC(-1);
|
||||
}
|
||||
|
||||
m_bUseRef=m_wideGraph->useRef();
|
||||
@ -2864,6 +2865,7 @@ void MainWindow::on_actionDecode_remaining_files_in_directory_triggered()
|
||||
|
||||
void MainWindow::diskDat() //diskDat()
|
||||
{
|
||||
m_wideGraph->setDiskUTC(dec_data.params.nutc);
|
||||
if(dec_data.params.kin>0) {
|
||||
int k;
|
||||
int kstep=m_FFTSize;
|
||||
|
@ -246,13 +246,24 @@ void CPlotter::draw(float swide[], bool bScroll, bool bRed)
|
||||
if(m_line == painter1.fontMetrics ().height ()) {
|
||||
painter1.setPen(Qt::white);
|
||||
QString t;
|
||||
qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000;
|
||||
int n = fmod(0.001*ms,m_TRperiod);
|
||||
QDateTime t1=QDateTime::currentDateTimeUtc().addSecs(-n);
|
||||
if(m_TRperiod<60.0) {
|
||||
t=t1.toString("hh:mm:ss") + " " + m_rxBand;
|
||||
if(m_nUTC<0) {
|
||||
qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000;
|
||||
int n = fmod(0.001*ms,m_TRperiod);
|
||||
QDateTime t1=QDateTime::currentDateTimeUtc().addSecs(-n);
|
||||
if(m_TRperiod<60.0) {
|
||||
t=t1.toString("hh:mm:ss") + " " + m_rxBand;
|
||||
} else {
|
||||
t=t1.toString("hh:mm") + " " + m_rxBand;
|
||||
}
|
||||
} else {
|
||||
t=t1.toString("hh:mm") + " " + m_rxBand;
|
||||
int ih=m_nUTC/10000;
|
||||
int im=(m_nUTC - 10000*ih)/100;
|
||||
int is=m_nUTC%100;
|
||||
if(m_TRperiod<60) {
|
||||
t.sprintf("%02d:%02d:%02d",ih,im,is) + " " + m_rxBand;
|
||||
} else {
|
||||
t.sprintf("%02d:%02d",ih,im) + " " + m_rxBand;
|
||||
}
|
||||
}
|
||||
painter1.drawText (5, painter1.fontMetrics ().ascent (), t);
|
||||
}
|
||||
@ -882,3 +893,8 @@ void CPlotter::setRedFile(QString fRed)
|
||||
{
|
||||
m_redFile=fRed;
|
||||
}
|
||||
|
||||
void CPlotter::setDiskUTC(int nutc)
|
||||
{
|
||||
m_nUTC=nutc;
|
||||
}
|
||||
|
@ -87,6 +87,7 @@ public:
|
||||
void setRedFile(QString fRed);
|
||||
void setFST4_FreqRange(int fLow,int fHigh);
|
||||
void setSingleDecode(bool b);
|
||||
void setDiskUTC(int nutc);
|
||||
|
||||
bool scaleOK () const {return m_bScaleOK;}
|
||||
signals:
|
||||
@ -136,6 +137,7 @@ private:
|
||||
qint32 m_ib;
|
||||
qint32 m_nfa;
|
||||
qint32 m_nfb;
|
||||
qint32 m_nUTC;
|
||||
|
||||
QPixmap m_WaterfallPixmap;
|
||||
QPixmap m_2DPixmap;
|
||||
|
@ -542,3 +542,8 @@ void WideGraph::setRedFile(QString fRed)
|
||||
{
|
||||
ui->widePlot->setRedFile(fRed);
|
||||
}
|
||||
|
||||
void WideGraph::setDiskUTC(int nutc)
|
||||
{
|
||||
ui->widePlot->setDiskUTC(nutc);
|
||||
}
|
||||
|
@ -51,6 +51,7 @@ public:
|
||||
void setRedFile(QString fRed);
|
||||
void setFST4_FreqRange(int fLow,int fHigh);
|
||||
void setSingleDecode(bool b);
|
||||
void setDiskUTC(int nutc);
|
||||
|
||||
signals:
|
||||
void freezeDecode2(int n);
|
||||
|
Loading…
Reference in New Issue
Block a user