From acc3ca4d016bf4299814024c7a84bd9999c4cf18 Mon Sep 17 00:00:00 2001 From: c vw Date: Tue, 25 May 2021 11:48:43 +0200 Subject: [PATCH] Fixed typo in rf_gain setting --- sliders.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sliders.c b/sliders.c index 087abb0..ec20ff2 100644 --- a/sliders.c +++ b/sliders.c @@ -144,7 +144,8 @@ int scale_timeout_cb(gpointer data) { } static void attenuation_value_changed_cb(GtkWidget *widget, gpointer data) { - adc[active_receiver->adc].attenuation=(int)gtk_range_get_value(GTK_RANGE(attenuation_scale)); + adc[active_receiver->adc].gain=gtk_range_get_value(GTK_RANGE(attenuation_scale)); + adc[active_receiver->adc].attenuation=(int)adc[active_receiver->adc].gain; #ifdef CLIENT_SERVER if(radio_is_remote) { send_attenuation(client_socket,active_receiver->id,(int)adc[active_receiver->adc].attenuation); @@ -388,7 +389,7 @@ void set_af_gain(int rx,double value) { } static void rf_gain_value_changed_cb(GtkWidget *widget, gpointer data) { - adc[active_receiver->adc].gain=gtk_range_get_value(GTK_RANGE(af_gain_scale)); + adc[active_receiver->adc].gain=gtk_range_get_value(GTK_RANGE(rf_gain_scale)); #ifdef SOAPYSDR if(protocol==SOAPYSDR_PROTOCOL) { soapy_protocol_set_gain(active_receiver); -- 2.45.2