} 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);
}
}
}
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;
// 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;
}