Script execution
This commit is contained in:
@@ -39,11 +39,10 @@ class CamTool(DeviceBase):
|
||||
print "Started",
|
||||
self.prefix = prefix
|
||||
self.latch = latch
|
||||
self.mode = "latch" if latch else "pipeline"
|
||||
self.data_prefix = prefix + self.mode + "."
|
||||
self.cam_run = Channel(prefix + "camera.run", alias = name + " run")
|
||||
self.cam_latch = Channel(prefix + "latch.capture", 'l', alias = name + " latch")
|
||||
if self.mode == "latch":
|
||||
if self.latch:
|
||||
self.start()
|
||||
self.cam_latch.write(1)
|
||||
self.waitForChannel(self.data_prefix + "timestamp",20)
|
||||
@@ -109,9 +108,11 @@ class CamTool(DeviceBase):
|
||||
self.stop()
|
||||
|
||||
def start(self):
|
||||
print "Start"
|
||||
self.cam_run.write(-1)
|
||||
|
||||
def stop(self):
|
||||
print "Stop"
|
||||
self.cam_run.write(0)
|
||||
|
||||
def capture(self):
|
||||
@@ -176,7 +177,7 @@ class CamTool(DeviceBase):
|
||||
|
||||
|
||||
if __name__ == "__builtin__":
|
||||
camera_tool = CamTool("camtool", latch = True)
|
||||
camera_tool = CamTool("camtool", latch = False)
|
||||
add_device(camera_tool, True)
|
||||
camera_tool.enableBackground(False)
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user