This commit is contained in:
2022-08-22 15:18:06 +02:00
parent d8b34a3f99
commit 1c1e93a4d2
3 changed files with 24 additions and 37 deletions

View File

@@ -50,19 +50,19 @@ def assert_tweaker_positions(targets, timeout=60.0):
summary = []
for i, m in enumerate(targets):
motor, target, tolerance = m
name = motor.short_name
pend_event()
cur = motor.get_position()
#name = motor.short_name
#pend_event()
cur = motor.get_rbv()
done = motor.is_done()
logger.debug("check {}[done={}]: {} == {}".format(name, done, cur, target))
summary.append("{}[done={}]: {} == {}".format(name, done, cur, target))
#logger.debug("check {}[done={}]: {} == {}".format(name, done, cur, target))
#summary.append("{}[done={}]: {} == {}".format(name, done, cur, target))
if done and tolerance >= abs(cur - target):
count += 1
pend_event(0.1)
#pend_event(0.1)
if count == num_motors:
break
pend_event(0.1)
#pend_event(0.1)
if count != num_motors:
raise PositionsNotReached("failed to reach target positions: {}".format("#".join(summary)))