From 3c6f82b26ba3ae5ec8a0f2a571ccc5f660653250 Mon Sep 17 00:00:00 2001 From: sfop Date: Wed, 24 Aug 2016 15:26:24 +0200 Subject: [PATCH] Closedown --- script/ImageStats.py | 11 ++++++++++- script/camtool.py | 5 +++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/script/ImageStats.py b/script/ImageStats.py index ab9986d..7070e78 100644 --- a/script/ImageStats.py +++ b/script/ImageStats.py @@ -108,14 +108,23 @@ class ImageStats(DeviceBase): def doClose(self): pass + def start(self): + pass -if __name__ == "__builtin__": + def stop(self): + pass + + +def get_simulated_source(): simulated_source = SimulatedSource() simulated_source.img=None simulated_source.initialize() image.addListener(simulated_source) show_panel(simulated_source) + return simulated_source +if __name__ == "__builtin__": + simulated_source = get_simulated_source() print get_centroid(simulated_source) add_device(ImageStats("image_stats", simulated_source), True) diff --git a/script/camtool.py b/script/camtool.py index 5f3a47f..dff05ae 100644 --- a/script/camtool.py +++ b/script/camtool.py @@ -186,10 +186,11 @@ class CamTool(DeviceBase): self.bg_en.close() self.bg_capture.close() self.bg_capture_remain.close() - self.image.close() + #self.image.close() if __name__ == "__builtin__": + pass """ camera_tool = CamTool("camtool", latch = False) add_device(camera_tool, True) @@ -199,11 +200,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() + """