From d64fb9826e80956ab4ab817cf28ce51899531e7e Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 13 Jun 2015 14:24:54 +0000 Subject: [PATCH] Add UTC to WSPR Tx dividing line; add WSPR Rx dividing line when no decodes; increase ranges of Gaiz/Zero sliders on Echo Graph. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5605 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- echograph.ui | 6 +++--- mainwindow.cpp | 29 +++++++++++++++++++++++------ mainwindow.h | 1 + 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/echograph.ui b/echograph.ui index 95d5e6cca..07e5c8057 100644 --- a/echograph.ui +++ b/echograph.ui @@ -118,10 +118,10 @@ - -20 + -30 - 20 + 30 Qt::Horizontal @@ -154,7 +154,7 @@ - -50 + -150 150 diff --git a/mainwindow.cpp b/mainwindow.cpp index eef65bdf5..b5c0904ac 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -2147,7 +2147,8 @@ void MainWindow::guiUpdate() if(m_auto and m_mode=="Echo" and m_bEchoTxOK) progressBar->setValue( int(100*m_s6/6.0)); - if(nsec != m_sec0) { //Once per second +//Once per second: + if(nsec != m_sec0) { if(m_mode!="Echo") { int ipct=0; if(m_monitoring or m_transmitting) ipct=int(100*m_nseq/txDuration); @@ -2221,7 +2222,8 @@ void MainWindow::startTx2() if (m_config.TX_messages ()) { t = " Transmitting " + m_mode + " ----------------------- " + m_config.bands ()->find (m_dialFreq); - ui->decodedTextBrowser->appendText(t.rightJustified (71, '-')); + t=WSPR_hhmm(0) + ' ' + t.rightJustified (66, '-'); + ui->decodedTextBrowser->appendText(t); } QFile f {m_dataDir.absoluteFilePath ("ALL_WSPR.TXT")}; @@ -4099,7 +4101,15 @@ void MainWindow::p1ReadFromStdout() //p1readFromStdout while(p1.canReadLine()) { QString t(p1.readLine()); if(t.indexOf("") >= 0) { - if(!m_diskData) WSPR_history(m_dialFreqRxWSPR, m_nWSPRdecodes); + if(!m_diskData) { + WSPR_history(m_dialFreqRxWSPR, m_nWSPRdecodes); + if(m_nWSPRdecodes==0) { + t = " Receiving " + m_mode + " ----------------------- " + + m_config.bands ()->find (m_dialFreqRxWSPR); + t=WSPR_hhmm(-60) + ' ' + t.rightJustified (66, '-'); + ui->decodedTextBrowser->appendText(t); + } + } m_nWSPRdecodes=0; ui->DecodeButton->setChecked (false); if(m_uploadSpots) { @@ -4188,13 +4198,20 @@ void MainWindow::p1ReadFromStdout() //p1readFromStdout } } +QString MainWindow::WSPR_hhmm(int n) +{ + QDateTime t=QDateTime::currentDateTimeUtc().addSecs(n); + int m=t.toString("hhmm").toInt()/2; + QString t1; + t1.sprintf("%04d",2*m); + return t1; +} + void MainWindow::WSPR_history(Frequency dialFreq, int ndecodes) { QDateTime t=QDateTime::currentDateTimeUtc().addSecs(-60); QString t1=t.toString("yyMMdd"); - QString t2=t.toString("hhmm"); - int n=t2.toInt()/2; - t2.sprintf("%04d",2*n); + QString t2=WSPR_hhmm(-60); QString t3; t3.sprintf("%13.6f",0.000001*dialFreq); if(ndecodes<0) { diff --git a/mainwindow.h b/mainwindow.h index 29c1bcd57..d4aae6924 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -512,6 +512,7 @@ private: void WSPR_scheduling (); void astroCalculations (QDateTime const&, bool adjust); void WSPR_history(Frequency dialFreq, int ndecodes); + QString WSPR_hhmm(int n); }; extern void getfile(QString fname, int ntrperiod);