From d1cc61d3f7304d2762784b11de022054f9d735b5 Mon Sep 17 00:00:00 2001 From: simon Date: Sun, 28 Apr 2019 16:56:38 +0200 Subject: [PATCH] allow setting rgbStrip lenght --- server/rgbUtils/rgbStripController.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/rgbUtils/rgbStripController.py b/server/rgbUtils/rgbStripController.py index 58d6fbf..88abe95 100644 --- a/server/rgbUtils/rgbStripController.py +++ b/server/rgbUtils/rgbStripController.py @@ -9,12 +9,12 @@ class rgbStripController(threading.Thread): self.onRGBStripRegisteredHandler = [] self.onRGBStripUnRegisteredHandler = [] - def registerRGBStrip(self,rgbStripName,onValuesUpdateHandler): + def registerRGBStrip(self,rgbStripName,onValuesUpdateHandler,ledcount=1): # maybe we can use an unique id if the strip reconnects later, eg push the uid # to the client on first connect and if he reconnects he sould send it back again. # the wmos could use the mac adress, if there is a python script it can save the uid # in a file or so. - strip = RGBStrip(rgbStripName,onValuesUpdateHandler) + strip = RGBStrip(rgbStripName,onValuesUpdateHandler,ledcount) self.rgbStrips.append(strip) self.noticeRGBStripRegisteredHandler(strip) return strip