]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
Consistent interface to set_squelch().
authorc vw <dl1ycf@darc.de>
Tue, 23 Nov 2021 15:40:40 +0000 (16:40 +0100)
committerc vw <dl1ycf@darc.de>
Tue, 23 Nov 2021 15:40:40 +0000 (16:40 +0100)
ext.c
rigctl.c
sliders.h

diff --git a/ext.c b/ext.c
index 397234b15e5489effbb5776637bad102fc5cc629..e968d4e74c23496db88507365aa918bc8b71564b 100644 (file)
--- a/ext.c
+++ b/ext.c
@@ -340,7 +340,10 @@ int ext_radio_change_sample_rate(void *data) {
 }
 
 int ext_update_squelch(void *data) {
-  set_squelch();
+  int id=GPOINTER_TO_INT(data);
+  if (id == 0 || id == 1) {
+    set_squelch(receiver[id]);
+  }
   return 0;
 }
 
index 76b00d26754b293752bc4f29efb88ff03e7b1644..00e9ffd984fa585c64931325a6ea67104ac854ec 100644 (file)
--- a/rigctl.c
+++ b/rigctl.c
@@ -3677,7 +3677,7 @@ int parse_cmd(void *data) {
             if(command[2]=='0') {
               int p2=atoi(&command[3]);
               active_receiver->squelch=(int)((double)p2/255.0*100.0+0.5);
-              set_squelch();
+              set_squelch(active_receiver);
             }
           } else {
           }
index 877abf60622e935483591415813b5f9a3e6b3f4f..145679e3d31baffbb1816765848c4fcc4af8e714 100644 (file)
--- a/sliders.h
+++ b/sliders.h
@@ -51,7 +51,7 @@ extern GtkWidget *sliders_init(int my_width, int my_height);
 
 extern void sliders_update();
 
-extern void set_squelch();
+extern void set_squelch(RECEIVER *rx);
 extern void set_compression(TRANSMITTER *tx);
 
 extern void show_diversity_gain();