CTRL+Click on QMAP's upper waterfall sends integer kHz dial freq request to WSJT-X.

This commit is contained in:
Joe Taylor 2024-01-25 14:27:54 -05:00
parent c251764252
commit f59b5a48f7
8 changed files with 21 additions and 10 deletions

View File

@ -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_;

View File

@ -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, &

View File

@ -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

View File

@ -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. ###

View File

@ -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()

View File

@ -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;

View File

@ -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

View File

@ -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"));