@@ -55,7 +55,7 @@ async def heart_beat(controller):
5555async def periodic_update (controller ):
5656 while True :
5757 # first data after 2 seconds ...
58- await asyncio .sleep (2.0 )
58+ await asyncio .sleep (0.5 )
5959 try :
6060 controller .periodic_trigger ()
6161 except NoCollectionsError as nc :
@@ -68,6 +68,13 @@ def main():
6868 dispatcher = asyncio_dispatcher .AsyncioDispatcher ()
6969 builder .SetDeviceName ("OrbCol" )
7070 controller = Controller (prefix = "" , device_names = _dev_names )
71+ # deselect some bpms
72+ for dev_name in ["BPMZ4L4RP" ]:
73+ continue
74+ controller .update (dev_name = dev_name , enabled = False , plane = "x" )
75+ controller .update (dev_name = dev_name , enabled = False , plane = "y" )
76+
77+
7178 builder .LoadDatabase ()
7279 softioc .iocInit (dispatcher )
7380
@@ -76,6 +83,7 @@ def main():
7683 dispatcher (bpm_data_receive , func_args = (controller , dev_name ,))
7784 dispatcher (bpm_data_sync_stat , func_args = (controller , dev_name ,))
7885 dispatcher (heart_beat , func_args = (controller ,))
86+ # todo: check if controller does not call it by itself
7987 dispatcher (periodic_update , func_args = (controller ,))
8088
8189 # Finally leave the IOC running with an interactive shell.
0 commit comments