Nano_Every_WS2812B icon indicating copy to clipboard operation
Nano_Every_WS2812B copied to clipboard

doubled RGB->GRB fix

Open thijses opened this issue 1 year ago • 1 comments

First of all, nice library, thank you for taking the time to do the low level register stuff, it's saved me some frustration :).

I noticed that in the write_string function, you pass the contents of the RGB struct in GRB order to the write(R,G,B) function: https://github.com/ClemensAtElektor/Nano_Every_WS2812B/blob/832af0a08d6406ec57d1615bc36a099a41f9a519/src/Nano_Every_WS2812B.cpp#L75 isn't this a double re-ordering (because the write() function expects (r,g,b) input, and writes the data as (g,r,b) to the LED): https://github.com/ClemensAtElektor/Nano_Every_WS2812B/blob/832af0a08d6406ec57d1615bc36a099a41f9a519/src/Nano_Every_WS2812B.cpp#L62-L67

thijses avatar Jan 23 '24 08:01 thijses

Thank you for your comments. The code just swaps red and green, it is not reordering twice. I don't remember why, sorry. The colors probably got mixed up somewhere.

ClemensAtElektor avatar Jan 24 '24 07:01 ClemensAtElektor