comparison py/fridge.py @ 266:20c89630be6c

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 26eee8591f61
children 50a0e2d7d9e3
comparison
equal deleted inserted replaced
265:78c542f03030 266:20c89630be6c
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):