# HG changeset patch # User Matt Johnston # Date 1391093727 -28800 # Node ID 77c2a9caca3d541454befd3d32f8dcbc6208598c # Parent a0ea542256bad1ae8138287449c251ff505a580f a few fixes diff -r a0ea542256ba -r 77c2a9caca3d 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 a0ea542256ba -r 77c2a9caca3d 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):