mirror of
https://github.com/bec-project/ophyd_devices.git
synced 2025-05-25 18:00:40 +02:00
fix: fixed drive_to_limit
This commit is contained in:
parent
9b3139ecf1
commit
3eea89acc5
@ -196,14 +196,15 @@ class GalilController(Controller):
|
||||
while self.is_axis_moving(None, axis_Id_numeric):
|
||||
time.sleep(0.1)
|
||||
|
||||
axis_Id = self.axis_Id_numeric_to_alpha(axis_Id_numeric)
|
||||
# check if we actually hit the limit
|
||||
if direction == "forward":
|
||||
limit = self.get_motor_limit_switch(axis_Id_numeric)[0]
|
||||
limit = self.get_motor_limit_switch(axis_Id)[0]
|
||||
elif direction == "reverse":
|
||||
limit = self.get_motor_limit_switch(axis_Id_numeric)[1]
|
||||
limit = self.get_motor_limit_switch(axis_Id)[1]
|
||||
|
||||
if not limit:
|
||||
raise GalilError(f"Failed to drive axis {axis_Id_numeric} to limit.")
|
||||
raise GalilError(f"Failed to drive axis {axis_Id}/{axis_Id_numeric} to limit.")
|
||||
|
||||
def find_reference(self, axis_Id_numeric: int) -> None:
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user