ClemensAtElektor / Nano_Every_WS2812B

Core-Independent WS2812B Driver for Arduino Nano Every (i.e. ATmega4809)
GNU General Public License v3.0
16 stars 1 forks source link

doubled RGB->GRB fix #1

Open thijses opened 9 months ago

thijses commented 9 months ago

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

ClemensAtElektor commented 9 months ago

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.