From: Ramakrishnan Muthukrishnan <ram@rkrishnan.org>
Date: Wed, 12 Jan 2022 07:22:41 +0000 (+0530)
Subject: more rounding experiments
X-Git-Url: https://git.rkrishnan.org/frontends/specifications/-?a=commitdiff_plain;h=d98a615a63ef38a63ec85c565740ee18cd296ac7;p=pihpsdr.git

more rounding experiments
---

diff --git a/rigctl.c b/rigctl.c
index c1f0ce4..9390919 100644
--- a/rigctl.c
+++ b/rigctl.c
@@ -1822,7 +1822,7 @@ gboolean parse_extended_cmd(char *command, CLIENT *client) {
         if (command[4] == ';') {
             memset(reply, '\0', 9);
             printf("getting MIC GAIN: %f\n", mic_gain);
-            sprintf(reply, "ZZMG%03d;", (int) round((round(mic_gain + 12.0) * 100.0 / 62.0)));
+            sprintf(reply, "ZZMG%03d;", (int) round((mic_gain + 12.0) * 100.0) / 62);
             send_resp(client->fd, reply);
         } else if (command[7] == ';') {
             command[7] = '\0';