PaulStoffregen / WS2812Serial

Non-Blocking WS2812 LED Library
137 stars 28 forks source link

Modified library to add RBGW support #7

Open azzeloof opened 5 years ago

azzeloof commented 5 years ago

Addresses Issue #5

avivey commented 5 years ago

@azzeloof I have a similar patch I was thinking of submitting - https://github.com/PaulStoffregen/WS2812Serial/compare/master...avivey:wrgb

In my version, I put a ledWidth member instead of dispSize and drawSize, and replace all the * 3 instances with * ledWidth (which is either 3 or 4). That way I don't need if (config == ...) in the cpp file (but instead I use if (ledWidth > 3)).

I also support WRGB lights, which is the stuff I happen to have :)

I don't have tests though :/

Do you maybe want to take some inspiration from my patch?