diff --git a/jtms3.pro b/jtms3.pro index e5712718e..93c322e60 100644 --- a/jtms3.pro +++ b/jtms3.pro @@ -6,7 +6,7 @@ QT += core gui network CONFIG += qwt thread -#CONFIG += console +CONFIG += console TARGET = jtms3 VERSION = 0.1 diff --git a/libm65/specjtms.f90 b/libm65/specjtms.f90 index d76e5eb9a..6b7965c12 100644 --- a/libm65/specjtms.f90 +++ b/libm65/specjtms.f90 @@ -20,6 +20,8 @@ subroutine specjtms(k,px,pxsmo,spk0,f0) sqsmo=0. endif + if(k.lt.kstep .or. k.gt.NSMAX) return + t=k/48000.0 nfft=4096 df=48000.0/nfft @@ -38,10 +40,12 @@ subroutine specjtms(k,px,pxsmo,spk0,f0) px=db(sq) - 23.0 pxsmo=db(sqsmo) - 23.0 - do i=i0,ia-1 - d=id(i) - sq=sq + d*d - enddo + if(i0.gt.0) then + do i=i0,ia-1 + d=id(i) + sq=sq + d*d + enddo + endif sq0=sq ! write(13,1010) t,rms,sq,px,pxsmo !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 - j0=nint(2.0*1428.57/df) +! j0=nint(2.0*1428.57/df) + j0=nint(2.0*1500.0/df) ja=j0-107 jb=j0+107 do j=ja,jb diff --git a/mainwindow.cpp b/mainwindow.cpp index cdaf00d10..fdb6acede 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,4 +1,4 @@ -//--------------------------------------------------------------- MainWindow +//---------------------------------------------------------------- MainWindow #include "mainwindow.h" #include "ui_mainwindow.h" #include "devsetup.h" diff --git a/plotter.cpp b/plotter.cpp index eac3074df..c206a0bbe 100644 --- a/plotter.cpp +++ b/plotter.cpp @@ -112,17 +112,18 @@ void CPlotter::draw(float green[], int ig) //draw() int i,j,w,h; float y; int y1; + static int ig0=99999; w = m_WaterfallPixmap.width(); h = m_WaterfallPixmap.height(); + if(ig