]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
small corrections
authorc vw <dl1ycf@darc.de>
Wed, 19 May 2021 14:58:23 +0000 (16:58 +0200)
committerc vw <dl1ycf@darc.de>
Wed, 19 May 2021 14:58:23 +0000 (16:58 +0200)
old_protocol.c
receiver.c
rx_panadapter.c

index 229f1a93c7d1163084d9a96f244d4caea0c3c099..eece1fb667c1d10d7da0a48df7856ec76225b4ea 100644 (file)
@@ -1703,9 +1703,9 @@ void ozy_send_buffer() {
           } else {
            // if diversity is enabled, use RX1 att value for RX2
             if (diversity_enabled) {
-              output_buffer[C1]=0x20 | (adc[receiver[0]->adc].attenuation & 0x1F);
+              output_buffer[C1]=0x20 | (adc[0].attenuation & 0x1F);
            } else {
-              output_buffer[C1]=0x20 | (adc[receiver[1]->adc].attenuation & 0x1F);
+              output_buffer[C1]=0x20 | (adc[1].attenuation & 0x1F);
            }
           }
         }
index 552aa82fdfc9262ffd44047ccdac71d20917f5de..28730bf72007dcf136499e352c4d9d095b2cf362 100644 (file)
@@ -1217,13 +1217,6 @@ void receiver_change_adc(RECEIVER *rx,int adc) {
 
 void receiver_change_sample_rate(RECEIVER *rx,int sample_rate) {
 
-//
-// For  the PS_RX_FEEDBACK receiver we have to change
-// the number of pixels in the display (needed for
-// conversion from higher sample rates to 48K such
-// that the central part can be displayed in the TX panadapter
-//
-
   g_mutex_lock(&rx->mutex);
 
   rx->sample_rate=sample_rate;
@@ -1242,13 +1235,12 @@ g_print("%s: id=%d rate=%d scale=%d buffer_size=%d output_samples=%d\n",__FUNCTI
   // feedback and must then return (rx->id is not a WDSP channel!)
   // 
   if (rx->id == PS_RX_FEEDBACK && protocol == ORIGINAL_PROTOCOL) {
-      rx->pixels = 2* scale * rx->width;
-      g_free(rx->pixel_samples);
-      rx->pixel_samples=g_new(float,rx->pixels);
-      init_analyzer(rx);
-      g_print("%s: PS FEEDBACK: id=%d rate=%d buffer_size=%d output_samples=%d\n",
-                     __FUNCTION__,rx->id, rx->sample_rate, rx->buffer_size, rx->output_samples);
-    }
+    rx->pixels = 2* scale * rx->width;
+    g_free(rx->pixel_samples);
+    rx->pixel_samples=g_new(float,rx->pixels);
+    init_analyzer(rx);
+    g_print("%s: PS FEEDBACK: id=%d rate=%d buffer_size=%d output_samples=%d\n",
+            __FUNCTION__,rx->id, rx->sample_rate, rx->buffer_size, rx->output_samples);
     g_mutex_unlock(&rx->mutex);
     return;
   }
index 12bacc5e19ccd6d678d9f676e909f472ba65e59f..dd13397c908067d5b47c9162bc190e7dc116ae26 100644 (file)
@@ -502,7 +502,7 @@ void rx_panadapter_update(RECEIVER *rx) {
 #ifdef SOAPYSDR
   if(protocol==SOAPYSDR_PROTOCOL) {
     //s1-=rx->rf_gain;
-    s1-=adc[rx->id].gain;
+    s1-=adc[rx->adc].gain;
   }
 #endif
 
@@ -524,7 +524,7 @@ void rx_panadapter_update(RECEIVER *rx) {
 #ifdef SOAPYSDR
     if(protocol==SOAPYSDR_PROTOCOL) {
       //s2-=rx->rf_gain;
-      s2-=adc[rx->id].gain;
+      s2-=adc[rx->adc].gain;
     }
 #endif
     s2 = floor((rx->panadapter_high - s2)