Commit 854d5c14 authored by bliss administrator's avatar bliss administrator

stop/start bpm when acq. stop/start

Can only works with lima-tango-server 1.9.2 where stateless attributes are available now
parent 11582669
......@@ -75,7 +75,6 @@ class BVWebserver:
return False
bpm_device.subscribe_event('bvdata', PyTango.EventType.CHANGE_EVENT, self.decode_bvdata)
bpm_device.Start()
return True
......@@ -260,11 +259,20 @@ class BVWebserver:
self.setExposuretime(float(bottle.request.query.exp_t), camera)
self.setAcqRate(float(bottle.request.query.acq_rate), camera)
# reset acq. parameters to not depend on other application settings
self.cameras_running[camera][0].saving_mode = 'manual'
self.cameras_running[camera][0].acq_trigger_mode = 'internal_trigger'
self.cameras_running[camera][0].acq_mode = 'single'
if bool(int(bottle.request.query.live)):
self.cameras_running[camera][0].acq_nb_frames = 0
else:
self.cameras_running[camera][0].acq_nb_frames = 1
# always start first the bpm device
if self.cameras_running[camera][1].State() != PyTango.DevState.ON:
self.cameras_running[camera][1].Start()
self.cameras_running[camera][0].prepareAcq()
self.cameras_running[camera][0].startAcq()
......@@ -275,6 +283,7 @@ class BVWebserver:
return bottle.HTTPResponse(status=400, body={"message": "camera/bpm not running"})
self.cameras_running[camera][0].stopAcq()
self.cameras_running[camera][1].Stop()
return { "message": "acquisition stopped"}
def getimgdisplay(self, camera):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment