From 07e82b0c4020dbe90a433698a2645c78f7c26e9b Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 5 Jan 2024 14:11:05 -0500 Subject: [PATCH] Try to fix saving of ntx30[ab] in qm files. --- qmap/libqmap/read_qm.f90 | 5 ++++- qmap/mainwindow.cpp | 21 ++++++++++----------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/qmap/libqmap/read_qm.f90 b/qmap/libqmap/read_qm.f90 index c7d977ae4..b01bba4d5 100644 --- a/qmap/libqmap/read_qm.f90 +++ b/qmap/libqmap/read_qm.f90 @@ -7,7 +7,10 @@ subroutine read_qm(fname) real*8 fcenter integer nxtra(15) !For possible future additions integer*1 id1(2,NMAX) - common/datcom/dd(2,5760000),ss(400,NFFT),savg(NFFT),fcenter,nutc,junk(NJUNK) + common/datcom/dd(2,5760000),ss(400,NFFT),savg(NFFT), & + fcenter,nutc,fselected,mousedf,mousefqso,nagain, & + ndepth,ndiskdat,ntx60,newdat,nn1,nn2,nfcal,nfshift, & + ntx30a,ntx30b !... open(28,file=trim(fname),status='old',access='stream',err=900) read(28) prog_id,mycall,mygrid,fcenter,nutc,ntx30a,ntx30b,ndop00,ndop58, & diff --git a/qmap/mainwindow.cpp b/qmap/mainwindow.cpp index 774fed178..012e02d2a 100644 --- a/qmap/mainwindow.cpp +++ b/qmap/mainwindow.cpp @@ -419,7 +419,8 @@ void MainWindow::dataSink(int k) *future2 = QtConcurrent::run(save_iq, fname); watcher2->setFuture(*future2); QString t{"QMAP v" + QCoreApplication::applicationVersion() + " " + revision()}; -// qDebug() << "aa" << t.simplified() << m_myCall << m_myGrid << datcom_.fcenter; +// qDebug() << "aa" << t.simplified() << m_myCall << m_myGrid << datcom_.fcenter +// << m_nTx30a << m_nTx30b << datcom2_.ntx30a << datcom2_.ntx30b; save_qm_(fname.toLatin1(), t.toLatin1(), m_myCall.toLatin1(), m_myGrid.toLatin1(), datcom2_.d4, &datcom2_.ntx30a, &datcom2_.ntx30b, &datcom2_.fcenter, &datcom2_.nutc, &m_dop00, &m_dop58, @@ -835,12 +836,6 @@ void MainWindow::freezeDecode(int n) //freezeDecode() void MainWindow::decode() //decode() { if(m_decoderBusy) return; //Don't attempt decode if decoder already busy - if(m_nTx60>10) return; //Don't decode if WSJT-X transmitted too much in 60 s mode -//No need to call decoder for first half, if we transmitted in the first half: - if((datcom_.nhsym<=200) and (m_nTx30a>5)) return; -//No need to call decoder in second half, if we transmitted in that half: - if((datcom_.nhsym>200) and (m_nTx30b>5)) return; - QString fname=" "; ui->DecodeButton->setStyleSheet(m_pbdecoding_style1); @@ -914,10 +909,14 @@ void MainWindow::decode() //decode() decodes_.ncand=0; decodes_.nQDecoderDone=0; - if(m_nTx30a<5 or m_nTx30b<5 ) { - watcher3.setFuture(QtConcurrent::run (std::bind (q65c_, &m_zero))); - decodeBusy(true); - } +//No need to call decoder for first half, if we transmitted in the first half: + if((datcom_.nhsym<=200) and (m_nTx30a>5)) return; + +//No need to call decoder in second half, if we transmitted in that half: + if((datcom_.nhsym>200) and (m_nTx30b>5)) return; + + watcher3.setFuture(QtConcurrent::run (std::bind (q65c_, &m_zero))); + decodeBusy(true); } void MainWindow::on_EraseButton_clicked()