From e98231d4c1444d7453388d575ae747e72e6b6ef3 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 29 Jan 2019 10:39:34 -0500 Subject: [PATCH] Correct the call to genft4(); fix the displayed time for data from disk. --- lib/ft4/ft4_decode.f90 | 2 +- widgets/mainwindow.cpp | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/ft4/ft4_decode.f90 b/lib/ft4/ft4_decode.f90 index ed7e8275d..790553bd1 100644 --- a/lib/ft4/ft4_decode.f90 +++ b/lib/ft4/ft4_decode.f90 @@ -40,7 +40,7 @@ subroutine ft4_decode(cdatetime0,nfqso,iwave,ndecodes,mycall,hiscall,nrx,line) data first/.true./ save one - hhmmss=cdatetime0(12:17) + hhmmss=cdatetime0(8:13) fs=12000.0/NDOWN !Sample rate dt=1/fs !Sample interval after downsample (s) tt=NSPS*dt !Duration of "itone" symbols (s) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 7a9a96853..10149dce9 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -99,7 +99,7 @@ extern "C" { void genft8_(char* msg, int* i3, int* n3, char* msgsent, char ft8msgbits[], int itone[], fortran_charlen_t, fortran_charlen_t); - void genft4_(char* msg, int* ichk, char* msgsent, int itone[], int* itype, + void genft4_(char* msg, int* ichk, char* msgsent, int itone[], fortran_charlen_t, fortran_charlen_t); void gen4_(char* msg, int* ichk, char* msgsent, int itone[], @@ -8631,9 +8631,13 @@ void MainWindow::ft4Data(int k) dec_data.params.kin=k; } - auto time = QDateTime::currentDateTimeUtc (); - QString t=time.toString("yyMMdd_hhmmss.sss"); - QByteArray ba=time.toString("yyMMdd_hhmmss.sss").toLatin1(); + QByteArray ba; + if(m_diskData) { + ba=(m_fileDateTime + ".000").toLatin1(); + } else { + auto time = QDateTime::currentDateTimeUtc (); + ba=time.toString("yyMMdd_hhmmss.sss").toLatin1(); + } char* cdatetime=ba.data(); char mycall6[] ="K1JT "; char hiscall6[]="K9AN "; @@ -8694,8 +8698,7 @@ void MainWindow::ft4_tx(int ntx) if(m_ntx == 6) ba=ui->tx6->text().toLocal8Bit(); ba2msg(ba,message); int ichk=0; - int itype=-1; - genft4_(message, &ichk, msgsent, const_cast(itone), &itype, 37, 37); + genft4_(message, &ichk, msgsent, const_cast(itone), 37, 37); msgsent[37]=0; m_currentMessage = QString::fromLatin1(msgsent).trimmed(); tx_status_label.setStyleSheet("QLabel{background-color: #ffff33}");