frappy_psi.picontrol: add PIctrl
Change-Id: If212712b691ecabec1ff70d7040eb4e23924c01e
This commit is contained in:
@@ -62,8 +62,8 @@ import time
|
|||||||
import math
|
import math
|
||||||
from frappy.core import Readable, Writable, Parameter, Attached, IDLE, Property
|
from frappy.core import Readable, Writable, Parameter, Attached, IDLE, Property
|
||||||
from frappy.lib import clamp, merge_status
|
from frappy.lib import clamp, merge_status
|
||||||
from frappy.datatypes import LimitsType, EnumType, BoolType, FloatRange
|
from frappy.datatypes import LimitsType, EnumType, FloatRange
|
||||||
from frappy.ctrlby import HasOutputModule
|
from frappy.ctrlby import HasOutputModule, WrapControlledBy
|
||||||
from frappy_psi.convergence import HasConvergence
|
from frappy_psi.convergence import HasConvergence
|
||||||
|
|
||||||
|
|
||||||
@@ -162,7 +162,6 @@ class PImixin(HasOutputModule, Writable):
|
|||||||
if not self.control_active:
|
if not self.control_active:
|
||||||
self.activate_control()
|
self.activate_control()
|
||||||
|
|
||||||
# unchecked!
|
|
||||||
|
|
||||||
class PI(HasConvergence, PImixin):
|
class PI(HasConvergence, PImixin):
|
||||||
input_module = Attached(Readable, 'the input module')
|
input_module = Attached(Readable, 'the input module')
|
||||||
@@ -186,3 +185,7 @@ class PI2(PI):
|
|||||||
if not self.control_active:
|
if not self.control_active:
|
||||||
self.output.write_target(target)
|
self.output.write_target(target)
|
||||||
super().write_target(target)
|
super().write_target(target)
|
||||||
|
|
||||||
|
|
||||||
|
class PIctrl(WrapControlledBy, PI):
|
||||||
|
"""a pi controller which is controlled by another loop"""
|
||||||
|
|||||||
Reference in New Issue
Block a user