From 2fcf6c45fe82b9ece9745ff6d5141a1170295d19 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 16 Dec 2022 13:06:44 -0500 Subject: [PATCH] Fix a flaw that prevented Q65W decodes from being displayed in its main window. --- q65w/commons.h | 3 ++- q65w/libq65/decode0.f90 | 1 - q65w/libq65/q65wa.f90 | 1 - q65w/mainwindow.cpp | 7 +++++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/q65w/commons.h b/q65w/commons.h index 405d44fd9..c5244be57 100644 --- a/q65w/commons.h +++ b/q65w/commons.h @@ -86,7 +86,8 @@ extern struct { //This is "common/datcom/..." in Fortran extern struct { int ndecodes; int ncand; - int nQDecoderBusy; + int nQDecoderDone; + int nWDecoderBusy; int nWTransmitting; char result[50][60]; } decodes_; diff --git a/q65w/libq65/decode0.f90 b/q65w/libq65/decode0.f90 index ffb330f90..772b3bb4a 100644 --- a/q65w/libq65/decode0.f90 +++ b/q65w/libq65/decode0.f90 @@ -46,7 +46,6 @@ subroutine decode0(dd,ss,savg) mousedf,mousefqso,nagain,ndecdone,nfshift,max_drift, & nfcal,mycall,hiscall,hisgrid,nhsym,nfsample,nmode,ndop00) call timer('q65wa ',1) - flush(6) return end subroutine decode0 diff --git a/q65w/libq65/q65wa.f90 b/q65w/libq65/q65wa.f90 index 479e1294a..1bd8bcb65 100644 --- a/q65w/libq65/q65wa.f90 +++ b/q65w/libq65/q65wa.f90 @@ -70,7 +70,6 @@ subroutine q65wa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb, & if(idec.ge.0) candec(icand)=.true. enddo ! icand ndecdone=2 - nQDecoderDone=1 return end subroutine q65wa diff --git a/q65w/mainwindow.cpp b/q65w/mainwindow.cpp index 46885a83e..e9492b304 100644 --- a/q65w/mainwindow.cpp +++ b/q65w/mainwindow.cpp @@ -743,7 +743,7 @@ void MainWindow::decoderFinished() //diskWriteFinished m_startAnother=m_loopall; ui->DecodeButton->setStyleSheet(""); decodeBusy(false); - + decodes_.nQDecoderDone=1; QString t1; t1=t1.asprintf(" %3d/%d ",decodes_.ndecodes,decodes_.ncand); lab5->setText(t1); @@ -908,6 +908,7 @@ void MainWindow::decode() //decode() decodes_.ndecodes=0; decodes_.ncand=0; + decodes_.nQDecoderDone=0; m_fetched=0; int itimer=0; watcher3.setFuture(QtConcurrent::run (std::bind (q65c_, &itimer))); @@ -952,9 +953,10 @@ void MainWindow::guiUpdate() on_actionOpen_next_in_directory_triggered(); } - if(decodes_.ndecodes>m_fetched) { + if(decodes_.ndecodes > m_fetched) { while(m_fetcheddecodedTextBrowser->append(t.trimmed()); m_fetched++; } @@ -965,6 +967,7 @@ void MainWindow::guiUpdate() if(nsec != m_sec0) { //Once per second // qDebug() << "AAA" << nsec%60 << ipc_wsjtx[3] << ipc_wsjtx[4]<< m_monitoring; +// qDebug() << "BBB" << nsec%60 << decodes_.ndecodes << m_fetched; if(m_pctZap>30.0) { lab4->setStyleSheet("QLabel{background-color: #ff0000}");