fix(controller): Add method to remove axis from controller

This commit is contained in:
2025-12-10 14:40:15 +01:00
committed by Christian Appel
parent 083f1d4dfd
commit 713fa1a1b7
2 changed files with 38 additions and 0 deletions

View File

@@ -248,6 +248,18 @@ class Controller(OphydObject):
"""
self._axis[axis_nr] = axis
@axis_checked
def remove_axis(self, *, axis_nr: int) -> None:
"""Remove the device instance assigned to a controller axis.
Args:
axis_nr (int): Controller axis number
"""
self._axis[axis_nr] = None
if not any(self._axis):
self.off(update_config=False)
@axis_checked
def get_axis(self, axis_nr: int) -> Device:
"""Get device instance for a specified controller axis.