]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
fixed panadapter for sample rate change
authorJohn Melton - G0ORX/N6LYT <john.d.melton@googlemail.com>
Sun, 24 Jul 2016 15:06:44 +0000 (15:06 +0000)
committerJohn Melton - G0ORX/N6LYT <john.d.melton@googlemail.com>
Sun, 24 Jul 2016 15:06:44 +0000 (15:06 +0000)
panadapter.c
pihpsdr
release/pihpsdr.tar
release/pihpsdr/pihpsdr

index 4898006c0140aa0549a0fc2d06fdc12bdaed1f8b..b4ca1101553b3b746d82a8665d5a46964f9a239a 100644 (file)
@@ -188,6 +188,7 @@ void panadapter_update(float *data,int tx) {
     gfloat saved_hz_per_pixel;
     cairo_text_extents_t extents;
 
+    hz_per_pixel=(double)getSampleRate()/(double)display_width;
     samples=data;
     //if(result==1) {
         if(panadapter_surface) {
@@ -255,13 +256,7 @@ void panadapter_update(float *data,int tx) {
             long divisor=20000;
             long half=(long)getSampleRate()/2L;
             long frequency=getFrequency();
-/*
-            if(mode==modeCWU) {
-              frequency=frequency+cw_keyer_sidetone_frequency;
-            } else if(mode==modeCWL) {
-              frequency=frequency-cw_keyer_sidetone_frequency;
-            }
-*/
+fprintf(stderr,"panadapter_update: sample_rate=%d\n",sample_rate);
             switch(sample_rate) {
               case 48000:
                 divisor=5000L;
diff --git a/pihpsdr b/pihpsdr
index be2b601747f922a6a4bd7bb4ef0a303c71d479ea..27974e76a941f5819b95e6e4dfe64989ad38342e 100755 (executable)
Binary files a/pihpsdr and b/pihpsdr differ
index 20231a846ca742133f091f65930147d4354bc4c4..37c11550d1e3331b77be0c899ec73f87d94a3c92 100644 (file)
Binary files a/release/pihpsdr.tar and b/release/pihpsdr.tar differ
index be2b601747f922a6a4bd7bb4ef0a303c71d479ea..27974e76a941f5819b95e6e4dfe64989ad38342e 100755 (executable)
Binary files a/release/pihpsdr/pihpsdr and b/release/pihpsdr/pihpsdr differ