From a1a8ea2089d058e9b79760308992ad0da5d8ad38 Mon Sep 17 00:00:00 2001 From: Ramakrishnan Muthukrishnan Date: Fri, 14 Jan 2022 15:54:49 +0530 Subject: [PATCH] round the value after all the calculation --- rigctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rigctl.c b/rigctl.c index 4f3fbb4..67e7cf2 100644 --- a/rigctl.c +++ b/rigctl.c @@ -3480,7 +3480,7 @@ int parse_cmd(void *data) { printf("setting attn level [0..99]: %d\n", attI); if (have_rx_gain) { - att = round((attI * 60.0) / 99.0) - 12.0; + att = round(((attI * 60.0) / 99.0) - 12.0); } else { att = (attI * 31.0) / 99.0; } -- 2.45.2