From 004533655f8adcf0dc2cdb25b67d6205c11bff40 Mon Sep 17 00:00:00 2001 From: camea Date: Wed, 31 May 2023 08:42:17 +0200 Subject: [PATCH] frappy_psi.magfield: bug in progress check must check for self.current (not self.value) + fix in mercury: __ramping must be initialized --- frappy_psi/magfield.py | 2 +- frappy_psi/mercury.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frappy_psi/magfield.py b/frappy_psi/magfield.py index 71f128b..eab0bd1 100644 --- a/frappy_psi/magfield.py +++ b/frappy_psi/magfield.py @@ -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: diff --git a/frappy_psi/mercury.py b/frappy_psi/mercury.py index bdb5227..8c88dfd 100644 --- a/frappy_psi/mercury.py +++ b/frappy_psi/mercury.py @@ -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'