mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-11 10:18:50 -04:00
Starting to implement display of reference spectrum in plotter.cpp.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6604 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
+7
-1
@@ -168,11 +168,17 @@ void CPlotter::draw(float swide[], bool bScroll) //dr
|
||||
float sum=0.0;
|
||||
int j=j0+m_binsPerPixel*i;
|
||||
for(int k=0; k<m_binsPerPixel; k++) {
|
||||
sum+=jt9w_.syellow[j++];
|
||||
sum+=spectra_.syellow[j++];
|
||||
}
|
||||
y2=gain2d*sum/m_binsPerPixel + m_plot2dZero;
|
||||
}
|
||||
|
||||
if(m_bReference) { //Reference (red)
|
||||
float df_ref=12000.0/6912.0;
|
||||
int j=FreqfromX(i)/df_ref + 0.5;
|
||||
y2=gain2d*spectra_.ref[j] + m_plot2dZero;
|
||||
}
|
||||
|
||||
if(i==iz-1) painter2D.drawPolyline(LineBuf,j);
|
||||
LineBuf[j].setX(i);
|
||||
LineBuf[j].setY(int(0.9*m_h2-y2*m_h2/70.0));
|
||||
|
||||
Reference in New Issue
Block a user