From: Ramakrishnan Muthukrishnan <ram@rkrishnan.org>
Date: Mon, 15 Aug 2022 07:07:38 +0000 (+0530)
Subject: rit: zzru/zzrd now uses rit_increment than fixed increments
X-Git-Url: https://git.rkrishnan.org/components/%5B%5E?a=commitdiff_plain;h=6c4527743e72c409a8e60e1578abe4e65a6b6780;p=pihpsdr.git

rit: zzru/zzrd now uses rit_increment than fixed increments
---

diff --git a/rigctl.c b/rigctl.c
index bf8bec2..ded7e85 100644
--- a/rigctl.c
+++ b/rigctl.c
@@ -2145,15 +2145,13 @@ gboolean parse_extended_cmd(char *command, CLIENT *client) {
     case 'D': // ZZRD
       // decrement RIT frequency
       if (command[4] == ';') {
-        if (vfo[VFO_A].mode == modeCWL || vfo[VFO_A].mode == modeCWU) {
-          vfo[VFO_A].rit -= 10;
-        } else {
-          vfo[VFO_A].rit -= 50;
-        }
-        vfo_update();
+          vfo[VFO_A].rit -= rit_increment;
+	  vfo_update();
       } else if (command[9] == ';') {
-        vfo[VFO_A].rit = atoi(&command[4]);
-        vfo_update();
+	  command[9] = '\0';
+	  int rit_val = strtol(&command[4], NULL, 10);
+	  vfo[VFO_A].rit = rit_val;
+	  vfo_update();
       }
       break;
     case 'F': // ZZRF
@@ -2204,8 +2202,10 @@ gboolean parse_extended_cmd(char *command, CLIENT *client) {
 	  vfo[VFO_A].rit += rit_increment;
 	  vfo_update();
       } else if (command[9] == ';') {
-        vfo[VFO_A].rit = atoi(&command[4]);
-        vfo_update();
+	  command[9] = '\0';
+	  int rit_val = strtol(&command[4], NULL, 10);
+	  vfo[VFO_A].rit = rit_val;
+	  vfo_update();
       }
       break;
     default: