diff --git a/not1mm/__main__.py b/not1mm/__main__.py
index 96b42ad..14eda25 100644
--- a/not1mm/__main__.py
+++ b/not1mm/__main__.py
@@ -1971,6 +1971,8 @@ def cwspeed_spinbox_changed(self) -> None:
if self.pref.get("cwtype") == 3 and self.rig_control is not None:
if self.rig_control.interface == "flrig":
self.rig_control.cat.set_flrig_cw_speed(self.cw_speed.value())
+ elif self.rig_control.interface == "rigctld":
+ self.rig_control.cat.set_rigctl_cw_speed(self.cw_speed.value())
def stop_cw(self):
""""""
diff --git a/not1mm/lib/cat_interface.py b/not1mm/lib/cat_interface.py
index 660633c..15abdf1 100644
--- a/not1mm/lib/cat_interface.py
+++ b/not1mm/lib/cat_interface.py
@@ -9,7 +9,7 @@
command lines to test the CW API via XMLRPC
Setting WPM
-curl -d "rig.cwio_set_wpm28" http://localhost:12345
+curl -d "rig.cwio_set_wpm28" http://localhost:12345
Setting the text to send
curl -d "rig.cwio_texttest test test" http://localhost:12345
@@ -178,6 +178,21 @@ def sendcwrigctl(self, texttosend):
self.__initialize_rigctrld()
return False
+ def set_rigctl_cw_speed(self, speed):
+ """Set CW speed via rigctld"""
+ if self.rigctrlsocket:
+ try:
+ self.online = True
+ self.rigctrlsocket.send(bytes(f"L KEYSPD {speed}\n", "utf-8"))
+ _ = self.__get_serial_string()
+ return
+ except socket.error as exception:
+ self.online = False
+ logger.debug("set_level_rigctld: %s", f"{exception}")
+ self.rigctrlsocket = None
+ return
+ self.__initialize_rigctrld()
+
def sendcwxmlrpc(self, texttosend):
"""Add text to flrig's cw send buffer."""
logger.debug(f"{texttosend=}")