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-16 02:20:53 +0400
committerDaniel Garcia <danielgarcia@gmail.com>2014-03-16 02:20:53 +0400
commit39bbc47df996017083b51e4df6394e8a566c0aec (patch)
tree13bc33fe62131609a1d826f753c584f17742439a /chipsets.h
parentdc3ac23b303890dea0af765736f4c6dc7810e240 (diff)
Move responsibility for scaling brightness to color correction/temperature into the controller objects. Return scale to being a uint8_t
Diffstat (limited to 'chipsets.h')
-rw-r--r--chipsets.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/chipsets.h b/chipsets.h
index 78821b0a..4815138e 100644
--- a/chipsets.h
+++ b/chipsets.h
@@ -7,7 +7,7 @@
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// LPD8806 controller class - takes data/clock/select pin values (N.B. should take an SPI definition?)
-//
+//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <uint8_t DATA_PIN, uint8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, uint8_t SPI_SPEED = DATA_RATE_MHZ(20) >
@@ -52,11 +52,11 @@ public:
mSPI.release();
}
- virtual void showColor(const struct CRGB & data, int nLeds, CRGB scale = CRGB::White) {
+ virtual void showColor(const struct CRGB & data, int nLeds, CRGB scale) {
mSPI.template writeBytes3<LPD8806_ADJUST, RGB_ORDER>((byte*)data.raw, nLeds * 3, scale, false);
}
- virtual void show(const struct CRGB *data, int nLeds, CRGB scale = CRGB::White) {
+ virtual void show(const struct CRGB *data, int nLeds, CRGB scale) {
// TODO rgb-ize scale
mSPI.template writeBytes3<LPD8806_ADJUST, RGB_ORDER>((byte*)data, nLeds * 3, scale);
}
@@ -95,7 +95,7 @@ public:
mWaitDelay.mark();
}
- virtual void showColor(const struct CRGB & data, int nLeds, CRGB scale = CRGB::White) {
+ virtual void showColor(const struct CRGB & data, int nLeds, CRGB scale) {
mWaitDelay.wait();
mSPI.template writeBytes3<RGB_ORDER>((byte*)data.raw, nLeds * 3, scale, false);
mWaitDelay.mark();
@@ -145,7 +145,7 @@ public:
showColor(CRGB(0,0,0), nLeds);
}
- virtual void showColor(const struct CRGB & data, int nLeds, CRGB scale = CRGB::White) {
+ virtual void showColor(const struct CRGB & data, int nLeds, CRGB scale) {
PixelController<RGB_ORDER> pixels(data.raw, scale, true, false, 0);
mSPI.select();
@@ -237,12 +237,12 @@ public:
writeHeader();
}
- virtual void showColor(const struct CRGB & data, int nLeds, CRGB scale = CRGB::White) {
+ virtual void showColor(const struct CRGB & data, int nLeds, CRGB scale) {
mSPI.template writeBytes3<FLAG_START_BIT, RGB_ORDER>((byte*)data.raw, nLeds * 3, scale, false);
writeHeader();
}
- virtual void show(const struct CRGB *data, int nLeds, CRGB scale = CRGB::White) {
+ virtual void show(const struct CRGB *data, int nLeds, CRGB scale) {
// Make sure the FLAG_START_BIT flag is set to ensure that an extra 1 bit is sent at the start
// of each triplet of bytes for rgb data
// writeHeader();
@@ -251,7 +251,7 @@ public:
}
#ifdef SUPPORT_ARGB
- virtual void show(const struct CARGB *data, int nLeds, CRGB scale = CRGB::White) {
+ virtual void show(const struct CARGB *data, int nLeds, CRGB scale) {
mSPI.writeBytesValue(0, 6);
mSPI.template writeBit<0>(0);
mSPI.template writeBit<0>(0);