From: Ramakrishnan Muthukrishnan <ram@rkrishnan.org>
Date: Tue, 11 Jan 2022 16:27:02 +0000 (+0530)
Subject: Revert "af gain: for now, directly change receiver[0]'s gain"
X-Git-Url: https://git.rkrishnan.org/components/specifications/banana.xhtml?a=commitdiff_plain;h=86dc3ae63decf0e78a7d9910f75be8b6c11a52c6;p=pihpsdr.git

Revert "af gain: for now, directly change receiver[0]'s gain"

This reverts commit 9ed7e1480ea9d3b7398aff5b0591aa94becf2cbe.
---

diff --git a/rigctl.c b/rigctl.c
index 2040982..100c98f 100644
--- a/rigctl.c
+++ b/rigctl.c
@@ -953,12 +953,12 @@ gboolean parse_extended_cmd(char *command, CLIENT *client) {
       // read/set audio gain
       if (command[4] == ';') {
         // send reply back
-        sprintf(reply, "ZZAG%03d;", (int)(receiver[0]->volume * 100.0));
+        sprintf(reply, "ZZAG%03d;", (int)(active_receiver->volume * 100.0));
         send_resp(client->fd, reply);
       } else if (command[7] == ';') {
           command[7] = '\0';
           int gain = atoi(&command[4]);
-          receiver[0]->volume = (double)gain / 100.0;
+          active_receiver->volume = (double)gain / 100.0;
           update_af_gain();
       }
       break;