# HG changeset patch # User Matt Johnston # Date 1448671353 -28800 # Node ID 6848907f85be331ded6ab5d300d8753c518009b1 # Parent fd9c6517225eb8475984ad5b40ef40b125867d84 fix missing on_time variable diff -r fd9c6517225e -r 6848907f85be py/fridge.py --- a/py/fridge.py Tue Nov 17 22:26:54 2015 +0800 +++ b/py/fridge.py Sat Nov 28 08:42:33 2015 +0800 @@ -92,7 +92,8 @@ if self.is_on(): turn_off = False - on_percent = self.integrator.integrate() / params.overshoot_delay + on_time = self.integrator.integrate() + on_percent = on_time / params.overshoot_delay overshoot = params.overshoot_factor * on_percent D("on_time %(on_percent)f, overshoot %(overshoot)f" % locals())