Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FastLED/FastLED.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Garcia <danielgarcia@gmail.com>2016-01-24 00:42:16 +0300
committerDaniel Garcia <danielgarcia@gmail.com>2016-01-24 00:42:16 +0300
commit13401c37cf93be6c9ebed19452a44c4718ee9467 (patch)
treede9c57831d4f123bf033737f2d0ef3b0d7a35362
parent82133f4e054ac94149edc68dc76f49114eccb404 (diff)
Make showColor power aware
-rw-r--r--FastLED.cpp5
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();