From 02e46eb1df07f5c666b9a6341f7c8ffaa8798d21 Mon Sep 17 00:00:00 2001 From: c vw Date: Tue, 23 Nov 2021 16:40:40 +0100 Subject: [PATCH] Consistent interface to set_squelch(). --- ext.c | 5 ++++- rigctl.c | 2 +- sliders.h | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ext.c b/ext.c index 397234b..e968d4e 100644 --- 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; } diff --git a/rigctl.c b/rigctl.c index 76b00d2..00e9ffd 100644 --- 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 { } diff --git a/sliders.h b/sliders.h index 877abf6..145679e 100644 --- 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(); -- 2.45.2