mirror of
https://github.com/bec-project/ophyd_devices.git
synced 2026-07-08 00:11:01 +02:00
feat(controller): add print_command_history method for debugging command history
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user