Script execution

This commit is contained in:
sfop
2016-08-24 14:16:32 +02:00
parent 3034ce2d1e
commit b5daab7c4f

View File

@@ -26,13 +26,14 @@ class CamToolImage(ReadableMatrix):
class CamTool(DeviceBase):
def __init__(self, name, prefix = "cam:", latch = False, camera = "~/Simulation.json"):
def __init__(self, name, prefix = "cam:", latch = False, camera = "SINEG01-DSCR350"):
DeviceBase.__init__(self, name)
run_channel = prefix + "camera.run"
try:
caget(run_channel)
except:
cmd = "camtool --casprefix " + prefix + " --run -1 " + camera #--nogui
print cmd
fork( (exec_cmd,(cmd,)),)
self.waitForChannel(run_channel, 20)
time.sleep(5.0)
@@ -195,11 +196,11 @@ if __name__ == "__builtin__":
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()
"""