diff --git a/qmap/libqmap/decode0.f90 b/qmap/libqmap/decode0.f90 index a31698dee..c58208667 100644 --- a/qmap/libqmap/decode0.f90 +++ b/qmap/libqmap/decode0.f90 @@ -49,6 +49,8 @@ subroutine decode0(dd,ss,savg) nfcal,mycall,hiscall,hisgrid,nfsample,nmode,ndepth, & datetime,ndop00,fselected) call timer('qmapa ',1) + ndecodes=ndecodes+1 + result(ndecodes)='QMAP decoding finished' return end subroutine decode0 diff --git a/qmap/libqmap/q65b.f90 b/qmap/libqmap/q65b.f90 index 5606e387c..a602c84c5 100644 --- a/qmap/libqmap/q65b.f90 +++ b/qmap/libqmap/q65b.f90 @@ -128,7 +128,7 @@ subroutine q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, & if(ndf.lt.-500) ikhz1=ikhz + (nq65df-500)/1000 ndf=nq65df - 1000*(ikhz1-ikhz) freq1=freq0 + 0.001d0*(ikhz1-ikhz) - ndecodes=ndecodes+1 + ndecodes=min(ndecodes+1,50-1) frx=0.001*k0*df+nkhz_center-48.0+1.0 - 0.001*nfcal fsked=frx - 0.001*ndop00/2.0 - 0.001*offset ctmp=csubmode//' '//trim(msg0) diff --git a/qmap/mainwindow.cpp b/qmap/mainwindow.cpp index ce8d9c0a6..d22194e49 100644 --- a/qmap/mainwindow.cpp +++ b/qmap/mainwindow.cpp @@ -412,14 +412,15 @@ void MainWindow::dataSink(int k) QDateTime t = QDateTime::currentDateTimeUtc(); m_dateTime=t.toString("yyMMdd_hhmm"); decode(); //Start the decoder - if(m_saveAll and !m_diskData and m_nTransmitted<30) { + if(m_saveAll and !m_diskData and (m_nTx30<5 and m_nTx60<10)) { QString fname=m_saveDir + "/" + t.date().toString("yyMMdd") + "_" + t.time().toString("hhmm"); fname += ".iq"; *future2 = QtConcurrent::run(savetf2, fname, false); watcher2->setFuture(*future2); } - m_nTransmitted=0; + m_nTx30=0; + m_nTx60=0; } soundInThread.m_dataSinkBusy=false; } @@ -798,10 +799,8 @@ void MainWindow::freezeDecode(int n) //freezeDecode() void MainWindow::decode() //decode() { -//Don't attempt to decode if decoder is already busy, or if we transmitted for 10 s or more. - if(m_decoderBusy) return; - if(m_WSJTX_TRperiod==60 and m_nTransmitted>10) return; - if(m_WSJTX_TRperiod==30 and m_nTransmitted>35) return; + if(m_decoderBusy) return; //Don't attempt decode if decoder already busy + if(m_nTx30>5 or m_nTx60>10) return; //Don't decode if WSJT-X transmitted too much QString fname=" "; ui->DecodeButton->setStyleSheet(m_pbdecoding_style1); @@ -876,7 +875,7 @@ void MainWindow::decode() //decode() } else { memcpy(datcom_.datetime, m_dateTime.toLatin1(), 11); } - datcom_.junk1=1234; //Cecck for these values in m65 + datcom_.junk1=1234; //Check for these values in m65 datcom_.junk2=5678; char *to = (char*) datcom2_.d4; @@ -939,9 +938,10 @@ void MainWindow::guiUpdate() if(decodes_.ndecodes > m_fetched) { while(m_fetcheddecodedTextBrowser->append(t1.repeated(56)); + ui->decodedTextBrowser->append(t1.repeated(60)); m_nline++; QTextCursor cursor(ui->decodedTextBrowser->document()->findBlockByLineNumber(m_nline-1)); QTextBlockFormat f = cursor.blockFormat(); @@ -963,6 +963,7 @@ void MainWindow::guiUpdate() cursor.setBlockFormat(f); } } + t1=""; t1=t1.asprintf("%.3f",datcom_.fcenter); ui->labFreq->setText(t1); @@ -977,10 +978,15 @@ void MainWindow::guiUpdate() mem_qmap.unlock(); if(itest[4]>0) { m_WSJTX_TRperiod=itest[4]; - m_nTransmitted++; //0 if WSJT-X is not transmitting, otherwise TRperiod + if(m_WSJTX_TRperiod==30) m_nTx30++; + if(m_WSJTX_TRperiod==60) m_nTx60++; + } +// qDebug() << "AAA" << n60 << itest[0] << itest[1] << itest[2] << itest[3] << itest[4] +// << m_nTx30 << m_nTx60; + if(n6030.0) { diff --git a/qmap/mainwindow.h b/qmap/mainwindow.h index 68769a9f6..6a1d75d7d 100644 --- a/qmap/mainwindow.h +++ b/qmap/mainwindow.h @@ -114,7 +114,8 @@ private: qint32 m_dB; qint32 m_fetched=0; qint32 m_hsymStop=390; //390*0.15 = 58.5 s - qint32 m_nTransmitted=0; + qint32 m_nTx30=0; + qint32 m_nTx60=0; qint32 m_nDoubleClicked=0; qint32 m_nline=0; qint32 m_WSJTX_TRperiod=0; diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 16dafb3ea..3c49e544b 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -9637,6 +9637,7 @@ void MainWindow::readWidebandDecodes() // Recover and parse each decoded line. QString line=QString::fromLatin1(qmapcom.result[m_fetched]); m_fetched++; + if(m_fetched==qmapcom.ndecodes) break; nhr=line.mid(0,2).toInt(); nmin=line.mid(2,2).toInt(); nsec=line.mid(4,2).toInt();