From 07c753e284c3ffd63e5e2decdbf7bf93cabfbc2e Mon Sep 17 00:00:00 2001 From: Steven Franke Date: Thu, 5 Mar 2020 11:16:56 -0600 Subject: [PATCH] Make ALL.TXT Rx timestamp equal to the beginning of the TR period, even if the decode comes in after the start of the next TR period. Make Tx timestamp the actual time that Tx started. --- widgets/mainwindow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 4b3e2d31a..be133016c 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -8746,7 +8746,11 @@ void MainWindow::write_all(QString txRx, QString message) t.sprintf("%5d",ui->TxFreqSpinBox->value()); if (txRx=="Tx") msg=" 0 0.0" + t + " " + message; auto time = QDateTime::currentDateTimeUtc (); - time = time.addSecs(-fmod(double(time.time().second()-0.4*m_TRperiod),m_TRperiod)); + double tdec = fmod(double(time.time().second()),m_TRperiod); + if( txRx=="Rx" && tdec < 0.4*m_TRperiod ) { + tdec+=m_TRperiod; + } + if( txRx=="Rx" ) time = time.addSecs(-tdec); t.sprintf("%10.3f ",m_freqNominal/1.e6); if (m_diskData) { if (m_fileDateTime.size()==11) {