]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
round the value after all the calculation
authorRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Fri, 14 Jan 2022 10:24:49 +0000 (15:54 +0530)
committerRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Fri, 14 Jan 2022 10:24:49 +0000 (15:54 +0530)
rigctl.c

index 4f3fbb43811dd92a4971a019adc9cca07ae467ab..67e7cf2db2d158dbc3eaf65f7578569866ee78cf 100644 (file)
--- 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;
           }