Fix old 'get_temp' -> 'get_pv' and 'get_ambient_temp' -> 'get_ambient_pv'
authorW. Trevor King <wking@tremily.us>
Sat, 11 May 2013 14:42:40 +0000 (10:42 -0400)
committerW. Trevor King <wking@tremily.us>
Sat, 11 May 2013 14:42:40 +0000 (10:42 -0400)
This brings some crufty bits up to date after 5d9293b (Copy fit.py
from Hooke to remove dependency, and generalize temp -> PV, etc.,
2011-07-27).

examples/temp_monitor.py
pypid/backend/melcor.py
pypid/controller.py

index 9c1369f60afcc5be3d3808735026ac55c22fc8d9..46638ccb1a42dd54d2b5d12a6cf9c6d1b2ac17ad 100755 (executable)
@@ -35,8 +35,8 @@ with open('temp_monitor.log', 'a') as f:
     while True:
         time.sleep(next_time - time.time())
         tstr = time.strftime('%Y-%m-%d %H:%M:%S')
-        temp = str(b.get_temp())
-        ambient = str(b.get_ambient_temp())
+        temp = str(b.get_pv())
+        ambient = str(b.get_ambient_pv())
         f.write('\t'.join([tstr, temp, ambient]) + '\n')
         f.flush()
         print('\t'.join([tstr, temp, ambient]))
index c7736d0c8da4d46502bb8d3c8ad8310256a11370..452096bacf5bd680e4bfa02d95b9188c4d2d2ff1 100644 (file)
@@ -645,7 +645,7 @@ class MelcorBackend (_Backend, _ManualMixin, _PIDMixin, _TemperatureMixin):
         self.set_heating_gains(proportional=p)
         while True:
             _LOG.debug('waiting for an out-of-propband temperature')
-            if abs(self.get_temp() - sp) > small_temp_range:
+            if abs(self.get_pv() - sp) > small_temp_range:
                 break  # we're out of the propband, I-term resets
         self.set_cooling_gains(proportional=cp)
         self.set_heating_gains(proportional=hp)
index 07df6e24dec821a7d4f0c0cb6322116c04287ee4..22d20c85b65d381892d5f8e9908cc9dc3145056a 100644 (file)
@@ -324,7 +324,7 @@ class Controller (object):
             _time.sleep(sleep_time)
 
     def _time_function(self, function, args=(), kwargs=None, count=10):
-        "Rough estimate timing of get_temp(), takes me about 0.1s"
+        "Rough estimate timing of get_pv(), takes me about 0.1s"
         if kwargs is None:
             kwargs = {}
         start = _time.time()