Commit 8331982e authored by cae's avatar cae Committed by julric

fix indention

parent 428a6729
......@@ -15,14 +15,14 @@ class DHT22(sensor.Sensor):
dhtreader.tempfile = data["tempfile"]
if os.path.isfile(dhtreader.tempfile):
ini_file = ConfigParser.ConfigParser()
ini_file.read(dhtreader.tempfile)
t = float(ini_file.get('saved_values','last_temp'))
h = float(ini_file.get('saved_values','last_humi'))
dhtreader.lastData = (t,h)
dhtreader.lastDataTime = float(ini_file.get('saved_values','last_time'))
else:
dhtreader.lastDataTime = 0
dhtreader.lastData = (None,None)
ini_file.read(dhtreader.tempfile)
t = float(ini_file.get('saved_values','last_temp'))
h = float(ini_file.get('saved_values','last_humi'))
dhtreader.lastData = (t,h)
dhtreader.lastDataTime = float(ini_file.get('saved_values','last_time'))
else:
dhtreader.lastDataTime = 0
dhtreader.lastData = (None,None)
self.sensorName = "DHT22"
self.pinNum = int(data["pinNumber"])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment