mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-09-03 21:57:48 -04:00
Clean up the timestamp adjustment logic, and make the threshold 0.5*TRperiod.
This commit is contained in:
parent
cb687c7034
commit
6773768586
@ -8746,11 +8746,13 @@ void MainWindow::write_all(QString txRx, QString message)
|
|||||||
t.sprintf("%5d",ui->TxFreqSpinBox->value());
|
t.sprintf("%5d",ui->TxFreqSpinBox->value());
|
||||||
if (txRx=="Tx") msg=" 0 0.0" + t + " " + message;
|
if (txRx=="Tx") msg=" 0 0.0" + t + " " + message;
|
||||||
auto time = QDateTime::currentDateTimeUtc ();
|
auto time = QDateTime::currentDateTimeUtc ();
|
||||||
double tdec = fmod(double(time.time().second()),m_TRperiod);
|
if( txRx=="Rx" ) {
|
||||||
if( txRx=="Rx" && tdec < 0.4*m_TRperiod ) {
|
double tdec = fmod(double(time.time().second()),m_TRperiod);
|
||||||
tdec+=m_TRperiod;
|
if( tdec < 0.5*m_TRperiod ) {
|
||||||
|
tdec+=m_TRperiod;
|
||||||
|
}
|
||||||
|
time = time.addSecs(-tdec);
|
||||||
}
|
}
|
||||||
if( txRx=="Rx" ) time = time.addSecs(-tdec);
|
|
||||||
t.sprintf("%10.3f ",m_freqNominal/1.e6);
|
t.sprintf("%10.3f ",m_freqNominal/1.e6);
|
||||||
if (m_diskData) {
|
if (m_diskData) {
|
||||||
if (m_fileDateTime.size()==11) {
|
if (m_fileDateTime.size()==11) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user