mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-03-31 16:38:35 -04: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
7b73e76b04
commit
cd15a5e4d6
@ -29,18 +29,8 @@ subroutine decoder(ss,c0)
|
|||||||
newdat=1
|
newdat=1
|
||||||
nsynced=0
|
nsynced=0
|
||||||
ndecoded=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
|
nsps=0
|
||||||
|
|
||||||
if(ntrMinutes.eq.1) then
|
if(ntrMinutes.eq.1) then
|
||||||
nsps=6912
|
nsps=6912
|
||||||
df3=1500.0/2048.0
|
df3=1500.0/2048.0
|
||||||
@ -69,6 +59,18 @@ subroutine decoder(ss,c0)
|
|||||||
idf=ntol/df3 + 0.999
|
idf=ntol/df3 + 0.999
|
||||||
|
|
||||||
do nqd=1,0,-1
|
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
|
if(nqd.eq.1) then
|
||||||
nfa1=nfqso-ntol
|
nfa1=nfqso-ntol
|
||||||
nfb1=nfqso+ntol
|
nfb1=nfqso+ntol
|
||||||
|
@ -760,7 +760,7 @@ void MainWindow::bumpFqso(int n) //bumpFqso()
|
|||||||
if(n==11) i--;
|
if(n==11) i--;
|
||||||
if(n==12) i++;
|
if(n==12) i++;
|
||||||
g_pWideGraph->setQSOfreq(i);
|
g_pWideGraph->setQSOfreq(i);
|
||||||
if(!ctrl) {
|
if(ctrl) {
|
||||||
ui->TxFreqSpinBox->setValue(i);
|
ui->TxFreqSpinBox->setValue(i);
|
||||||
g_pWideGraph->setTxFreq(i);
|
g_pWideGraph->setTxFreq(i);
|
||||||
}
|
}
|
||||||
@ -1063,9 +1063,14 @@ void MainWindow::on_DecodeButton_clicked() //Decode request
|
|||||||
|
|
||||||
void MainWindow::freezeDecode(int n) //freezeDecode()
|
void MainWindow::freezeDecode(int n) //freezeDecode()
|
||||||
{
|
{
|
||||||
if(n==1) {
|
qDebug() << "A" << n;
|
||||||
bumpFqso(0);
|
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()
|
void MainWindow::decode() //decode()
|
||||||
|
18
plotter.cpp
18
plotter.cpp
@ -418,18 +418,20 @@ void CPlotter::mousePressEvent(QMouseEvent *event) //mousePressEvent
|
|||||||
int x=event->x();
|
int x=event->x();
|
||||||
setFQSO(x,false); // Wideband waterfall
|
setFQSO(x,false); // Wideband waterfall
|
||||||
bool ctrl = (event->modifiers() & Qt::ControlModifier);
|
bool ctrl = (event->modifiers() & Qt::ControlModifier);
|
||||||
if(!ctrl) {
|
int n=1;
|
||||||
setTxFreq(m_fQSO);
|
if(ctrl) n+=100;
|
||||||
emit freezeDecode1(1); //### ???
|
emit freezeDecode1(n);
|
||||||
}
|
if(ctrl) setTxFreq(m_fQSO);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlotter::mouseDoubleClickEvent(QMouseEvent *event) //mouse2click
|
void CPlotter::mouseDoubleClickEvent(QMouseEvent *event) //mouse2click
|
||||||
{
|
{
|
||||||
// int h = (m_Size.height()-60)/2;
|
// int x=event->x();
|
||||||
int x=event->x();
|
// setFQSO(x,false);
|
||||||
setFQSO(x,false);
|
bool ctrl = (event->modifiers() & Qt::ControlModifier);
|
||||||
emit freezeDecode1(2); //### ???
|
int n=2;
|
||||||
|
if(ctrl) n+=100;
|
||||||
|
emit freezeDecode1(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlotter::setNSpan(int n) //setNSpan()
|
void CPlotter::setNSpan(int n) //setNSpan()
|
||||||
|
@ -65,7 +65,6 @@ public:
|
|||||||
void SetPercent2DScreen(int percent){m_Percent2DScreen=percent;}
|
void SetPercent2DScreen(int percent){m_Percent2DScreen=percent;}
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void freezeDecode0(int n);
|
|
||||||
void freezeDecode1(int n);
|
void freezeDecode1(int n);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -96,10 +96,15 @@ extern "C" int d2aCallback(const void *inputBuffer, void *outputBuffer,
|
|||||||
baud=12000.0/udata->nsps;
|
baud=12000.0/udata->nsps;
|
||||||
freq=udata->ntxfreq + itone[isym]*baud;
|
freq=udata->ntxfreq + itone[isym]*baud;
|
||||||
dphi=twopi*freq/48000.0;
|
dphi=twopi*freq/48000.0;
|
||||||
|
double amp=32767.0;
|
||||||
|
int i0=84.983*4.0*udata->nsps;
|
||||||
for(uint i=0 ; i<framesToProcess; i++ ) {
|
for(uint i=0 ; i<framesToProcess; i++ ) {
|
||||||
phi += dphi;
|
phi += dphi;
|
||||||
if(phi>twopi) phi -= twopi;
|
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) {
|
if(udata->txsnrdb < 0.0) {
|
||||||
int i4=fac*(gran() + i2*snr/32768.0);
|
int i4=fac*(gran() + i2*snr/32768.0);
|
||||||
if(i4>32767) i4=32767;
|
if(i4>32767) i4=32767;
|
||||||
@ -113,6 +118,7 @@ extern "C" int d2aCallback(const void *inputBuffer, void *outputBuffer,
|
|||||||
#endif
|
#endif
|
||||||
ic++;
|
ic++;
|
||||||
}
|
}
|
||||||
|
if(amp<1.0 and itone[0]>=0) return paComplete;
|
||||||
return paContinue;
|
return paContinue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user