From d6d78fe5b2e222b29a5cc5fba62d239069f3a4ef Mon Sep 17 00:00:00 2001 From: sfop Date: Thu, 18 Aug 2016 11:27:06 +0200 Subject: [PATCH] Script execution --- script/camtool.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/script/camtool.py b/script/camtool.py index f70ac0f..43b6bb5 100644 --- a/script/camtool.py +++ b/script/camtool.py @@ -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) """