adafruit / Adafruit_DotStar

GNU General Public License v3.0
97 stars 59 forks source link

blue and green colors were swapped #1

Closed technobly closed 9 years ago

technobly commented 9 years ago

While playing with a brand new 60-pixel Adafruit DotStar strip with the Spark Core DotStar library I noticed the Blue and Green colors were swapped. These changes correct that issue. I will update the Spark Core library after confirmation of this issue ;-) Thanks!

PaintYourDragon commented 9 years ago

Yow...our samples and final production strips from the factory behave differently (bizarre, since that's a wired-into-the-pixels thing). Anyway! Rather than simply swapping the two -- since a precedent has now been set and who knows if things'll change again in the future -- an optional extra parameter can be passed to the constructor to indicate the R/G/B order. The default (if left off) is DOTSTAR_GBR to match strips currently in the Adafruit shop, but other combos are defined in the header (e.g. working with our sample strips I would instead pass DOTSTAR_BGR).

technobly commented 9 years ago

Hey Phil, you're starting out the new year in style. That's a sweet fix! I tested and released those changes with my Spark Core port which is working beautifully. BTW: this was the scene last night at my place: https://community.spark.io/t/spark-core-adafruit-dotstar-60-led-strip-new-years-eve-countdown/9076