Another fix for communication between Q65W and WSJT-X.

This commit is contained in:
Joe Taylor 2022-12-16 14:01:22 -05:00
parent 2fcf6c45fe
commit 042ff589fb
2 changed files with 11 additions and 6 deletions

View File

@ -744,6 +744,9 @@ void MainWindow::decoderFinished() //diskWriteFinished
ui->DecodeButton->setStyleSheet("");
decodeBusy(false);
decodes_.nQDecoderDone=1;
mem_q65w.lock();
memcpy((char*)ipc_wsjtx, &decodes_, sizeof(decodes_));
mem_q65w.unlock();
QString t1;
t1=t1.asprintf(" %3d/%d ",decodes_.ndecodes,decodes_.ncand);
lab5->setText(t1);
@ -960,9 +963,6 @@ void MainWindow::guiUpdate()
ui->decodedTextBrowser->append(t.trimmed());
m_fetched++;
}
mem_q65w.lock();
memcpy((char*)ipc_wsjtx, &decodes_, sizeof(decodes_));
mem_q65w.unlock();
}
if(nsec != m_sec0) { //Once per second

View File

@ -4824,7 +4824,7 @@ void MainWindow::guiUpdate()
if(m_transmitting) n=1;
ipc_q65w[4]=n;
if(ipc_q65w[0] > m_fetched) { //ndecodes
memcpy(&q65wcom, (char*)ipc_q65w, sizeof(q65wcom));
memcpy(&q65wcom, (char*)ipc_q65w, sizeof(q65wcom)); //Fetch the new decode(s)
readWidebandDecodes();
}
mem_q65w.unlock();
@ -4832,7 +4832,8 @@ void MainWindow::guiUpdate()
//Once per second (onesec)
if(nsec != m_sec0) {
// qDebug() << "AAA" << nsec << ipc_q65w[0] << ipc_q65w[1];
// qDebug() << "AAA" << nsec << ipc_q65w[0] << ipc_q65w[1] << ipc_q65w[2]
// << ipc_q65w[3] << ipc_q65w[4] << m_fetched;
if(m_mode=="FST4") chk_FST4_freq_range();
m_currentBand=m_config.bands()->find(m_freqNominal);
@ -9290,7 +9291,11 @@ void MainWindow::readWidebandDecodes()
m_ActiveStationsWidget->displayRecentStations(m_mode,t);
m_ActiveStationsWidget->setClickOK(true);
}
if(q65wcom.nQDecoderDone==1) m_fetched=0;
if(ipc_q65w[2]==1) {
m_fetched=0;
ipc_q65w[0]=0;
ipc_q65w[2]=0;
}
}
// -------------------------- Code for FT8 DXpedition Mode ---------------------------