aboutsummaryrefslogtreecommitdiff
path: root/qolab/feedback/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'qolab/feedback/__init__.py')
-rw-r--r--qolab/feedback/__init__.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/qolab/feedback/__init__.py b/qolab/feedback/__init__.py
index 3e7ab2f..ad4bb65 100644
--- a/qolab/feedback/__init__.py
+++ b/qolab/feedback/__init__.py
@@ -12,10 +12,24 @@ class PID(BasicInstrument):
self.setGi(Gi)
self.setGd(Gd)
self.setSign(sign)
- self.setEnable(True)
+ self.setEnable(enable)
self.reset()
+ def __repr__(self):
+ s = ''
+ s += f"PID("
+ s += f'Gp={self.Gp}'
+ s += f', Gi={self.Gi}'
+ s += f', Gd={self.Gd}'
+ s += f', sign={self.enable}'
+ if self.config['DeviceNickname'] is not None:
+ s += ", device_nickname='"
+ s += f"{self.config['DeviceNickname']}"
+ s += "'"
+ s += ')'
+ return(s)
+
@BasicInstrument.tsdb_append
def getGp(self):
return self.Gp