# HG changeset patch # User Matt Johnston # Date 1391093727 -28800 # Node ID d05b1612e19e1f6de1f3ed68aa46ad7c78dd0de5 # Parent 06de0f2ffa26cdbd527195c8671fc421d0dfc395 a few fixes diff -r 06de0f2ffa26 -r d05b1612e19e py/fridge.py --- a/py/fridge.py Thu Jul 25 08:05:40 2013 +0800 +++ b/py/fridge.py Thu Jan 30 22:55:27 2014 +0800 @@ -104,9 +104,8 @@ / self.OVERSHOOT_MAX_DIV D("on_time %(on_time)f, overshoot %(overshoot)f" % locals()) - if not params.nowort \ - and wort is not None \ - and (wort - overshoot) < params.fridge_setpoint: + if not params.nowort and wort is not None: + if wort - overshoot < params.fridge_setpoint: L("wort has cooled enough, %(wort)f" % locals() ) turn_off = True elif fridge is not None and fridge < fridge_min: diff -r 06de0f2ffa26 -r d05b1612e19e py/sensor_ds18b20.py --- a/py/sensor_ds18b20.py Thu Jul 25 08:05:40 2013 +0800 +++ b/py/sensor_ds18b20.py Thu Jan 30 22:55:27 2014 +0800 @@ -77,7 +77,11 @@ def sensor_names(self): """ Returns a sequence of sensorname """ slaves_path = os.path.join(self.master_dir, "w1_master_slaves") - names = open(slaves_path, 'r').read().split() + contents = open(slaves_path, 'r').read() + if 'not found' in contents: + E("No W1 sensors found") + return [] + names = contents.split() return names def wort_name(self):