Mercurial > templog
comparison py/fridge.py @ 565:26f20cee71be
emergency change sensor config
add --nowait.
make only look for 28- devices (ds18b20)
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 05 Jul 2015 00:44:05 +0800 |
parents | c5f8375b12a2 |
children | 50a0e2d7d9e3 |
comparison
equal
deleted
inserted
replaced
564:59cb8449ef97 | 565:26f20cee71be |
---|---|
8 | 8 |
9 class Fridge(object): | 9 class Fridge(object): |
10 | 10 |
11 OVERSHOOT_MAX_DIV = 1800.0 # 30 mins | 11 OVERSHOOT_MAX_DIV = 1800.0 # 30 mins |
12 | 12 |
13 def __init__(self, server): | 13 def __init__(self, server, nowait = False): |
14 self.server = server | 14 self.server = server |
15 self.gpio = gpio.Gpio(config.FRIDGE_GPIO_PIN, "fridge") | 15 self.gpio = gpio.Gpio(config.FRIDGE_GPIO_PIN, "fridge") |
16 self.wort_valid_clock = 0 | 16 self.wort_valid_clock = 0 |
17 self.fridge_on_clock = 0 | 17 self.fridge_on_clock = 0 |
18 self.off() | 18 self.off() |
19 if nowait: | |
20 self.fridge_off_clock = 0 | |
19 | 21 |
20 def turn(self, value): | 22 def turn(self, value): |
21 self.gpio.turn(value) | 23 self.gpio.turn(value) |
22 | 24 |
23 def on(self): | 25 def on(self): |