From 9f22149fadb4bdd24ab8d9282471e24ef61f36f3 Mon Sep 17 00:00:00 2001 From: c vw Date: Sun, 23 May 2021 12:23:48 +0200 Subject: [PATCH] Moved rfgain and attenuation to ADC struct. --- gpio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gpio.c b/gpio.c index d62e604..0c51649 100644 --- a/gpio.c +++ b/gpio.c @@ -1950,7 +1950,7 @@ static void encoder_changed(int action,int pos) { set_af_gain(1,value); break; case ENCODER_RF_GAIN: - value=active_receiver->rf_gain; + value=adc[active_receiver->adc].gain; value+=(double)pos; if(value<0.0) { value=0.0; @@ -1960,7 +1960,7 @@ static void encoder_changed(int action,int pos) { set_rf_gain(active_receiver->id,value); break; case ENCODER_RF_GAIN_RX1: - value=receiver[0]->rf_gain; + value=adc[receiver[0]->adc].gain; value+=(double)pos; if(value<0.0) { value=0.0; @@ -1970,7 +1970,7 @@ static void encoder_changed(int action,int pos) { set_rf_gain(0,value); break; case ENCODER_RF_GAIN_RX2: - value=receiver[1]->rf_gain; + value=adc[receiver[1]->adc].gain; value+=(double)pos; if(value<0.0) { value=0.0; @@ -2028,7 +2028,7 @@ static void encoder_changed(int action,int pos) { filter_shift_changed(1,pos); break; case ENCODER_ATTENUATION: - value=(double)adc_attenuation[active_receiver->adc]; + value=(double)adc[active_receiver->adc].attenuation; value+=(double)pos; if(have_rx_gain) { if(value<-12.0) { -- 2.45.2