Closedown

This commit is contained in:
x03daop
2016-12-22 15:52:41 +01:00
parent b05ae21305
commit 1c18b78ebb
7 changed files with 14 additions and 14 deletions

View File

@@ -39,7 +39,7 @@ spectrum_series = plots[0].getSeries(0)
def plot_cur_spectrum():
global spectrum_series
try:
while controller.state.running:
while context.state.running:
y = Scienta.spectrum.take(100)
x = Scienta.spectrumX
spectrum_series.setData(x, y)

View File

@@ -28,7 +28,7 @@ spectrum_series = plots[0].getSeries(0)
def plot_cur_spectrum():
global spectrum_series
try:
while controller.state.running:
while context.state.running:
y = Scienta.spectrum.take(100)
x = Scienta.spectrumX
spectrum_series.setData(x, y)

View File

@@ -328,7 +328,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 = ""
@@ -353,7 +353,7 @@ def elog(title, message, attachments = [], author = None, category = "Info", dom
raise Exception(err)
print out
def get_plot_snapshots(title = None, file_type = "jpg", temp_path = controller.setup.getContextPath()):
def get_plot_snapshots(title = None, file_type = "jpg", temp_path = context.setup.getContextPath()):
"""
Returns list with file names of plots snapshots from a plotting context.
"""

View File

@@ -1,9 +1,9 @@
if controller.state == State.Ready:
if context.state == State.Ready:
print "Testing..."
if not Scienta.state.isInitialized():
print "Try initialize Scienta..."
try:
controller.evalLine("Scienta.initialize()")
context.evalLine("Scienta.initialize()")
print "Scienta reinit ok"
except:
print "Scienta reinit failure"
@@ -17,7 +17,7 @@ if controller.state == State.Ready:
if i >= retries-1:
print "Scienta timeout, try initialize..."
try:
controller.evalLine("Scienta.initialize()")
context.evalLine("Scienta.initialize()")
print "Scienta reinit ok"
except:
print "Scienta reinit failure"