diff --git a/script/camtool.py b/script/camtool.py index 2f2edc1..babbb28 100644 --- a/script/camtool.py +++ b/script/camtool.py @@ -129,7 +129,7 @@ class CamTool(DeviceBase): #print "Current timestamp: ", timestamp if not self.latch: self.cam_run.write(1) - else + else: self.cam_latch.write(1) start = time.time() while(True): @@ -188,8 +188,9 @@ class CamTool(DeviceBase): self.bg_capture_remain.close() self.image.close() -""" + if __name__ == "__builtin__": + """ camera_tool = CamTool("camtool", latch = False) add_device(camera_tool, True) camera_tool.enableBackground(False) @@ -198,13 +199,11 @@ if __name__ == "__builtin__": for i in range (100): camera_tool.capture() print camera_tool.take(), camera_tool.com_x.read(), camera_tool.com_y.read() -""" - - -#from camtool import CamTool -camera_tool = CamTool("camtool", latch = True) -add_device(camera_tool, True) -camera_tool.enableBackground(True) -camera_tool.capture() -print camera_tool.take(), camera_tool.com_x.read(), camera_tool.com_y.read() - + """ + #from camtool import CamTool + camera_tool = CamTool("camtool", latch = True) + add_device(camera_tool, True) + camera_tool.enableBackground(True) + camera_tool.capture() + print camera_tool.take(), camera_tool.com_x.read(), camera_tool.com_y.read() +