Mercurial > templog
comparison py/fridge.py @ 497:455f19b64e0f
Fix invalid wort time check
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 04 Mar 2014 22:01:25 +0800 |
parents | d05b1612e19e |
children | 16a83e2c97a0 |
comparison
equal
deleted
inserted
replaced
495:905bbab632f7 | 497:455f19b64e0f |
---|---|
81 self.off() | 81 self.off() |
82 return | 82 return |
83 | 83 |
84 # handle broken wort sensor | 84 # handle broken wort sensor |
85 if wort is None: | 85 if wort is None: |
86 self.wort_valid_clock = self.server.now() | |
87 W("Invalid wort sensor") | |
88 invalid_time = self.server.now() - self.wort_valid_clock | 86 invalid_time = self.server.now() - self.wort_valid_clock |
87 W("Invalid wort sensor for %d secs" % invalid_time) | |
89 if invalid_time < config.FRIDGE_WORT_INVALID_TIME: | 88 if invalid_time < config.FRIDGE_WORT_INVALID_TIME: |
90 W("Has only been invalid for %d, waiting" % invalid_time) | 89 W("Has only been invalid for %d, waiting" % invalid_time) |
91 return | 90 return |
92 | 91 |
93 if fridge is None: | 92 if fridge is None: |