Mercurial > templog
comparison py/fridge.py @ 197:3f187baa3439
Fix invalid wort time check
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 04 Mar 2014 22:01:25 +0800 |
parents | 77c2a9caca3d |
children | 16a83e2c97a0 |
comparison
equal
deleted
inserted
replaced
196:e27075b1e088 | 197:3f187baa3439 |
---|---|
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: |