comparison py/tempserver.py @ 155:d03157c7ad60

rough touch sensor
author Matt Johnston <matt@ucc.asn.au>
date Fri, 21 Dec 2012 23:30:16 +0800
parents d686b111dab4
children 6d799bee3508
comparison
equal deleted inserted replaced
154:542efb356e46 155:d03157c7ad60
70 70
71 # a reading is a map of {sensorname: value}. temperatures 71 # a reading is a map of {sensorname: value}. temperatures
72 # are float degrees 72 # are float degrees
73 def add_reading(self, reading): 73 def add_reading(self, reading):
74 """ adds a reading at the current time """ 74 """ adds a reading at the current time """
75 D("add_reading(%s)" % str(reading))
75 self.readings.append( (reading, self.now())) 76 self.readings.append( (reading, self.now()))
76 self.current = (reading.get(self.wort_name, None), 77 self.current = (reading.get(self.wort_name, None),
77 reading.get(self.fridge_name, None)) 78 reading.get(self.fridge_name, None))
78 79
79 def current_temps(self): 80 def current_temps(self):