mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-09-09 02:07:48 -04:00
More WIP on interprocess communication.
This commit is contained in:
parent
31524396d2
commit
90c1598f1e
@ -215,6 +215,9 @@ QSharedMemory mem_q65w("mem_q65w"); //Memory segment to be shared (optio
|
|||||||
struct {
|
struct {
|
||||||
int ndecodes;
|
int ndecodes;
|
||||||
int ncand;
|
int ncand;
|
||||||
|
// int nDecoderDone;
|
||||||
|
// int nDecoderBusy;
|
||||||
|
// int nTransmitting;
|
||||||
char result[50][60];
|
char result[50][60];
|
||||||
} q65wcom;
|
} q65wcom;
|
||||||
int* ipc_q65w;
|
int* ipc_q65w;
|
||||||
@ -4809,32 +4812,19 @@ void MainWindow::guiUpdate()
|
|||||||
}
|
}
|
||||||
if(m_mode=="Echo" and !m_monitoring and !m_auto and !m_diskData) m_echoRunning=false;
|
if(m_mode=="Echo" and !m_monitoring and !m_auto and !m_diskData) m_echoRunning=false;
|
||||||
|
|
||||||
|
mem_q65w.lock();
|
||||||
|
if(m_mode=="Q65" and (ipc_q65w[0] > m_fetched)) { //ndecodes
|
||||||
|
memcpy(&q65wcom, (char*)ipc_q65w, sizeof(q65wcom));
|
||||||
|
mem_q65w.unlock();
|
||||||
|
readWidebandDecodes();
|
||||||
|
} else {
|
||||||
|
mem_q65w.unlock();
|
||||||
|
}
|
||||||
|
|
||||||
//Once per second (onesec)
|
//Once per second (onesec)
|
||||||
if(nsec != m_sec0) {
|
if(nsec != m_sec0) {
|
||||||
// qDebug() << "AAA" << nsec << ipc_q65w[0] << ipc_q65w[1];
|
// qDebug() << "AAA" << nsec << ipc_q65w[0] << ipc_q65w[1];
|
||||||
|
|
||||||
if(m_mode=="Q65") {
|
|
||||||
|
|
||||||
mem_q65w.lock();
|
|
||||||
memcpy(&q65wcom, (char*)ipc_q65w, sizeof(q65wcom));
|
|
||||||
// qDebug() << "AAA" << nsec << q65wcom.ndecodes << q65wcom.ncand << m_fetched;
|
|
||||||
// QString t0=QString::fromLatin1(q65wcom.result[0]);
|
|
||||||
// QString t1=QString::fromLatin1(q65wcom.result[1]);
|
|
||||||
// qDebug() << "BBB" << t0 << "\n" << t1;
|
|
||||||
mem_q65w.unlock();
|
|
||||||
if(q65wcom.ndecodes>m_fetched) {
|
|
||||||
readWidebandDecodes();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
QFileInfo fi(m_appDir+"/q65w_decodes.txt");
|
|
||||||
QDateTime fileTime=fi.lastModified();
|
|
||||||
QDateTime now = QDateTime::currentDateTimeUtc ();
|
|
||||||
int age=fileTime.msecsTo(now)/1000;
|
|
||||||
if(age==1) readWidebandDecodes();
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
if(m_mode=="FST4") chk_FST4_freq_range();
|
if(m_mode=="FST4") chk_FST4_freq_range();
|
||||||
m_currentBand=m_config.bands()->find(m_freqNominal);
|
m_currentBand=m_config.bands()->find(m_freqNominal);
|
||||||
if( SpecOp::HOUND == m_specOp ) {
|
if( SpecOp::HOUND == m_specOp ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user