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>2014-03-21 21:21:01 +0400
committerDaniel Garcia <danielgarcia@gmail.com>2014-03-21 21:21:01 +0400
commit3a13da215264b4c79991a2b3c8e692d2e4f4e024 (patch)
tree17cd4fc787c583629df22f507620715aff6cb15e
parentae4f4357bef65b1a9ee0e7ecf6a0b92742f5a172 (diff)
Add global setDither/setTemp/setCorrection methods - this will propagate the cahnge to all the controllers.
-rw-r--r--FastLED.cpp25
-rw-r--r--FastLED.h4
2 files changed, 29 insertions, 0 deletions
diff --git a/FastLED.cpp b/FastLED.cpp
index 2b5d7698..30b31cf2 100644
--- a/FastLED.cpp
+++ b/FastLED.cpp
@@ -66,3 +66,28 @@ void CFastLED::delay(unsigned long ms) {
unsigned long start = millis();
while((millis()-start) < ms) { show(); }
}
+
+void CFastLED::setTemperature(const struct CRGB & temp) {
+ CLEDController *pCur = CLEDController::head();
+ while(pCur) {
+ pCur->setTemperature(temp);
+ pCur = pCur->next();
+ }
+}
+
+void CFastLED::setCorrection(const struct CRGB & correction) {
+ CLEDController *pCur = CLEDController::head();
+ while(pCur) {
+ pCur->setCorrection(correction);
+ pCur = pCur->next();
+ }
+}
+
+void CFastLED::setDither(uint8_t ditherMode) {
+ CLEDController *pCur = CLEDController::head();
+ while(pCur) {
+ pCur->setDither(ditherMode);
+ pCur = pCur->next();
+ }
+}
+
diff --git a/FastLED.h b/FastLED.h
index 6f335a1e..7ce487ca 100644
--- a/FastLED.h
+++ b/FastLED.h
@@ -180,6 +180,10 @@ public:
void delay(unsigned long ms);
+ void setTemperature(const struct CRGB & temp);
+ void setCorrection(const struct CRGB & correction);
+ void setDither(uint8_t ditherMode = BINARY_DITHER);
+
};
extern CFastLED & FastSPI_LED;