Commit c0e67377 authored by Claudio Scafuri's avatar Claudio Scafuri 💬
Browse files

Merge branch 'delay_compensation' into 'master'

use write value of opa Wavelength attribute for compensation calculations

See merge request !3
parents e478cbe1 d564683b
......@@ -39,20 +39,20 @@ class opathread(threading.Thread):
delaycomp = 0.0
compressor_position = float('Nan')
try:
lmb0 = self.master.opa.read_attribute('WavelengthSP').value
except tango.DevFailed as e:
lmb0 = self.master.opa.read_attribute('Wavelength').w_value
except tango.DevFailed as ex:
self.master.set_status('step 1: failed reading l0')
self.master.attr_LastSetOk = False
self.master.attr_LastSetMsg += 'step 1: failed reading l0\n'
self.master.error_stream('step 1: failed reading l0')
tango.Except.print_exception(e)
tango.Except.print_exception(ex)
if self.master.delay_line_compensation_enabled:
try:
delaycomp = self.master.delay_calc.get_compensation_delay(lmb0, self.lmb)
self.master.debug_stream(
self.master.info_stream(
'opathread step1: , lmb0, lmb, delaycomp %s %s %s' % (lmb0, self.lmb, delaycomp))
except ValueError as e:
except ValueError as ex:
self.master.set_status('step 1: exception calculating delay comp.')
self.master.attr_LastSetOk = False
self.master.attr_LastSetMsg += 'step 1: exception calculating delay comp.\n'
......@@ -62,7 +62,7 @@ class opathread(threading.Thread):
if self.master.set_compressor and self.master.compressor_calc:
try:
compressor_position = self.master.compressor_calc.get_position(self.lmb)
except ValueError as e:
except ValueError as ex:
self.master.set_status('step 1: exception calculating compressor position.')
self.master.attr_LastSetOk = False
self.master.attr_LastSetMsg += 'step 1: exception calculating compressor position.\n'
......@@ -76,8 +76,8 @@ class opathread(threading.Thread):
self.master.ltf.command_inout('Standby')
self.master.info_stream('LTF Standby OK')
restart_LTF = True
except tango.DevFailed as e:
tango.Except.print_exception(e)
except tango.DevFailed as ex:
tango.Except.print_exception(ex)
self.master.error_stream('LTF Standby FAILED')
self.master.attr_LastSetOk = False
self.master.attr_LastSetMsg += 'LTF Standby FAILED'
......@@ -91,8 +91,8 @@ class opathread(threading.Thread):
self.master.info_stream('step 1: start pre sequencer OPA.')
self.master.pre_sequencer_opa.command_inout('Start')
pre_started = True
except tango.DevFailed as e:
tango.Except.print_exception(e)
except tango.DevFailed as ex:
tango.Except.print_exception(ex)
self.master.error_stream('Pre sequencer OPA Start FAILED')
self.master.attr_LastSetOk = False
self.master.attr_LastSetMsg += 'Pre sequencer OPA Start FAILED'
......@@ -106,8 +106,8 @@ class opathread(threading.Thread):
try:
pre_state = self.master.pre_sequencer_opa.state()
self.master.info_stream('step 1: check pre sequencer OPA termination.')
except tango.DevFailed as e:
tango.Except.print_exception(e)
except tango.DevFailed as ex:
tango.Except.print_exception(ex)
self.master.set_status('failed reading pre sequencer state')
self.master.attr_LastSetMsg += 'failed reading pre sequencer state\n'
self.master.error_stream('failed reading pre sequencer state')
......@@ -332,8 +332,8 @@ class opathread(threading.Thread):
try:
post_state = self.master.post_sequencer_opa.state()
self.master.info_stream('step 9: check post sequencer OPA termination.')
except tango.DevFailed as e:
tango.Except.print_exception(e)
except tango.DevFailed as ex:
tango.Except.print_exception(ex)
self.master.set_status('failed reading post sequencer state')
self.master.attr_LastSetMsg += 'failed reading post sequencer state\n'
self.master.error_stream('failed reading post sequencer state')
......
Markdown is supported
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