diff options
author | Daniel Garcia <danielgarcia@gmail.com> | 2014-03-16 02:20:53 +0400 |
---|---|---|
committer | Daniel Garcia <danielgarcia@gmail.com> | 2014-03-16 02:20:53 +0400 |
commit | 39bbc47df996017083b51e4df6394e8a566c0aec (patch) | |
tree | 13bc33fe62131609a1d826f753c584f17742439a /FastLED.h | |
parent | dc3ac23b303890dea0af765736f4c6dc7810e240 (diff) |
Move responsibility for scaling brightness to color correction/temperature into the controller objects. Return scale to being a uint8_t
Diffstat (limited to 'FastLED.h')
-rw-r--r-- | FastLED.h | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -54,7 +54,7 @@ class CFastLED { CControllerInfo m_Controllers[NUM_CONTROLLERS]; int m_nControllers; - CRGB m_Scale; + uint8_t m_Scale; public: CFastLED(); @@ -155,12 +155,11 @@ public: } #endif - void setBrightness(CRGB scale) { m_Scale = scale; } - void setBrightness(uint8_t scale) { m_Scale = CRGB(scale,scale,scale); } - uint8_t getBrightness() { return m_Scale.raw[0]; } + void setBrightness(uint8_t scale) { m_Scale = scale; } + uint8_t getBrightness() { return m_Scale; } /// Update all our controllers with the current led colors, using the passed in brightness - void show(CRGB scale); + void show(uint8_t scale); /// Update all our controllers with the current led colors void show() { show(m_Scale); } @@ -169,7 +168,7 @@ public: void clearData(); - void showColor(const struct CRGB & color, CRGB scale); + void showColor(const struct CRGB & color, uint8_t scale); void showColor(const struct CRGB & color) { showColor(color, m_Scale); } |