diff --git a/qmap/commons.h b/qmap/commons.h index 1b9d72210..bf42532fe 100644 --- a/qmap/commons.h +++ b/qmap/commons.h @@ -93,6 +93,7 @@ extern struct { int nQDecoderDone; //1 for real-time decodes, 2 for data from disk int nWDecoderBusy; //Set to 1 when WSJT-X decoder is busy int nWTransmitting; //Set to TRperiod when WSJT-X is transmitting + int kHzRequested; //Integer kHz dial frequency request to WSJT-X char result[50][64]; //Staging area for QMAP decodes } decodes_; diff --git a/qmap/libqmap/decode0.f90 b/qmap/libqmap/decode0.f90 index 3567e4ed7..f0f95199c 100644 --- a/qmap/libqmap/decode0.f90 +++ b/qmap/libqmap/decode0.f90 @@ -12,7 +12,7 @@ subroutine decode0(dd,ss,savg) character mycall0*12,hiscall0*12,hisgrid0*6 character*64 result common/decodes/ndecodes,ncand,nQDecoderDone,nWDecoderBusy, & - nWTransmitting,result(50) + nWTransmitting,kHzRequested,result(50) common/npar/fcenter,nutc,fselected,mousedf,mousefqso,nagain, & ndepth,ndiskdat,ntx60,newdat,nfa,nfb,nfcal,nfshift, & ntx30a,ntx30b,ntol,n60,nCFOM,nfsample,ndop58,nmode, & diff --git a/qmap/libqmap/q65b.f90 b/qmap/libqmap/q65b.f90 index fff07e8fb..3c03ae64c 100644 --- a/qmap/libqmap/q65b.f90 +++ b/qmap/libqmap/q65b.f90 @@ -32,7 +32,7 @@ subroutine q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, & character*64 result,ctmp character*20 datetime,datetime1 common/decodes/ndecodes,ncand,nQDecoderDone,nWDecoderBusy, & - nWTransmitting,result(50) + nWTransmitting,kHzRequested,result(50) common/cacb/ca data ifile/0/ save diff --git a/qmap/libqmap/q65c.f90 b/qmap/libqmap/q65c.f90 index 53e4ec50e..a6bb2366a 100644 --- a/qmap/libqmap/q65c.f90 +++ b/qmap/libqmap/q65c.f90 @@ -22,7 +22,7 @@ subroutine q65c character*20 datetime character*64 result common/decodes/ndecodes,ncand,nQDecoderDone,nWDecoderBusy, & - nWTransmitting,result(50) + nWTransmitting,kHzRequested,result(50) common/datcom2/dd(2,5760000),ss(400,NFFT),savg(NFFT),nparams0 common/savecom/revision,fname !### REMEMBER that /npar/ is not updated until nparams=nparams0 is executed. ### diff --git a/qmap/libqmap/qmapa.f90 b/qmap/libqmap/qmapa.f90 index 6869cf8a5..ba981fa5c 100644 --- a/qmap/libqmap/qmapa.f90 +++ b/qmap/libqmap/qmapa.f90 @@ -36,7 +36,7 @@ subroutine qmapa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb, & character*64 result character*20 datetime common/decodes/ndecodes,ncand,nQDecoderDone,nWDecoderBusy, & - nWTransmitting,result(50) + nWTransmitting,kHzRequested,result(50) save tsec0=sec_midn() diff --git a/qmap/mainwindow.cpp b/qmap/mainwindow.cpp index 81e9d4247..96cc7bcc8 100644 --- a/qmap/mainwindow.cpp +++ b/qmap/mainwindow.cpp @@ -821,6 +821,13 @@ void MainWindow::on_DecodeButton_clicked() //Decode request void MainWindow::freezeDecode(int n) //freezeDecode() { + if(n==3) { + decodes_.kHzRequested=m_wide_graph_window->QSOfreq(); + mem_qmap.lock(); + ipc_wsjtx[5]=decodes_.kHzRequested; + mem_qmap.unlock(); + return; + } if(n==2) { ui->tolSpinBox->setValue(5); datcom_.ntol=m_tol; diff --git a/qmap/plotter.cpp b/qmap/plotter.cpp index 3ce310949..b11602a0b 100644 --- a/qmap/plotter.cpp +++ b/qmap/plotter.cpp @@ -599,11 +599,10 @@ void CPlotter::mousePressEvent(QMouseEvent *event) //mousePressEvent int x=event->x(); int y=event->y(); int button=event->button(); -// qDebug() << "aa" << x << y << int(FreqfromX(x)+0.5) -// << floor(datcom_.fcenter) + 0.001*int(FreqfromX(x)+0.5); if(y < h+30) { // Wideband waterfall if(button==1) { setFQSO(x,false); + if(event->modifiers() & Qt::ControlModifier) emit freezeDecode1(3); } if(button==2 and !m_bLockTxRx) { if(x<0) x=0; // x is pixel number diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 8c9a08876..1e5272410 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -225,6 +225,7 @@ struct { int nQDecoderDone; //QMAP decoder is finished (0 or 1) int nWDecoderBusy; //WSJT-X decoder is busy (0 or 1) int nWTransmitting; //WSJT-X is transmitting (0 or 1) + int kHzRequested; //Integer kHz dial frequency requested from QMAP char result[50][64]; //Decodes as character*64 arrays } qmapcom; int* ipc_qmap; @@ -1740,7 +1741,6 @@ void MainWindow::dataSink(qint64 frames) int idir=-1; save_echo_params_(&nDopTotal,&nDop,&nfrit,&f1,&width,dec_data.d2,&idir); } -// qDebug() << "aa" << m_astroWidget->DopplerMethod() << nDop << nfrit << m_fDop; avecho_(dec_data.d2,&nDop,&nfrit,&nauto,&navg,&nqual,&f1,&xlevel,&sigdb, &dBerr,&dfreq,&width,&m_diskData); //Don't restart Monitor after an Echo transmission @@ -5097,13 +5097,18 @@ void MainWindow::guiUpdate() memcpy(&qmapcom, (char*)ipc_qmap, sizeof(qmapcom)); //Fetch the new decode(s) readWidebandDecodes(); } + if(ipc_qmap[5]>0) { +// qDebug() << "aa" << m_freqNominal << ipc_qmap[5]; + setRig((m_freqNominal/1000000)*1000000 + 1000*ipc_qmap[5]); + ipc_qmap[5]=0; +// qDebug() << "bb" << m_freqNominal << ipc_qmap[5]; + } mem_qmap.unlock(); } //Once per second (onesec) if(nsec != m_sec0) { -// qDebug() << "AAA" << nsec%60 << int(m_specOp); - +// qDebug() << "AAA" << nsec%60 << ipc_qmap[5]; if(m_mode=="FST4") chk_FST4_freq_range(); m_currentBand=m_config.bands()->find(m_freqNominal); if( SpecOp::HOUND == m_specOp ) { @@ -9673,7 +9678,6 @@ void MainWindow::readWidebandDecodes() m_EMECall[dxcall].t=3600*nhr + 60*nmin + nsec; m_EMECall[dxcall].submode=submode; //### Make sure WSJT-X is set to a Q65 submode consistent with the executing QMAP. -// qDebug() << "aa" << submode << m_mode << m_nSubMode << bWrongMode; if(w3.contains(grid_regexp)) m_EMECall[dxcall].grid4=w3; bool bCQ=line.contains(" CQ "); // m_EMECall[dxcall].ready2call=(bCQ or line.contains(" 73") or line.contains(" RR73"));