From: John Melton - G0ORX/N6LYT Date: Fri, 19 Aug 2016 15:05:19 +0000 (+0000) Subject: new_protocol TX Panadapter changes X-Git-Url: https://git.rkrishnan.org/pf/frontends/...?a=commitdiff_plain;h=2356beb4bbc492e22d1ce2bf42d6d2a477cf1779;p=pihpsdr.git new_protocol TX Panadapter changes --- diff --git a/Makefile b/Makefile index 83f900b..3da5170 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ UNAME_N=raspberrypi CC=gcc LINK=gcc -# uncomment the line below for various denug facilities +# uncomment the line below for various debug facilities #DEBUG_OPTION=-D DEBUG # uncomment the line below for LimeSDR (uncomment line below) diff --git a/main.c b/main.c index df5448c..ac0427c 100644 --- a/main.c +++ b/main.c @@ -508,7 +508,11 @@ fprintf(stderr,"protocol=%d name=%s\n",d->protocol,d->name); radioRestoreState(); - samples=malloc(display_width*sizeof(float)*2); + if(protocol==NEW_PROTOCOL) { + samples=malloc(display_width*sizeof(float)*2*4); // 192 -> 48 + } else { + samples=malloc(display_width*sizeof(float)*2); + } //splash_status("Initializing wdsp ..."); wdsp_init(0,display_width,d->protocol); diff --git a/panadapter.c b/panadapter.c index 9d34baf..8c9608d 100644 --- a/panadapter.c +++ b/panadapter.c @@ -194,11 +194,11 @@ void panadapter_update(float *data,int tx) { panadapter_high=20; panadapter_low=-80; - if(protocol==ORIGINAL_PROTOCOL) { + //if(protocol==ORIGINAL_PROTOCOL) { hz_per_pixel=48000.0/(double)display_width; - } else { - hz_per_pixel=192000.0/(double)display_width; - } + //} else { + // hz_per_pixel=192000.0/(double)display_width; + //} } //clear_panadater_surface(); @@ -312,7 +312,7 @@ void panadapter_update(float *data,int tx) { } // agc - if(agc!=AGC_OFF) { + if(agc!=AGC_OFF && !tx) { double hang=0.0; double thresh=0; @@ -365,17 +365,34 @@ void panadapter_update(float *data,int tx) { double s1,s2; samples[0]=-200.0; samples[display_width-1]=-200.0; - s1=(double)samples[0]+(double)get_attenuation()-20.0; - s1 = floor((panadapter_high - s1) - * (double) display_height - / (panadapter_high - panadapter_low)); - cairo_move_to(cr, 0.0, s1); - for(i=1;i 48 easy + } SetAnalyzer(channel, n_pixout, spur_elimination_ffts, //number of LO frequencies = number of ffts used in elimination