mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
1. Click on spectrum sets Rx freq; double-click also invokes narrow-band
decoder at the new frequency. CTRL-click (or CTRL-double-click) sets both Rx and Tx freqs. 2. Amplitude at end of transmission is ramped down to prevent a "key click". git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3139 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
6ec80aa20a
commit
18ef9aadcb
@ -29,18 +29,8 @@ subroutine decoder(ss,c0)
|
||||
newdat=1
|
||||
nsynced=0
|
||||
ndecoded=0
|
||||
limit=5000
|
||||
ccflim=4.0
|
||||
if(ndepth.ge.2) then
|
||||
limit=50000
|
||||
ccflim=3.0
|
||||
endif
|
||||
if(ndepth.ge.3) then
|
||||
limit=200000
|
||||
ccflim=2.5
|
||||
endif
|
||||
|
||||
nsps=0
|
||||
|
||||
if(ntrMinutes.eq.1) then
|
||||
nsps=6912
|
||||
df3=1500.0/2048.0
|
||||
@ -69,6 +59,18 @@ subroutine decoder(ss,c0)
|
||||
idf=ntol/df3 + 0.999
|
||||
|
||||
do nqd=1,0,-1
|
||||
|
||||
limit=5000
|
||||
ccflim=4.0
|
||||
if(ndepth.ge.2) then
|
||||
limit=50000
|
||||
ccflim=3.0
|
||||
endif
|
||||
if(ndepth.ge.3 .or. nqd.eq.1) then
|
||||
limit=200000
|
||||
ccflim=2.5
|
||||
endif
|
||||
|
||||
if(nqd.eq.1) then
|
||||
nfa1=nfqso-ntol
|
||||
nfb1=nfqso+ntol
|
||||
|
@ -760,7 +760,7 @@ void MainWindow::bumpFqso(int n) //bumpFqso()
|
||||
if(n==11) i--;
|
||||
if(n==12) i++;
|
||||
g_pWideGraph->setQSOfreq(i);
|
||||
if(!ctrl) {
|
||||
if(ctrl) {
|
||||
ui->TxFreqSpinBox->setValue(i);
|
||||
g_pWideGraph->setTxFreq(i);
|
||||
}
|
||||
@ -1063,9 +1063,14 @@ void MainWindow::on_DecodeButton_clicked() //Decode request
|
||||
|
||||
void MainWindow::freezeDecode(int n) //freezeDecode()
|
||||
{
|
||||
if(n==1) {
|
||||
bumpFqso(0);
|
||||
qDebug() << "A" << n;
|
||||
bool ctrl = (n>=100);
|
||||
int i=g_pWideGraph->QSOfreq();
|
||||
if(ctrl) {
|
||||
ui->TxFreqSpinBox->setValue(i);
|
||||
g_pWideGraph->setTxFreq(i);
|
||||
}
|
||||
if((n%100)==2) on_DecodeButton_clicked();
|
||||
}
|
||||
|
||||
void MainWindow::decode() //decode()
|
||||
|
18
plotter.cpp
18
plotter.cpp
@ -418,18 +418,20 @@ void CPlotter::mousePressEvent(QMouseEvent *event) //mousePressEvent
|
||||
int x=event->x();
|
||||
setFQSO(x,false); // Wideband waterfall
|
||||
bool ctrl = (event->modifiers() & Qt::ControlModifier);
|
||||
if(!ctrl) {
|
||||
setTxFreq(m_fQSO);
|
||||
emit freezeDecode1(1); //### ???
|
||||
}
|
||||
int n=1;
|
||||
if(ctrl) n+=100;
|
||||
emit freezeDecode1(n);
|
||||
if(ctrl) setTxFreq(m_fQSO);
|
||||
}
|
||||
|
||||
void CPlotter::mouseDoubleClickEvent(QMouseEvent *event) //mouse2click
|
||||
{
|
||||
// int h = (m_Size.height()-60)/2;
|
||||
int x=event->x();
|
||||
setFQSO(x,false);
|
||||
emit freezeDecode1(2); //### ???
|
||||
// int x=event->x();
|
||||
// setFQSO(x,false);
|
||||
bool ctrl = (event->modifiers() & Qt::ControlModifier);
|
||||
int n=2;
|
||||
if(ctrl) n+=100;
|
||||
emit freezeDecode1(n);
|
||||
}
|
||||
|
||||
void CPlotter::setNSpan(int n) //setNSpan()
|
||||
|
@ -65,7 +65,6 @@ public:
|
||||
void SetPercent2DScreen(int percent){m_Percent2DScreen=percent;}
|
||||
|
||||
signals:
|
||||
void freezeDecode0(int n);
|
||||
void freezeDecode1(int n);
|
||||
|
||||
protected:
|
||||
|
@ -96,10 +96,15 @@ extern "C" int d2aCallback(const void *inputBuffer, void *outputBuffer,
|
||||
baud=12000.0/udata->nsps;
|
||||
freq=udata->ntxfreq + itone[isym]*baud;
|
||||
dphi=twopi*freq/48000.0;
|
||||
double amp=32767.0;
|
||||
int i0=84.983*4.0*udata->nsps;
|
||||
for(uint i=0 ; i<framesToProcess; i++ ) {
|
||||
phi += dphi;
|
||||
if(phi>twopi) phi -= twopi;
|
||||
i2=32767.0*sin(phi);
|
||||
if(ic>i0) {
|
||||
amp=0.98*amp;
|
||||
}
|
||||
i2=amp*sin(phi);
|
||||
if(udata->txsnrdb < 0.0) {
|
||||
int i4=fac*(gran() + i2*snr/32768.0);
|
||||
if(i4>32767) i4=32767;
|
||||
@ -113,6 +118,7 @@ extern "C" int d2aCallback(const void *inputBuffer, void *outputBuffer,
|
||||
#endif
|
||||
ic++;
|
||||
}
|
||||
if(amp<1.0 and itone[0]>=0) return paComplete;
|
||||
return paContinue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user