Mercurial > templog
comparison py/fridge.py @ 259:26eee8591f61
long polling works
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 09 Jun 2015 23:27:44 +0800 |
parents | ffe25107d520 |
children | 20c89630be6c |
comparison
equal
deleted
inserted
replaced
256:6d06795aefbb | 259:26eee8591f61 |
---|---|
20 def turn(self, value): | 20 def turn(self, value): |
21 self.gpio.turn(value) | 21 self.gpio.turn(value) |
22 | 22 |
23 def on(self): | 23 def on(self): |
24 self.turn(True) | 24 self.turn(True) |
25 pass | |
25 | 26 |
26 def off(self): | 27 def off(self): |
27 self.turn(False) | 28 self.turn(False) |
28 self.fridge_off_clock = self.server.now() | 29 self.fridge_off_clock = self.server.now() |
29 | 30 |