aboutsummaryrefslogtreecommitdiff
path: root/qolab
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-12-30 21:31:43 -0500
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-12-30 21:31:43 -0500
commit5d8331d0a61be05528dabf63a1aad6d18342a91c (patch)
treed0648c5746f66b169f45ab83e49873d90b8d2318 /qolab
parent174c2e00354cd69c8398e27a8d51ef36b05c00ca (diff)
downloadpyExpControl-5d8331d0a61be05528dabf63a1aad6d18342a91c.tar.gz
pyExpControl-5d8331d0a61be05528dabf63a1aad6d18342a91c.zip
pid has __repr__
Diffstat (limited to 'qolab')
-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