feat(controller): add print_command_history method for debugging command history

This commit is contained in:
2026-07-01 11:36:13 +02:00
committed by wakonig_k
parent f351e1c90f
commit b43da774ae
+8 -1
View File
@@ -149,7 +149,7 @@ class Controller(OphydObject):
try:
self.socket_put(val)
if remove_trailing_chars:
return self._remove_trailing_characters(self.sock.receive().decode())
return self._remove_trailing_characters(self.socket_get())
return self.socket_get()
except Exception as exc:
logger.error(
@@ -165,6 +165,13 @@ class Controller(OphydObject):
return var.split("\r\n")[0]
return var
@threadlocked
def print_command_history(self):
"""
Print the command history for debugging purposes.
"""
print("\n".join(self.command_history))
def get_axis_by_name(self, name: str) -> Device:
"""
Get an axis by name.