fix (mo1-bragg): fix code after test with hardware at the beamline
This commit is contained in:
@@ -325,10 +325,10 @@ class Mo1Bragg(PSIDeviceBase, Mo1BraggPositioner):
|
||||
timeout = self.timeout_for_pvwait
|
||||
start_time = time.time()
|
||||
while time.time() - start_time < timeout:
|
||||
if self.stopped is True:
|
||||
raise DeviceStopError(f"Device {self.name} was stopped while waiting for signal")
|
||||
if signal.get() == value:
|
||||
return None
|
||||
if self.stopped is True: # Should this check be optional or configurable?!
|
||||
raise DeviceStopError(f"Device {self.name} was stopped while waiting for signal")
|
||||
time.sleep(0.1)
|
||||
# If we end up here, the status did not resolve
|
||||
raise TimeoutError(
|
||||
@@ -442,10 +442,14 @@ class Mo1Bragg(PSIDeviceBase, Mo1BraggPositioner):
|
||||
|
||||
def _update_scan_parameter(self):
|
||||
"""Get the scan_info parameters for the scan."""
|
||||
for key, value in self.scan_info.msg.request_inputs["inputs"].items():
|
||||
if hasattr(self.scan_parameter, key):
|
||||
setattr(self.scan_parameter, key, value)
|
||||
for key, value in self.scan_info.msg.request_inputs["kwargs"].items():
|
||||
if hasattr(self.scan_parameter, key):
|
||||
setattr(self.scan_parameter, key, value)
|
||||
|
||||
|
||||
def _check_scan_msg(self, target_state: ScanControlLoadMessage) -> None:
|
||||
"""Check if the scan message is gettting available
|
||||
|
||||
|
||||
Reference in New Issue
Block a user