Correct time on beacon mode Tx prints in decodes window

This commit is contained in:
Bill Somerville 2020-07-27 19:51:56 +01:00
parent 08d20e4366
commit 0f3fc3d15c
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F

View File

@ -4291,7 +4291,7 @@ void MainWindow::startTx2()
if (m_config.TX_messages ()) {
t = " Transmitting " + m_mode + " ----------------------- " +
m_config.bands ()->find (m_freqNominal);
t=beacon_start_time () + ' ' + t.rightJustified (66, '-');
t=beacon_start_time (m_TRperiod / 2) + ' ' + t.rightJustified (66, '-');
ui->decodedTextBrowser->appendText(t);
}
write_all("Tx",m_currentMessage);
@ -7914,14 +7914,15 @@ void MainWindow::p1ReadFromStdout() //p1readFromStdout
QString MainWindow::beacon_start_time (int n)
{
auto time = QDateTime::currentDateTimeUtc ().addSecs (n).time ();
auto rounded_time = (int ((time.hour () * 10000 + time.minute () * 100 + time.second ()) * 60 / m_TRperiod) * int (m_TRperiod)) / 60;
auto result = QString::number (rounded_time).rightJustified (6, QLatin1Char {'0'});
auto bt = qt_truncate_date_time_to (QDateTime::currentDateTimeUtc ().addSecs (n), m_TRperiod);
if (m_TRperiod < 60)
{
return result;
return bt.toString ("HHmmss");
}
else
{
return bt.toString ("HHmm");
}
return result.left (4);
}
void MainWindow::WSPR_history(Frequency dialFreq, int ndecodes)