This commit is contained in:
sfop
2016-12-16 08:33:18 +01:00
parent bab567fbfd
commit 4f1850787c
7 changed files with 40 additions and 29 deletions
+5 -5
View File
@@ -131,7 +131,7 @@ def elog(title, message, attachments = [], author = None, category = "Info", dom
Add entry to ELOG.
"""
if author is None:
author = "pshell" #controller.getUser().name
author = "pshell" #context.getUser().name
typ = "pshell"
entry = ""
@@ -156,7 +156,7 @@ def elog(title, message, attachments = [], author = None, category = "Info", dom
raise Exception(err)
print out
def get_plot_snapshots(title = None, file_type = "png", temp_path = controller.setup.getContextPath()):
def get_plot_snapshots(title = None, file_type = "png", temp_path = context.setup.getContextPath()):
"""
Returns list with file names of plots snapshots from a plotting context.
"""
@@ -184,7 +184,7 @@ center_x.setPolling(100)
center_y.setPolling(100)
if not controller.isLocalMode():
if not context.isLocalMode():
try:
run("camtool")
add_device(CamTool("image_stats", prefix = "SINEG01-DSCR190:", latch = True, camera = "SINEG01-DSCR190", gauss = False), True)
@@ -255,13 +255,13 @@ avy = create_averager(comy, 5, 0.001)
#CAS
if controller.isServerEnabled():
if context.isServerEnabled():
import ch.psi.pshell.epics.CAS as CAS
#CAS.setServerPort(5062)
class ServerUrl(ReadonlyRegisterBase):
def doRead(self):
return controller.server.baseURL
return context.server.baseURL
d = ServerUrl()
d.initialize()