changeset 368:194583bd603e

ws2812 numleds fix Ignore-this: 300849ded4dea42a447e3415f2f26a5d
author drewp@bigasterisk.com
date Sun, 11 Nov 2018 23:56:33 -0800
parents 6aa5beb63d9e
children 980d4cf8857d
files service/piNode/devices.py service/piNode/requirements.txt
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/service/piNode/devices.py	Sun Nov 11 23:54:53 2018 -0800
+++ b/service/piNode/devices.py	Sun Nov 11 23:56:33 2018 -0800
@@ -513,7 +513,8 @@
 
     def hostStateInit(self):
         self.anim = RgbPixelsAnimation(self.graph, self.uri, self.updateOutput)
-        self.neo = rpi_ws281x.Adafruit_NeoPixel(self.anim.maxIndex() - 1, pin=18)
+        log.debug('%s maxIndex = %s', self.uri, self.anim.maxIndex())
+        self.neo = rpi_ws281x.Adafruit_NeoPixel(self.anim.maxIndex() + 1, pin=18)
         self.neo.begin()
         
         colorOrder, stripType = self.anim.getColorOrder(self.graph, self.uri)
@@ -529,6 +530,7 @@
             return
         
         for idx, (r, g, b) in self.anim.currentColors():
+            log.debug('out color %s (%s,%s,%s)', idx, r, g, b)
             self.neo.setPixelColorRGB(idx, r, g, b)
         self.neo.show()
 
--- a/service/piNode/requirements.txt	Sun Nov 11 23:54:53 2018 -0800
+++ b/service/piNode/requirements.txt	Sun Nov 11 23:56:33 2018 -0800
@@ -10,7 +10,7 @@
 git+git://github.com/adafruit/Adafruit_Nokia_LCD
 RPi.GPIO==0.6.2
 influxdb==3.0.0
-rpi_ws281x==3.0.4
+rpi_ws281x==3.1.0
 pyOpenSSL
 numpy
 pillow