Fixed a few bugs preventing normal monitoring.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/jtms3@2513 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2012-07-13 16:45:26 +00:00
parent bdd7081225
commit e353e22d06
4 changed files with 20 additions and 14 deletions

View File

@ -6,7 +6,7 @@
QT += core gui network QT += core gui network
CONFIG += qwt thread CONFIG += qwt thread
#CONFIG += console CONFIG += console
TARGET = jtms3 TARGET = jtms3
VERSION = 0.1 VERSION = 0.1

View File

@ -20,6 +20,8 @@ subroutine specjtms(k,px,pxsmo,spk0,f0)
sqsmo=0. sqsmo=0.
endif endif
if(k.lt.kstep .or. k.gt.NSMAX) return
t=k/48000.0 t=k/48000.0
nfft=4096 nfft=4096
df=48000.0/nfft df=48000.0/nfft
@ -38,10 +40,12 @@ subroutine specjtms(k,px,pxsmo,spk0,f0)
px=db(sq) - 23.0 px=db(sq) - 23.0
pxsmo=db(sqsmo) - 23.0 pxsmo=db(sqsmo) - 23.0
if(i0.gt.0) then
do i=i0,ia-1 do i=i0,ia-1
d=id(i) d=id(i)
sq=sq + d*d sq=sq + d*d
enddo enddo
endif
sq0=sq sq0=sq
! write(13,1010) t,rms,sq,px,pxsmo ! write(13,1010) t,rms,sq,px,pxsmo
!1010 format(5f12.3) !1010 format(5f12.3)
@ -71,7 +75,8 @@ subroutine specjtms(k,px,pxsmo,spk0,f0)
call four2a(cx2,nfft,1,-1,1) !Forward c2c FFT of cx2 call four2a(cx2,nfft,1,-1,1) !Forward c2c FFT of cx2
j0=nint(2.0*1428.57/df) ! j0=nint(2.0*1428.57/df)
j0=nint(2.0*1500.0/df)
ja=j0-107 ja=j0-107
jb=j0+107 jb=j0+107
do j=ja,jb do j=ja,jb

View File

@ -1,4 +1,4 @@
//--------------------------------------------------------------- MainWindow //---------------------------------------------------------------- MainWindow
#include "mainwindow.h" #include "mainwindow.h"
#include "ui_mainwindow.h" #include "ui_mainwindow.h"
#include "devsetup.h" #include "devsetup.h"

View File

@ -112,17 +112,18 @@ void CPlotter::draw(float green[], int ig) //draw()
int i,j,w,h; int i,j,w,h;
float y; float y;
int y1; int y1;
static int ig0=99999;
w = m_WaterfallPixmap.width(); w = m_WaterfallPixmap.width();
h = m_WaterfallPixmap.height(); h = m_WaterfallPixmap.height();
if(ig<ig0) {
m_WaterfallPixmap.fill(Qt::black);
m_ZoomWaterfallPixmap.fill(Qt::black);
m_2DPixmap.fill(Qt::black);
}
ig0=ig;
double gain = pow(10.0,0.05*(m_plotGain+7)); double gain = pow(10.0,0.05*(m_plotGain+7));
//move current data down one line
//(must do this before attaching a QPainter object)
// m_WaterfallPixmap.scroll(0,1,0,0,w,h);
// m_ZoomWaterfallPixmap.scroll(0,1,0,0, w, h);
// memmove(&m_zwf[32768],m_zwf,32768*(h-1));
QPainter painter1(&m_WaterfallPixmap); QPainter painter1(&m_WaterfallPixmap);
QPainter painter2D(&m_2DPixmap); QPainter painter2D(&m_2DPixmap);
painter2D.setPen(Qt::green); painter2D.setPen(Qt::green);