From 761b7b4cf8d722bfd9d069a6a64b945fa76cdf04 Mon Sep 17 00:00:00 2001 From: Markus Zolliker Date: Thu, 4 May 2023 16:26:01 +0200 Subject: [PATCH] fixes on HasConvergence and HasOutputModule - HasConvergence must inherit from HasStates - control_active should have a default Change-Id: Ic8b430003fdb746bf76782b74fa04e43c700c2e2 Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/31023 Tested-by: Jenkins Automated Tests Reviewed-by: Markus Zolliker --- frappy/mixins.py | 2 +- frappy_psi/convergence.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frappy/mixins.py b/frappy/mixins.py index 29456045..c353ad40 100644 --- a/frappy/mixins.py +++ b/frappy/mixins.py @@ -65,7 +65,7 @@ class HasOutputModule(Writable): """ # mandatory=False: it should be possible to configure a module with fixed control output_module = Attached(HasControlledBy, mandatory=False) - control_active = Parameter('control mode', BoolType()) + control_active = Parameter('control mode', BoolType(), default=False) def initModule(self): super().initModule() diff --git a/frappy_psi/convergence.py b/frappy_psi/convergence.py index f7820ea0..0a34a955 100644 --- a/frappy_psi/convergence.py +++ b/frappy_psi/convergence.py @@ -21,10 +21,11 @@ # ***************************************************************************** from frappy.core import Parameter, FloatRange, BUSY, IDLE, WARN +from frappy.states import HasStates from frappy.lib.statemachine import StateMachine, Retry, Stop -class HasConvergence: +class HasConvergence(HasStates): """mixin for convergence checks Implementation based on tolerance, settling time and timeout.