diff --git a/script/camtool.py b/script/camtool.py index 842b1bd..f34ee88 100644 --- a/script/camtool.py +++ b/script/camtool.py @@ -45,16 +45,17 @@ class CamTool(DeviceBase): if self.latch: self.start() self.cam_latch.write(1) + time.sleep(3.0) self.waitForChannel(self.data_prefix + "timestamp",20) else: print "Wring RUN=1" self.cam_run.write(1) time.sleep(5.0) - #self.waitForChannel(self.data_prefix + "timestamp",20) - #self.waitForChannel(self.data_prefix + "image.shape",20) + self.waitForChannel(self.data_prefix + "timestamp",20) + self.waitForChannel(self.data_prefix + "image.shape",20) print "Connected" self.stop() - self.timestamp = Channel(self.data_prefix + "timestamp",type = 'l', alias = name + " timestamp") #[D1, D2, ...] + self.timestamp = Channel(self.data_prefix + "timestamp",type = 'd', alias = name + " timestamp") #[D1, D2, ...] self.com_x = Channel(self.data_prefix + "x_stats.com", alias = name + " com x") self.com_y = Channel(self.data_prefix + "y_stats.com", alias = name + " com y") self.profile_x = Channel(self.data_prefix + "profile.x", alias = name + " profile x") @@ -106,8 +107,7 @@ class CamTool(DeviceBase): except Exception as e: print str(e) if time.time() - start > timeout: - raise Excepti - on("Timeout waiting for channel: " + channel) + raise Exception("Timeout waiting for channel: " + channel) time.sleep(0.5) @@ -200,7 +200,7 @@ if __name__ == "__builtin__": """ #from camtool import CamTool -camera_tool = CamTool("camtool", latch = False) +camera_tool = CamTool("camtool", latch = True) add_device(camera_tool, True) camera_tool.enableBackground(True)