From 97d4e3f0d87727f7cbbee86f2cb0cebb97db177a Mon Sep 17 00:00:00 2001
From: Ramakrishnan Muthukrishnan <ram@leastauthority.com>
Date: Wed, 8 Jun 2022 10:18:04 +0530
Subject: [PATCH] transmit or receive, do not alter the Rx gain

---
 old_protocol.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/old_protocol.c b/old_protocol.c
index cfc87c6..e84da5c 100644
--- a/old_protocol.c
+++ b/old_protocol.c
@@ -1792,7 +1792,8 @@ static int last_power=0;
           if (rxgain > 60) rxgain=60;
 	  // encode all 6 bits of RXgain in ATT value and set bit6
           if (isTransmitting()) {
-	    output_buffer[C4] = 0x40 | (33 - (transmitter->attenuation & 0x1F));
+	      // output_buffer[C4] = 0x40 | (33 - (transmitter->attenuation & 0x1F));
+	    output_buffer[C4] = 0x40 | (rxgain & 0x3F);
           } else { 
 	    output_buffer[C4] = 0x40 | (rxgain & 0x3F);
           }
-- 
2.45.2