From 90b49ddc0ae3d102720adc51df7ae19d40abf786 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 22 Dec 2022 13:54:37 -0500 Subject: [PATCH] Don't save to a *.iq file if WSJT-X transmitted for 10 or more seconds. --- q65w/mainwindow.cpp | 18 ++++++++++++++---- q65w/mainwindow.h | 1 + 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/q65w/mainwindow.cpp b/q65w/mainwindow.cpp index 404ce2c62..7f35e6750 100644 --- a/q65w/mainwindow.cpp +++ b/q65w/mainwindow.cpp @@ -352,7 +352,7 @@ void MainWindow::dataSink(int k) ndiskdat=0; datcom_.ndiskdat=0; } -// Get x and y power, polarized spectrum, nkhz, and ihsym +// Get power, spectrum, nkhz, and ihsym nb=0; if(m_NB) nb=1; nfsample=96000; @@ -427,13 +427,14 @@ void MainWindow::dataSink(int k) // qDebug() << "aa" << "Decoder called" << ihsym << ipc_wsjtx[0] << ipc_wsjtx[1] // << ipc_wsjtx[2] << ipc_wsjtx[3] << ipc_wsjtx[4] ; decode(); //Start the decoder - if(m_saveAll and !m_diskData) { + if(m_saveAll and !m_diskData and m_nTransmitted<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; } soundInThread.m_dataSinkBusy=false; @@ -984,8 +985,17 @@ 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; + static int n60z=99; + int n60=nsec%60; + int itest[5]; + mem_q65w.lock(); + memcpy(&itest, (char*)ipc_wsjtx, 20); + mem_q65w.unlock(); + if(itest[4]==1) m_nTransmitted++; +// qDebug() << "AAA" << n60 << itest[0] << itest[1] << itest[2] << itest[3] << itest[4] +// << m_nTransmitted; + if(n6030.0) { lab2->setStyleSheet("QLabel{background-color: #ff0000}"); diff --git a/q65w/mainwindow.h b/q65w/mainwindow.h index 837581137..adce783d6 100644 --- a/q65w/mainwindow.h +++ b/q65w/mainwindow.h @@ -122,6 +122,7 @@ private: qint32 m_dB; qint32 m_fetched=0; qint32 m_hsymStop=302; + qint32 m_nTransmitted=0; double m_fAdd; double m_xavg;