diff options
author | Daniel Garcia <danielgarcia@gmail.com> | 2016-01-24 00:42:16 +0300 |
---|---|---|
committer | Daniel Garcia <danielgarcia@gmail.com> | 2016-01-24 00:42:16 +0300 |
commit | 13401c37cf93be6c9ebed19452a44c4718ee9467 (patch) | |
tree | de9c57831d4f123bf033737f2d0ef3b0d7a35362 | |
parent | 82133f4e054ac94149edc68dc76f49114eccb404 (diff) |
Make showColor power aware
-rw-r--r-- | FastLED.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/FastLED.cpp b/FastLED.cpp index 949372ea..f28c662a 100644 --- a/FastLED.cpp +++ b/FastLED.cpp @@ -86,6 +86,11 @@ void CFastLED::showColor(const struct CRGB & color, uint8_t scale) { while(m_nMinMicros && ((micros()-lastshow) < m_nMinMicros)); lastshow = micros(); + // If we have a function for computing power, use it! + if(m_pPowerFunc) { + scale = (*m_pPowerFunc)(scale, m_nPowerData); + } + CLEDController *pCur = CLEDController::head(); while(pCur) { uint8_t d = pCur->getDither(); |