changeset 467:fa79666fb375

add nowort mode
author Matt Johnston <matt@ucc.asn.au>
date Wed, 20 Feb 2013 21:08:42 +0800
parents 8cc78243af71
children 00dea0afb6bb de4abcbe8f46
files py/fridge.py py/params.py
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
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:
--- a/py/params.py	Mon Feb 18 23:32:19 2013 +0800
+++ b/py/params.py	Wed Feb 20 21:08:42 2013 +0800
@@ -15,6 +15,7 @@
     'overshoot_delay': 720, # 12 minutes
     'overshoot_factor': 1, # ÂșC
     'disabled': False,
+    'nowort': False,
     }
 
 class Params(dict):