From 6c4527743e72c409a8e60e1578abe4e65a6b6780 Mon Sep 17 00:00:00 2001 From: Ramakrishnan Muthukrishnan Date: Mon, 15 Aug 2022 12:37:38 +0530 Subject: [PATCH] rit: zzru/zzrd now uses rit_increment than fixed increments --- rigctl.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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: -- 2.45.2