tom-2015 / rpi-ws2812-server

Raspberry Pi WS2812 (web) server tool
172 stars 39 forks source link

Sugested adition/clearification in instructions regarding render function #69

Closed Spangen closed 2 years ago

Spangen commented 2 years ago

Thank you for your great work on the rpi-ws2812-server.

I have had this running on several "information points" around my house for some time now. Works a treat, various routers and other scripts marks the "points" with color or flashing if something needs my attention.

As i noted that you had now implemented 2d functions, i set about updating my installations today, some was as old as V2,9

On most of my "points" The leds are combined with a Moode installation and a HiFiberry Pi Amp2. I normaly have on 18-led strip around the box on PWM0 GPIO 12 (as AMP2 uses GPIO18), and a matrix of 8x5 leds hidden in a picture frame on PWM1 GPIO13 for short message display. This has worked great for years, no problem with I2S to the AMP2 and PWM0 on GPIO12. (previously used the Whiterabbit project for text display, now looking forward to use your more versatile 2D function ;) )

(just adding this information as other users might have interest in this setup)

Now for the "problem", that turned out not to be a real bug but just hard to catch information on changes in how the render function has changed from V5.0 to V6.0 and later.

After I had updated to V6,8 today, I could not for the life of me get the leds on PWM1 GPIO13 to work. After spending half the day recompiling on several Pi's, and compiling older versions to find out when the routines I used stopped working, and just before I was about to write a "bug" issue here, I discovered the need for the added "render " as of version 6.0 and later to render channels > 1.

Before I could write:

setup 1,40,3,0,255,12; setup 2,18,3,0,255,13; init fill 1,005500; fill 2,aa0000 render

As of V6.0 and newer, I must type:

setup 1,40,3,0,255,12; setup 2,18,3,0,255,13; init fill 1,005500; fill 2,aa0000 render render 2

(this might be logical to people starting after 6.0, but as one has a note of old commands that used to work this tok me a long time to catch)

So my simple sugestion is as follows. It might save some people some time if this was a bit more mentioned in the description on this webpage, and maybe also in the changelog under V6.0 changes. You could add a simple example of filling channel 2 under TESTING, just like the example for filling and rendering channel 1. That would make it very obvious.

Alternatively, if easy to implement, revert 'render' to render all channels for backwards compatability, and let 'render 1' 'render 2' be used to render channels separately.

I think I finaly spotted it in one of the example files, as i was brushing trough the diff on github on V5.0 vs V6.0. I probably would have catched this earlier if I started with ws2812-server today, but I was done with the example files i tought ;)

Just my two cents. Thank you for your efforts. Looking forward to playing with 2D now ;)

Robert

tom-2015 commented 2 years ago

It was probably a bug in the first versions that it accidentally rendered both strings because of the ws2811 library. But I can change the behavior in next version so that render will render all channels, render 1 only channel 1, render 2 channel 2, etc...

Spangen commented 2 years ago

That sounds like a good setup to me, makes it smooth to prepare several channels, and render all with one command, or choose to render separately.

Thanks