From: c vw <dl1ycf@darc.de>
Date: Tue, 1 Jun 2021 15:09:01 +0000 (+0200)
Subject: small corrections
X-Git-Url: https://git.rkrishnan.org/simplejson/components/frontends/index.php?a=commitdiff_plain;h=9bd3145b44b450274118e17ce545375b6fb1882a;p=pihpsdr.git

small corrections
---

diff --git a/sliders.c b/sliders.c
index 6ccefcd..c8a4c95 100644
--- a/sliders.c
+++ b/sliders.c
@@ -137,8 +137,7 @@ int scale_timeout_cb(gpointer data) {
 }
 
 static void attenuation_value_changed_cb(GtkWidget *widget, gpointer data) {
-  adc[active_receiver->adc].gain=gtk_range_get_value(GTK_RANGE(attenuation_scale));
-  adc[active_receiver->adc].attenuation=(int)adc[active_receiver->adc].gain;
+  adc[active_receiver->adc].attenuation=gtk_range_get_value(GTK_RANGE(attenuation_scale));
 #ifdef CLIENT_SERVER
   if(radio_is_remote) {
     send_attenuation(client_socket,active_receiver->id,(int)adc[active_receiver->adc].attenuation);
@@ -405,7 +404,7 @@ void update_rf_gain() {
 
 void set_rf_gain(int rx,double value) {
   g_print("%s\n",__FUNCTION__);
-  adc[receiver[rx]->id].gain=value;
+  adc[receiver[rx]->adc].gain=value;
 #ifdef SOAPYSDR
   if(protocol==SOAPYSDR_PROTOCOL) {
     soapy_protocol_set_gain(receiver[rx]);