]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
implement ZZCS command (set or get CW keyer speed)
authorRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Tue, 11 Jan 2022 09:26:12 +0000 (14:56 +0530)
committerRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Tue, 11 Jan 2022 09:26:12 +0000 (14:56 +0530)
rigctl.c

index 34f5079da1f5fe7dabaf314e5db5d109768eb314..99cd2196b81a3d5a260ff8e7a42c1840439bd162 100644 (file)
--- a/rigctl.c
+++ b/rigctl.c
@@ -1271,7 +1271,20 @@ gboolean parse_extended_cmd(char *command, CLIENT *client) {
       }
       break;
     case 'S': // ZZCS
-      implemented = FALSE;
+        if (command[4] == ';') {
+            sprintf(reply, "ZZCS%02d;", cw_keyer_speed);
+            send_resp(client->fd, reply);
+        } else if (command[6] == ';') {
+            command[6] = '\0';
+            int speed = atoi(&command[4]);
+            if (speed >= 1 && speed <= 60) {
+                cw_keyer_speed = speed;
+#ifdef LOCALCW
+                keyer_update();
+#endif
+                vfo_update();
+            }
+        }
       break;
     case 'T': // ZZCT
       implemented = FALSE;