mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-03-31 16:38:35 -04:00
Distinguish between m_nTx30 and m_nTx60. Add "QMAP decoding finished" so Active Stations will update.
This commit is contained in:
parent
717fd42ac1
commit
b0ea3a2eb5
@ -49,6 +49,8 @@ subroutine decode0(dd,ss,savg)
|
|||||||
nfcal,mycall,hiscall,hisgrid,nfsample,nmode,ndepth, &
|
nfcal,mycall,hiscall,hisgrid,nfsample,nmode,ndepth, &
|
||||||
datetime,ndop00,fselected)
|
datetime,ndop00,fselected)
|
||||||
call timer('qmapa ',1)
|
call timer('qmapa ',1)
|
||||||
|
ndecodes=ndecodes+1
|
||||||
|
result(ndecodes)='QMAP decoding finished'
|
||||||
|
|
||||||
return
|
return
|
||||||
end subroutine decode0
|
end subroutine decode0
|
||||||
|
@ -128,7 +128,7 @@ subroutine q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, &
|
|||||||
if(ndf.lt.-500) ikhz1=ikhz + (nq65df-500)/1000
|
if(ndf.lt.-500) ikhz1=ikhz + (nq65df-500)/1000
|
||||||
ndf=nq65df - 1000*(ikhz1-ikhz)
|
ndf=nq65df - 1000*(ikhz1-ikhz)
|
||||||
freq1=freq0 + 0.001d0*(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
|
frx=0.001*k0*df+nkhz_center-48.0+1.0 - 0.001*nfcal
|
||||||
fsked=frx - 0.001*ndop00/2.0 - 0.001*offset
|
fsked=frx - 0.001*ndop00/2.0 - 0.001*offset
|
||||||
ctmp=csubmode//' '//trim(msg0)
|
ctmp=csubmode//' '//trim(msg0)
|
||||||
|
@ -412,14 +412,15 @@ void MainWindow::dataSink(int k)
|
|||||||
QDateTime t = QDateTime::currentDateTimeUtc();
|
QDateTime t = QDateTime::currentDateTimeUtc();
|
||||||
m_dateTime=t.toString("yyMMdd_hhmm");
|
m_dateTime=t.toString("yyMMdd_hhmm");
|
||||||
decode(); //Start the decoder
|
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") + "_" +
|
QString fname=m_saveDir + "/" + t.date().toString("yyMMdd") + "_" +
|
||||||
t.time().toString("hhmm");
|
t.time().toString("hhmm");
|
||||||
fname += ".iq";
|
fname += ".iq";
|
||||||
*future2 = QtConcurrent::run(savetf2, fname, false);
|
*future2 = QtConcurrent::run(savetf2, fname, false);
|
||||||
watcher2->setFuture(*future2);
|
watcher2->setFuture(*future2);
|
||||||
}
|
}
|
||||||
m_nTransmitted=0;
|
m_nTx30=0;
|
||||||
|
m_nTx60=0;
|
||||||
}
|
}
|
||||||
soundInThread.m_dataSinkBusy=false;
|
soundInThread.m_dataSinkBusy=false;
|
||||||
}
|
}
|
||||||
@ -798,10 +799,8 @@ void MainWindow::freezeDecode(int n) //freezeDecode()
|
|||||||
|
|
||||||
void MainWindow::decode() //decode()
|
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; //Don't attempt decode if decoder already busy
|
||||||
if(m_decoderBusy) return;
|
if(m_nTx30>5 or m_nTx60>10) return; //Don't decode if WSJT-X transmitted too much
|
||||||
if(m_WSJTX_TRperiod==60 and m_nTransmitted>10) return;
|
|
||||||
if(m_WSJTX_TRperiod==30 and m_nTransmitted>35) return;
|
|
||||||
QString fname=" ";
|
QString fname=" ";
|
||||||
ui->DecodeButton->setStyleSheet(m_pbdecoding_style1);
|
ui->DecodeButton->setStyleSheet(m_pbdecoding_style1);
|
||||||
|
|
||||||
@ -876,7 +875,7 @@ void MainWindow::decode() //decode()
|
|||||||
} else {
|
} else {
|
||||||
memcpy(datcom_.datetime, m_dateTime.toLatin1(), 11);
|
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;
|
datcom_.junk2=5678;
|
||||||
|
|
||||||
char *to = (char*) datcom2_.d4;
|
char *to = (char*) datcom2_.d4;
|
||||||
@ -939,9 +938,10 @@ void MainWindow::guiUpdate()
|
|||||||
if(decodes_.ndecodes > m_fetched) {
|
if(decodes_.ndecodes > m_fetched) {
|
||||||
while(m_fetched<decodes_.ndecodes) {
|
while(m_fetched<decodes_.ndecodes) {
|
||||||
QString t=QString::fromLatin1(decodes_.result[m_fetched]);
|
QString t=QString::fromLatin1(decodes_.result[m_fetched]);
|
||||||
|
if(t.trimmed()=="QMAP decoding finished") break;
|
||||||
if(m_UTC0!="" and m_UTC0!=t.left(4)) {
|
if(m_UTC0!="" and m_UTC0!=t.left(4)) {
|
||||||
t1="-";
|
t1="-";
|
||||||
ui->decodedTextBrowser->append(t1.repeated(56));
|
ui->decodedTextBrowser->append(t1.repeated(60));
|
||||||
m_nline++;
|
m_nline++;
|
||||||
QTextCursor cursor(ui->decodedTextBrowser->document()->findBlockByLineNumber(m_nline-1));
|
QTextCursor cursor(ui->decodedTextBrowser->document()->findBlockByLineNumber(m_nline-1));
|
||||||
QTextBlockFormat f = cursor.blockFormat();
|
QTextBlockFormat f = cursor.blockFormat();
|
||||||
@ -963,6 +963,7 @@ void MainWindow::guiUpdate()
|
|||||||
cursor.setBlockFormat(f);
|
cursor.setBlockFormat(f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
t1="";
|
t1="";
|
||||||
t1=t1.asprintf("%.3f",datcom_.fcenter);
|
t1=t1.asprintf("%.3f",datcom_.fcenter);
|
||||||
ui->labFreq->setText(t1);
|
ui->labFreq->setText(t1);
|
||||||
@ -977,10 +978,15 @@ void MainWindow::guiUpdate()
|
|||||||
mem_qmap.unlock();
|
mem_qmap.unlock();
|
||||||
if(itest[4]>0) {
|
if(itest[4]>0) {
|
||||||
m_WSJTX_TRperiod=itest[4];
|
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(n60<n60z) {
|
||||||
|
m_nTx30=0;
|
||||||
|
m_nTx60=0;
|
||||||
}
|
}
|
||||||
// qDebug() << "AAA" << n60 << itest[0] << itest[1] << itest[2] << itest[3] << itest[4] << m_nTransmitted;
|
|
||||||
if(n60<n60z) m_nTransmitted=0;
|
|
||||||
n60z=n60;
|
n60z=n60;
|
||||||
|
|
||||||
if(m_pctZap>30.0) {
|
if(m_pctZap>30.0) {
|
||||||
|
@ -114,7 +114,8 @@ private:
|
|||||||
qint32 m_dB;
|
qint32 m_dB;
|
||||||
qint32 m_fetched=0;
|
qint32 m_fetched=0;
|
||||||
qint32 m_hsymStop=390; //390*0.15 = 58.5 s
|
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_nDoubleClicked=0;
|
||||||
qint32 m_nline=0;
|
qint32 m_nline=0;
|
||||||
qint32 m_WSJTX_TRperiod=0;
|
qint32 m_WSJTX_TRperiod=0;
|
||||||
|
@ -9637,6 +9637,7 @@ void MainWindow::readWidebandDecodes()
|
|||||||
// Recover and parse each decoded line.
|
// Recover and parse each decoded line.
|
||||||
QString line=QString::fromLatin1(qmapcom.result[m_fetched]);
|
QString line=QString::fromLatin1(qmapcom.result[m_fetched]);
|
||||||
m_fetched++;
|
m_fetched++;
|
||||||
|
if(m_fetched==qmapcom.ndecodes) break;
|
||||||
nhr=line.mid(0,2).toInt();
|
nhr=line.mid(0,2).toInt();
|
||||||
nmin=line.mid(2,2).toInt();
|
nmin=line.mid(2,2).toInt();
|
||||||
nsec=line.mid(4,2).toInt();
|
nsec=line.mid(4,2).toInt();
|
||||||
|
Loading…
Reference in New Issue
Block a user