From c4e5d3a102018a1f723e963c4c0e0caa9c107259 Mon Sep 17 00:00:00 2001
From: c vw <dl1ycf@darc.de>
Date: Wed, 19 Jan 2022 15:45:47 +0100
Subject: [PATCH] Make sure both receivers have the same sample rate when
 changing from single-RX to dual-RX in P1 (Thanks Rick).

---
 radio.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/radio.c b/radio.c
index 3f88e03..bdd3a32 100644
--- a/radio.c
+++ b/radio.c
@@ -1427,6 +1427,12 @@ g_print("radio_change_receivers: from %d to %d\n",receivers,r);
 	gtk_fixed_put(GTK_FIXED(fixed),receiver[1]->panel,0,0);
 	set_displaying(receiver[1],1);
 	receivers=2;
+	//
+	// Make sure RX1 shares the sample rate  with RX0 when running P1.
+	//
+	if (protocol == ORIGINAL_PROTOCOL && receiver[1]->sample_rate != receiver[0]->sample_rate) {
+	    receiver_change_sample_rate(receiver[1],receiver[0]->sample_rate);
+	}
 	break;
   }
   reconfigure_radio();
-- 
2.45.2