diff py/fridge.py @ 168:bfc3213edee4

add nowort mode
author Matt Johnston <matt@ucc.asn.au>
date Wed, 20 Feb 2013 21:08:42 +0800
parents 5d5424acfed0
children 78255c49bf9a
line wrap: on
line diff
--- a/py/fridge.py	Mon Feb 18 23:32:19 2013 +0800
+++ b/py/fridge.py	Wed Feb 20 21:08:42 2013 +0800
@@ -104,7 +104,9 @@
                     / self.OVERSHOOT_MAX_DIV
             D("on_time %(on_time)f, overshoot %(overshoot)f" % locals())
 
-            if wort is not None and (wort - overshoot) < params.fridge_setpoint:
+            if not params.nowort \
+                and wort is not None \
+                and (wort - overshoot) < params.fridge_setpoint:
                     L("wort has cooled enough, %(wort)f" % locals() )
                     turn_off = True
             elif fridge is not None and fridge < fridge_min:
@@ -119,7 +121,9 @@
         else:
             # fridge is off
             turn_on = False
-            if wort is not None and wort >= wort_max:
+            if not params.nowort \
+                and wort is not None \
+                and wort >= wort_max:
                     L("Wort is too hot %f, max %f" % (wort, wort_max))
                     turn_on = True
             elif fridge is not None and fridge >= fridge_max: