1. Add AGC for waterfall in *Ref Spec* mode.

2. Don't display orange warning bar when in WSPR mode.
3. Fix a longstanding compiler warning.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6616 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2016-04-12 19:54:15 +00:00
parent 092a2301a0
commit 90beb50cbe
5 changed files with 36 additions and 32 deletions

View File

@ -17,35 +17,37 @@ subroutine flat4(s,npts0,nflatten)
do i=1,npts
s(i)=10.0*log10(s(i)) !Convert to dB scale
enddo
if(nflatten.eq.0) go to 900
nlen=npts/nseg !Length of test segment
i0=npts/2 !Midpoint
k=0
do n=1,nseg !Skip first segment, likely rolloff here
ib=n*nlen
ia=ib-nlen+1
if(n.eq.nseg) ib=npts
call pctile(s(ia),ib-ia+1,npct,base) !Find lowest npct of points in segment
do i=ia,ib
if(s(i).le.base) then
if (k.lt.1000) k=k+1 !Save these "lower envelope" points
x(k)=i-i0
y(k)=s(i)
endif
if(nflatten.gt.0) then
nterms=5
if(nflatten.eq.2) nterms=1
nlen=npts/nseg !Length of test segment
i0=npts/2 !Midpoint
k=0
do n=1,nseg !Skip first segment, likely rolloff here
ib=n*nlen
ia=ib-nlen+1
if(n.eq.nseg) ib=npts
call pctile(s(ia),ib-ia+1,npct,base) !Find lowest npct of points
do i=ia,ib
if(s(i).le.base) then
if (k.lt.1000) k=k+1 !Save these "lower envelope" points
x(k)=i-i0
y(k)=s(i)
endif
enddo
enddo
enddo
kz=k
a=0.
nterms=5
kz=k
a=0.
call polyfit(x,y,y,kz,nterms,0,a,chisqr) !Fit a low-order polynomial
call polyfit(x,y,y,kz,nterms,0,a,chisqr) !Fit a low-order polynomial
do i=1,npts
t=i-i0
yfit=a(1)+t*(a(2)+t*(a(3)+t*(a(4)+t*(a(5)))))
s(i)=s(i)-yfit !Subtract the fitted baseline
enddo
do i=1,npts
t=i-i0
yfit=a(1)+t*(a(2)+t*(a(3)+t*(a(4)+t*(a(5)))))
s(i)=s(i)-yfit !Subtract the fitted baseline
enddo
endif
900 return
end subroutine flat4

View File

@ -2167,6 +2167,7 @@ void MainWindow::on_EraseButton_clicked() //Erase
void MainWindow::decodeBusy(bool b) //decodeBusy()
{
/* ### Temporarily(?) disable the long-decode progress bar.
bool showProgress = false;
if (b && m_firstDecode < 65 && ("JT65" == m_mode || "JT9+JT65" == m_mode))
{
@ -2180,7 +2181,6 @@ void MainWindow::decodeBusy(bool b) //decodeBusy()
m_firstDecode += 9;
showProgress = true;
}
/* ### Temporarily(?) disable the long-decode progress bar.
if (showProgress)
{
// this sequence is needed to create an indeterminate progress

View File

@ -408,7 +408,7 @@ void CPlotter::DrawOverlay() //DrawOverlay()
painter0.drawLine(x1,8,x1,28);
}
if(m_dialFreq>10.13 and m_dialFreq< 10.15) {
if(m_dialFreq>10.13 and m_dialFreq< 10.15 and m_mode.mid(0,4)!="WSPR") {
float f1=1.0e6*(10.1401 - m_dialFreq);
float f2=f1+200.0;
x1=XfromFreq(f1);
@ -625,10 +625,11 @@ void CPlotter::setRxBand(QString band)
m_rxBand=band;
}
void CPlotter::setFlatten(bool b)
void CPlotter::setFlatten(bool b1, bool b2)
{
m_Flatten=0;
if(b) m_Flatten=1;
if(b1) m_Flatten=1;
if(b2) m_Flatten=2;
}
void CPlotter::setTol(int n) //setTol()

View File

@ -77,7 +77,7 @@ public:
float fSpan() const {return m_fSpan;}
void setLockTxFreq(bool b) {m_lockTxFreq = b;}
void setColours(QVector<QColor> const& cl);
void setFlatten(bool b);
void setFlatten(bool b1, bool b2);
void setTol(int n);
void setRxBand(QString band);
void setReference(bool b) {m_bReference = b;}

View File

@ -50,8 +50,8 @@ WideGraph::WideGraph(QSettings * settings, QWidget *parent) :
int n = m_settings->value("BinsPerPixel",2).toInt();
m_bFlatten=m_settings->value("Flatten",true).toBool();
ui->cbFlatten->setChecked(m_bFlatten);
ui->widePlot->setFlatten(m_bFlatten);
m_bRef=m_settings->value("UseRef",false).toBool();
ui->widePlot->setFlatten(m_bFlatten,m_bRef);
ui->cbRef->setChecked(m_bRef);
ui->widePlot->setBreadth(m_settings->value("PlotWidth",1000).toInt());
ui->bppSpinBox->setValue(n);
@ -384,7 +384,7 @@ void WideGraph::on_cbFlatten_toggled(bool b) //Flatten
m_bRef=false;
ui->cbRef->setChecked(false);
}
ui->widePlot->setFlatten(m_bFlatten);
ui->widePlot->setFlatten(m_bFlatten,m_bRef);
}
void WideGraph::on_cbRef_toggled(bool b)
@ -394,6 +394,7 @@ void WideGraph::on_cbRef_toggled(bool b)
m_bFlatten=false;
ui->cbFlatten->setChecked(false);
}
ui->widePlot->setFlatten(m_bFlatten,m_bRef);
}
void WideGraph::on_adjust_palette_push_button_clicked (bool) //Adjust Palette