Optimised fork of bikeNomad's WS2811 LED control library. Supports KL25Z and KL46Z
Fork of Multi_WS2811 by
Optimised to use far less RAM than the original.
Capable of running up to 8 strings of 240 LEDs each with plenty of RAM to spare on the KL46Z.
Should run at least three strings of 240 LEDs on the KL25Z (RAM limited)
Diff: Colors.cpp
- Revision:
- 3:2b5b03a3c0a5
- Parent:
- 0:a8535703f23b
diff -r 1c2c9c8788a8 -r 2b5b03a3c0a5 Colors.cpp --- a/Colors.cpp Wed Apr 02 10:53:43 2014 +0000 +++ b/Colors.cpp Wed Apr 02 11:54:27 2014 +0000 @@ -2,7 +2,7 @@ #include <mbed.h> #include "Colors.h" -void HSBtoRGB(float hue, float saturation, float brightness, uint8_t *pr, uint8_t *pg, uint8_t *pb) +void Colors::HSBtoRGB(float hue, float saturation, float brightness, uint8_t *pr, uint8_t *pg, uint8_t *pb) { uint8_t r = 0, g = 0, b = 0; if (saturation == 0) { @@ -51,7 +51,7 @@ *pb = b; } -float* RGBtoHSB(uint8_t r, uint8_t g, uint8_t b, float* hsbvals) +float* Colors::RGBtoHSB(uint8_t r, uint8_t g, uint8_t b, float* hsbvals) { float hue, saturation, brightness; if (!hsbvals) {