Correct the call to genft4(); fix the displayed time for data from disk.

This commit is contained in:
Joe Taylor 2019-01-29 10:39:34 -05:00
parent 7a9240c9ef
commit e98231d4c1
2 changed files with 10 additions and 7 deletions

View File

@ -40,7 +40,7 @@ subroutine ft4_decode(cdatetime0,nfqso,iwave,ndecodes,mycall,hiscall,nrx,line)
data first/.true./ data first/.true./
save one save one
hhmmss=cdatetime0(12:17) hhmmss=cdatetime0(8:13)
fs=12000.0/NDOWN !Sample rate fs=12000.0/NDOWN !Sample rate
dt=1/fs !Sample interval after downsample (s) dt=1/fs !Sample interval after downsample (s)
tt=NSPS*dt !Duration of "itone" symbols (s) tt=NSPS*dt !Duration of "itone" symbols (s)

View File

@ -99,7 +99,7 @@ extern "C" {
void genft8_(char* msg, int* i3, int* n3, char* msgsent, char ft8msgbits[], void genft8_(char* msg, int* i3, int* n3, char* msgsent, char ft8msgbits[],
int itone[], fortran_charlen_t, fortran_charlen_t); 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); fortran_charlen_t, fortran_charlen_t);
void gen4_(char* msg, int* ichk, char* msgsent, int itone[], void gen4_(char* msg, int* ichk, char* msgsent, int itone[],
@ -8631,9 +8631,13 @@ void MainWindow::ft4Data(int k)
dec_data.params.kin=k; dec_data.params.kin=k;
} }
auto time = QDateTime::currentDateTimeUtc (); QByteArray ba;
QString t=time.toString("yyMMdd_hhmmss.sss"); if(m_diskData) {
QByteArray ba=time.toString("yyMMdd_hhmmss.sss").toLatin1(); ba=(m_fileDateTime + ".000").toLatin1();
} else {
auto time = QDateTime::currentDateTimeUtc ();
ba=time.toString("yyMMdd_hhmmss.sss").toLatin1();
}
char* cdatetime=ba.data(); char* cdatetime=ba.data();
char mycall6[] ="K1JT "; char mycall6[] ="K1JT ";
char hiscall6[]="K9AN "; char hiscall6[]="K9AN ";
@ -8694,8 +8698,7 @@ void MainWindow::ft4_tx(int ntx)
if(m_ntx == 6) ba=ui->tx6->text().toLocal8Bit(); if(m_ntx == 6) ba=ui->tx6->text().toLocal8Bit();
ba2msg(ba,message); ba2msg(ba,message);
int ichk=0; int ichk=0;
int itype=-1; genft4_(message, &ichk, msgsent, const_cast<int *>(itone), 37, 37);
genft4_(message, &ichk, msgsent, const_cast<int *>(itone), &itype, 37, 37);
msgsent[37]=0; msgsent[37]=0;
m_currentMessage = QString::fromLatin1(msgsent).trimmed(); m_currentMessage = QString::fromLatin1(msgsent).trimmed();
tx_status_label.setStyleSheet("QLabel{background-color: #ffff33}"); tx_status_label.setStyleSheet("QLabel{background-color: #ffff33}");