Skip to content
Snippets Groups Projects
Commit e768dd84 authored by Roberto Borghes's avatar Roberto Borghes
Browse files

Bug fix: better management of the camserver imgpath reply string

parent 1cc8c123
No related branches found
Tags 1.0.1
No related merge requests found
......@@ -585,7 +585,8 @@ class PilatusXM (PyTango.LatestDeviceImpl):
reply = self.comm.send_to_detector(cmd)
if reply is None:
PyTango.Except.throw_exception("Communication error","Pilatus does not reply","write_FileDir")
elif "ERR" in reply:
tokens = reply.split(" ")
if (len(tokens) < 2) or ("OK" not in tokens[1]):
PyTango.Except.throw_exception("Command error","Pilatus reply: %s" % reply,"write_FileDir")
#----- PROTECTED REGION END -----# // PilatusXM.FileDir_write
......@@ -1047,7 +1048,7 @@ class PilatusXM (PyTango.LatestDeviceImpl):
if self.Simulation:
self.set_state(PyTango.DevState.ON)
self.set_status("The device is in ON state. Ready")
return
return
cmd = "camcmd k"
reply = self.comm.send_to_detector(cmd, wait_reply = False)
......@@ -1070,7 +1071,7 @@ class PilatusXM (PyTango.LatestDeviceImpl):
if self.Simulation:
self.set_state(PyTango.DevState.ON)
self.set_status("The device is in ON state. Ready")
return
return
cmd = "camcmd ResetCam"
reply = self.comm.send_to_detector(cmd, wait_reply = False)
#----- PROTECTED REGION END -----# // PilatusXM.Reset
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment