Fixed double printing (... I think ...)
This commit is contained in:
parent
54a7085c47
commit
1ad0efa634
@ -19,7 +19,7 @@
|
|||||||
! parameter (NSPS=1920, NTXDUR=15, NDOWNSPS=32, NDD=100, JZ=116) ! 50 Hz 6.250 baud 16 wpm -25.0dB (1.0Eb/N0) 12.64s
|
! parameter (NSPS=1920, NTXDUR=15, NDOWNSPS=32, NDD=100, JZ=116) ! 50 Hz 6.250 baud 16 wpm -25.0dB (1.0Eb/N0) 12.64s
|
||||||
! parameter (NSPS=4000, NTXDUR=30, NDOWNSPS=20, NDD=90, JZ=62) ! 24 Hz 3 baud 8 wpm -28.2dB (1.0Eb/N0) 26.33s
|
! parameter (NSPS=4000, NTXDUR=30, NDOWNSPS=20, NDD=90, JZ=62) ! 24 Hz 3 baud 8 wpm -28.2dB (1.0Eb/N0) 26.33s
|
||||||
|
|
||||||
parameter (AZ=12000.0/(1.0*NSPS)*0.64d0) !Dedupe overlap in Hz
|
parameter (AZ=12000.0/(1.0*NSPS)*0.8d0) !Dedupe overlap in Hz
|
||||||
parameter (ASTART=0.2) !Start delay in seconds
|
parameter (ASTART=0.2) !Start delay in seconds
|
||||||
parameter (ASYNCMIN=1.5) !Minimum Sync
|
parameter (ASYNCMIN=1.5) !Minimum Sync
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
! parameter (NSPS=1920, NTXDUR=15, NDOWNSPS=32, NDD=100, JZ=116) ! 50 Hz 6.250 baud 16 wpm -25.0dB (1.0Eb/N0) 12.64s
|
! parameter (NSPS=1920, NTXDUR=15, NDOWNSPS=32, NDD=100, JZ=116) ! 50 Hz 6.250 baud 16 wpm -25.0dB (1.0Eb/N0) 12.64s
|
||||||
! parameter (NSPS=4000, NTXDUR=30, NDOWNSPS=20, NDD=90, JZ=62) ! 24 Hz 3 baud 8 wpm -28.2dB (1.0Eb/N0) 26.33s
|
! parameter (NSPS=4000, NTXDUR=30, NDOWNSPS=20, NDD=90, JZ=62) ! 24 Hz 3 baud 8 wpm -28.2dB (1.0Eb/N0) 26.33s
|
||||||
|
|
||||||
parameter (AZ=12000.0/(1.0*NSPS)*0.64d0) !Dedupe overlap in Hz
|
parameter (AZ=12000.0/(1.0*NSPS)*0.8d0) !Dedupe overlap in Hz
|
||||||
parameter (ASTART=0.1) !Start delay in seconds
|
parameter (ASTART=0.1) !Start delay in seconds
|
||||||
parameter (ASYNCMIN=1.5) !Minimum Sync
|
parameter (ASYNCMIN=1.5) !Minimum Sync
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
! parameter (NSPS=1920, NTXDUR=15, NDOWNSPS=32, NDD=100, JZ=116) ! 50 Hz 6.250 baud 16 wpm -25.0dB (1.0Eb/N0) 12.64s
|
! parameter (NSPS=1920, NTXDUR=15, NDOWNSPS=32, NDD=100, JZ=116) ! 50 Hz 6.250 baud 16 wpm -25.0dB (1.0Eb/N0) 12.64s
|
||||||
! parameter (NSPS=4000, NTXDUR=30, NDOWNSPS=40, NDD=90, JZ=116) ! 24 Hz 3 baud 8 wpm -28.2dB (1.0Eb/N0) 26.33s
|
! parameter (NSPS=4000, NTXDUR=30, NDOWNSPS=40, NDD=90, JZ=116) ! 24 Hz 3 baud 8 wpm -28.2dB (1.0Eb/N0) 26.33s
|
||||||
|
|
||||||
parameter (AZ=12000.0/(1.0*NSPS)*0.64d0) !Dedupe overlap in Hz
|
parameter (AZ=12000.0/(1.0*NSPS)*0.8d0) !Dedupe overlap in Hz
|
||||||
parameter (ASTART=0.1) !Start delay in seconds
|
parameter (ASTART=0.1) !Start delay in seconds
|
||||||
parameter (ASYNCMIN=1.5) !Minimum Sync
|
parameter (ASYNCMIN=1.5) !Minimum Sync
|
||||||
|
|
||||||
|
@ -145,9 +145,13 @@ subroutine syncjs8(dd,nfa,nfb,syncmin,nfqso,s,candidate,ncand,sbase)
|
|||||||
enddo
|
enddo
|
||||||
ncand=k
|
ncand=k
|
||||||
|
|
||||||
! Put nfqso at top of list, and save only the best of near-dupe freqs.
|
! Put nfqso at top of list
|
||||||
do i=1,ncand
|
do i=1,ncand
|
||||||
if(abs(candidate0(1,i)-nfqso).lt.10.0) candidate0(1,i)=-candidate0(1,i)
|
if(abs(candidate0(1,i)-nfqso).lt.10.0) candidate0(1,i)=-candidate0(1,i)
|
||||||
|
enddo
|
||||||
|
|
||||||
|
! Save only the best of near-dupe freqs.
|
||||||
|
do i=1,ncand
|
||||||
if(i.ge.2) then
|
if(i.ge.2) then
|
||||||
do j=1,i-1
|
do j=1,i-1
|
||||||
fdiff=abs(candidate0(1,i))-abs(candidate0(1,j))
|
fdiff=abs(candidate0(1,i))-abs(candidate0(1,j))
|
||||||
|
@ -4178,8 +4178,10 @@ void MainWindow::readFromStdout() //readFromStdout
|
|||||||
MessageBox::information_message(this, tr("No more files to open."));
|
MessageBox::information_message(this, tr("No more files to open."));
|
||||||
m_bNoMoreFiles=false;
|
m_bNoMoreFiles=false;
|
||||||
}
|
}
|
||||||
|
m_messageDupeCache.clear();
|
||||||
return;
|
return;
|
||||||
} else {
|
}
|
||||||
|
|
||||||
if(m_mode=="JT4" or m_mode=="JT65" or m_mode=="QRA64" or m_mode=="FT8") {
|
if(m_mode=="JT4" or m_mode=="JT65" or m_mode=="QRA64" or m_mode=="FT8") {
|
||||||
int n=t.indexOf("f");
|
int n=t.indexOf("f");
|
||||||
if(n<0) n=t.indexOf("d");
|
if(n<0) n=t.indexOf("d");
|
||||||
@ -4219,16 +4221,33 @@ void MainWindow::readFromStdout() //readFromStdout
|
|||||||
|
|
||||||
bool bValidFrame = decodedtext.snr() > -24;
|
bool bValidFrame = decodedtext.snr() > -24;
|
||||||
|
|
||||||
|
// dupe check
|
||||||
|
auto frame = decodedtext.message();
|
||||||
|
auto frameOffset = decodedtext.frequencyOffset();
|
||||||
|
if(m_messageDupeCache.contains(frame)){
|
||||||
|
// check to see if the frequency is near our previous frame
|
||||||
|
auto cachedFreq = m_messageDupeCache.value(frame, 0);
|
||||||
|
if(qAbs(cachedFreq - frameOffset) <= NEAR_THRESHOLD_RX){
|
||||||
|
qDebug() << "duplicate frame from" << cachedFreq << "and" << frameOffset;
|
||||||
|
bValidFrame = false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// cache for this decode cycle
|
||||||
|
m_messageDupeCache[frame] = frameOffset;
|
||||||
|
}
|
||||||
|
|
||||||
qDebug() << "valid" << bValidFrame << "decoded text" << decodedtext.message();
|
qDebug() << "valid" << bValidFrame << "decoded text" << decodedtext.message();
|
||||||
|
|
||||||
|
// skip if invalid
|
||||||
|
if(!bValidFrame) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
ActivityDetail d = {};
|
ActivityDetail d = {};
|
||||||
CallDetail cd = {};
|
CallDetail cd = {};
|
||||||
CommandDetail cmd = {};
|
CommandDetail cmd = {};
|
||||||
CallDetail td = {};
|
CallDetail td = {};
|
||||||
|
|
||||||
|
|
||||||
//Left (Band activity) window
|
|
||||||
if(bValidFrame) {
|
|
||||||
// Parse General Activity
|
// Parse General Activity
|
||||||
#if 1
|
#if 1
|
||||||
bool shouldParseGeneralActivity = true;
|
bool shouldParseGeneralActivity = true;
|
||||||
@ -4482,65 +4501,6 @@ void MainWindow::readFromStdout() //readFromStdout
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
//Right (Rx Frequency) window
|
|
||||||
bool bDisplayRight=bAvgMsg;
|
|
||||||
int audioFreq=decodedtext.frequencyOffset();
|
|
||||||
|
|
||||||
if(abs(audioFreq - m_wideGraph->rxFreq()) <= 10){
|
|
||||||
bDisplayRight=true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bDisplayRight) {
|
|
||||||
// This msg is within 10 hertz of our tuned frequency, or a JT4 or JT65 avg,
|
|
||||||
// or contains MyCall
|
|
||||||
ui->decodedTextBrowser2->displayDecodedText(decodedtext,m_baseCall,false,
|
|
||||||
m_logBook,m_config.color_CQ(),m_config.color_MyCall(),
|
|
||||||
m_config.color_DXCC(),m_config.color_NewCall(),m_config.ppfx());
|
|
||||||
|
|
||||||
if(m_mode!="JT4") {
|
|
||||||
bool b65=decodedtext.isJT65();
|
|
||||||
if(b65 and m_modeTx!="JT65") on_pbTxMode_clicked();
|
|
||||||
if(!b65 and m_modeTx=="JT65") on_pbTxMode_clicked();
|
|
||||||
}
|
|
||||||
m_QSOText = decodedtext.string ().trimmed ();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(m_mode!="FT8" or !m_config.bHound()) {
|
|
||||||
postDecode (true, decodedtext.string ());
|
|
||||||
|
|
||||||
// find and extract any report for myCall, but save in m_rptRcvd only if it's from DXcall
|
|
||||||
QString rpt;
|
|
||||||
bool stdMsg = decodedtext.report(m_baseCall,
|
|
||||||
Radio::base_callsign(ui->dxCallEntry->text()), rpt);
|
|
||||||
QString deCall;
|
|
||||||
QString grid;
|
|
||||||
decodedtext.deCallAndGrid(/*out*/deCall,grid);
|
|
||||||
{
|
|
||||||
QString t=Radio::base_callsign(ui->dxCallEntry->text());
|
|
||||||
if((t==deCall or t=="") and rpt!="") m_rptRcvd=rpt;
|
|
||||||
}
|
|
||||||
// extract details and send to PSKreporter
|
|
||||||
int nsec=DriftingDateTime::currentMSecsSinceEpoch()/1000-m_secBandChanged;
|
|
||||||
bool okToPost=(nsec>(4*m_TRperiod)/5);
|
|
||||||
|
|
||||||
//if (stdMsg && okToPost) pskPost(decodedtext);
|
|
||||||
|
|
||||||
if((m_mode=="JT4" or m_mode=="JT65" or m_mode=="QRA64") and m_msgAvgWidget!=NULL) {
|
|
||||||
if(m_msgAvgWidget->isVisible()) {
|
|
||||||
QFile f(m_config.temp_dir ().absoluteFilePath ("avemsg.txt"));
|
|
||||||
if(f.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
|
||||||
QTextStream s(&f);
|
|
||||||
QString t=s.readAll();
|
|
||||||
m_msgAvgWidget->displayAvg(t);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// See MainWindow::postDecode for displaying the latest decodes
|
// See MainWindow::postDecode for displaying the latest decodes
|
||||||
|
@ -836,6 +836,7 @@ private:
|
|||||||
QDateTime date;
|
QDateTime date;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
QMap<QString, int> m_messageDupeCache; // message frame -> freq offset seen
|
||||||
QMap<QString, QVariant> m_showColumnsCache; // table column:key -> show boolean
|
QMap<QString, QVariant> m_showColumnsCache; // table column:key -> show boolean
|
||||||
QMap<QString, QVariant> m_sortCache; // table key -> sort by
|
QMap<QString, QVariant> m_sortCache; // table key -> sort by
|
||||||
QPriorityQueue<PrioritizedMessage> m_txMessageQueue; // messages to be sent
|
QPriorityQueue<PrioritizedMessage> m_txMessageQueue; // messages to be sent
|
||||||
|
Loading…
Reference in New Issue
Block a user