Mercurial > code > home > repos > homeauto
changeset 369:980d4cf8857d
fix led strip png file path
Ignore-this: 8a2e650f16ef2c87712875a49d3cb52f
author | drewp@bigasterisk.com |
---|---|
date | Thu, 15 Nov 2018 00:25:27 -0800 |
parents | 194583bd603e |
children | b3e462a763cd |
files | lib/devices_shared.py |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/devices_shared.py Sun Nov 11 23:56:33 2018 -0800 +++ b/lib/devices_shared.py Thu Nov 15 00:25:27 2018 -0800 @@ -20,7 +20,9 @@ def get(self, path, x, y, h): if self.lastImg[0] != path: - self.lastImg = path, imageio.imread('../piNode/config/' + path) # or etcd or http + fp = 'config/' + path + self.lastImg = path, imageio.imread(fp) # or etcd or http + log.debug('read image from %r', fp) img = self.lastImg[1] y = numpy.clip(y, 0, img.shape[0] - 1) @@ -80,8 +82,9 @@ int(self.x.get()), int(self.y.get()), int(self.height.get())) - except IOError: - pass + except IOError as e: + log.warn('getPixelColumn %r', e) + log.debug('current = %r', self.current) def currentStatements(self): return []