mirror of
https://github.com/bec-project/ophyd_devices.git
synced 2025-06-25 04:01:09 +02:00
Spyder style fixes...
This commit is contained in:
@ -6,7 +6,7 @@ Created on Mon Jun 3 14:16:29 2024
|
||||
"""
|
||||
|
||||
from time import sleep
|
||||
from ophyd import Device, Signal, SignalRO, Component
|
||||
from ophyd import Device, SignalRO, Component
|
||||
from std_daq_client import StdDaqClient
|
||||
|
||||
|
||||
@ -74,9 +74,11 @@ class StdDaqClientDevice(Device):
|
||||
|
||||
|
||||
def stage(self):
|
||||
self.client.start_writer_async({'output_file': self._output_file, 'n_images': self._n_images})
|
||||
|
||||
return
|
||||
self.client.start_writer_async(
|
||||
{'output_file': self._output_file, 'n_images': self._n_images}
|
||||
)
|
||||
sleep(0.1)
|
||||
return super().stage()
|
||||
#while True:
|
||||
# sleep(0.1)
|
||||
# daq_status = self.client.get_status()
|
||||
@ -84,13 +86,23 @@ class StdDaqClientDevice(Device):
|
||||
# break
|
||||
|
||||
def unstage(self):
|
||||
""" Stop a running acquisition """
|
||||
self.client.stop_writer()
|
||||
return super().unstage()
|
||||
|
||||
def stop(self, *, success=False):
|
||||
""" Stop a running acquisition """
|
||||
self.client.stop_writer()
|
||||
|
||||
def stop(self):
|
||||
self.client.stop_writer()
|
||||
if success:
|
||||
while True:
|
||||
sleep(0.1)
|
||||
daq_status = self.client.get_status()
|
||||
if daq_status['acquisition']['state'] in ["STOPPED", "FINISHED"]:
|
||||
break
|
||||
|
||||
def poll(self):
|
||||
|
||||
""" Querry the currrent status from Std DAQ"""
|
||||
daq_status = self.client.get_status()
|
||||
|
||||
# Put if new value (put runs subscriptions)
|
||||
@ -111,7 +123,7 @@ class StdDaqClientDevice(Device):
|
||||
|
||||
|
||||
def poll_device_config(self):
|
||||
|
||||
""" Querry the currrent configuration from Std DAQ"""
|
||||
daq_config = self.client.get_config()
|
||||
|
||||
# Put if new value (put runs subscriptions)
|
||||
@ -132,25 +144,3 @@ class StdDaqClientDevice(Device):
|
||||
|
||||
if self.start_udp_port.value != daq_config['start_udp_port']:
|
||||
self.start_udp_port.put(daq_config['start_udp_port'])
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user