1
0
mirror of https://github.com/saitohirga/WSJT-X.git synced 2025-04-10 05:19:12 -04:00

Don't save to a *.iq file if WSJT-X transmitted for 10 or more seconds.

This commit is contained in:
Joe Taylor 2022-12-22 13:54:37 -05:00
parent 88cbc521bd
commit 90b49ddc0a
2 changed files with 15 additions and 4 deletions

View File

@ -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(n60<n60z) m_nTransmitted=0;
n60z=n60;
if(m_pctZap>30.0) {
lab2->setStyleSheet("QLabel{background-color: #ff0000}");

View File

@ -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;