fix: tested and fixed move with device at Debye
This commit is contained in:
@@ -404,7 +404,7 @@ class Mo1Bragg(Device, PositionerBase):
|
||||
# Start motion
|
||||
self.move_abs.put(1)
|
||||
# Currently sleep is needed due to delay in updates on PVs, maybe time can be reduced
|
||||
time.sleep(0.25)
|
||||
time.sleep(0.5)
|
||||
while self.motor_is_moving.get() == 0:
|
||||
# TODO check if the _run_subs is needed since we have an auto_monitor on the readback PV
|
||||
# However, since the move_type can change, it might be necessary to have it here
|
||||
@@ -602,9 +602,6 @@ class Mo1Bragg(Device, PositionerBase):
|
||||
|
||||
if self.scan_control.scan_msg.get() != ScanControlLoadMessage.PENDING:
|
||||
self.scan_control.scan_val_reset.put(1)
|
||||
# Wait for reset to be done
|
||||
# TODO check if this sleep can really be removed
|
||||
# time.sleep(1)
|
||||
|
||||
if not self.wait_for_signals(
|
||||
signal_conditions=[(self.scan_control.scan_msg.get, ScanControlLoadMessage.PENDING)],
|
||||
|
||||
@@ -83,7 +83,7 @@ def test_move_succeeds(mock_bragg):
|
||||
with mock.patch.object(dev.motor_is_moving._read_pv, "mock_data", side_effect=[0, 1]):
|
||||
status = dev.move(0.5)
|
||||
# Sleep needed to allow thread to resolive in _move_and_finish, i.e. and the 0.25s sleep inside the function
|
||||
time.sleep(0.5)
|
||||
time.sleep(1)
|
||||
assert status.done is True
|
||||
assert status.success is True
|
||||
assert dev.setpoint.get() == 0.5
|
||||
@@ -96,7 +96,7 @@ def test_stop_move(mock_bragg):
|
||||
dev.motor_is_moving._read_pv.mock_data = 0
|
||||
# Move fails
|
||||
status = dev.move(0.5)
|
||||
time.sleep(0.5)
|
||||
time.sleep(1)
|
||||
assert status.done is False
|
||||
assert dev._stopped == False
|
||||
dev.stop()
|
||||
|
||||
Reference in New Issue
Block a user