comparison py/fridge.py @ 477:d05b1612e19e

a few fixes
author Matt Johnston <matt@ucc.asn.au>
date Thu, 30 Jan 2014 22:55:27 +0800
parents 06de0f2ffa26
children 3f187baa3439
comparison
equal deleted inserted replaced
476:06de0f2ffa26 477:d05b1612e19e
102 overshoot = params.overshoot_factor \ 102 overshoot = params.overshoot_factor \
103 * min(self.OVERSHOOT_MAX_DIV, on_time) \ 103 * min(self.OVERSHOOT_MAX_DIV, on_time) \
104 / self.OVERSHOOT_MAX_DIV 104 / self.OVERSHOOT_MAX_DIV
105 D("on_time %(on_time)f, overshoot %(overshoot)f" % locals()) 105 D("on_time %(on_time)f, overshoot %(overshoot)f" % locals())
106 106
107 if not params.nowort \ 107 if not params.nowort and wort is not None:
108 and wort is not None \ 108 if wort - overshoot < params.fridge_setpoint:
109 and (wort - overshoot) < params.fridge_setpoint:
110 L("wort has cooled enough, %(wort)f" % locals() ) 109 L("wort has cooled enough, %(wort)f" % locals() )
111 turn_off = True 110 turn_off = True
112 elif fridge is not None and fridge < fridge_min: 111 elif fridge is not None and fridge < fridge_min:
113 W("fridge off fallback, fridge %(fridge)f, min %(fridge_min)f" % locals()) 112 W("fridge off fallback, fridge %(fridge)f, min %(fridge_min)f" % locals())
114 if wort is None: 113 if wort is None: