[v1.x] config issue surrounding LED CHANNEL 1 bleeding;
Closed this issue · 2 comments
Configs seem volatile, and bleeds onto led channel 1. As such,
options = {
dma: 10,
freq: 800000,
channels: [
{ count: 10, gpio: 18, invert: false, brightness: 255, stripType: w.stripType.WS2812 },
{ count: 256, gpio: 13, invert: false, brightness: 10, stripType: w.stripType.WS2812 }
],
};
will result in channel 1 giving nothing but the first 10 pixels, and
options = {
dma: 10,
freq: 800000,
channels: [
{ count: 256, gpio: 18, invert: false, brightness: 255, stripType: w.stripType.WS2812 },
{ count: 256, gpio: 13, invert: false, brightness: 10, stripType: w.stripType.WS2812 }
],
};
works fine. In addition, it seems to be the lowest of the two.
In addition, this seems to happen with brightness too:
options = {
dma: 10,
freq: 800000,
channels: [
{ count: 256, gpio: 18, invert: false, brightness: 0, stripType: w.stripType.WS2812 },
{ count: 256, gpio: 13, invert: false, brightness: 10, stripType: w.stripType.WS2812 }
],
};
will show nothing.
I've had a look, and on the javascript side of things, the parameters are maintained. This seems to be an issue with the binding.
Thanks for the report, I never actually worked with multiple LED strips, so that is quite valuable.
But I think this is something in the upstream-library. This part of the code shouldn't be causing this:
node-rpi-ws281x-native/src/rpi-ws281x.cc
Lines 111 to 131 in 487204d
Can you maybe try to do the same with the upstream-library (https://github.com/jgarff/rpi_ws281x) and see if that behaves any diffferent? I can't see anything obvious there either, but maybe there is a better place to solve this.
I think I found the issue, more or less by accident:
node-rpi-ws281x-native/src/rpi-ws281x.cc
Lines 182 to 184 in 487204d
I published a fix with the latest version, 1.0.0-alpha3
(49c7018).