frappy_psi.magfield: bug in progress check

must check for self.current (not self.value)

+ fix in mercury: __ramping must be initialized
This commit is contained in:
zolliker 2023-05-31 08:42:17 +02:00
parent db94def694
commit 004533655f
2 changed files with 2 additions and 1 deletions

View File

@ -392,7 +392,7 @@ class Magfield(SimpleMagfield):
if sm.init:
self.init_progress(sm, self.current)
if abs(self.current) > self.tolerance:
if self.get_progress(sm, self.value) > self.leads_ramp_tmo:
if self.get_progress(sm, self.current) > self.leads_ramp_tmo:
raise HardwareError('no progress')
return Retry
if sm.mode == Mode.DISABLED and abs(self.value) < self.tolerance:

View File

@ -362,6 +362,7 @@ class TemperatureLoop(TemperatureSensor, ConvLoop):
tolerance = Parameter(default=0.1)
_last_setpoint_change = None
__status = IDLE, ''
__ramping = False
# overridden in subclass frappy_psi.triton.TemperatureLoop
ENABLE = 'TEMP:LOOP:ENAB'
ENABLE_RAMP = 'TEMP:LOOP:RENA'