diff --git a/src/led.cpp b/src/led.cpp index d934177..74ba99c 100644 --- a/src/led.cpp +++ b/src/led.cpp @@ -40,7 +40,11 @@ void Led::loop_off(void) { if (wakeupIndex == 0) { fill_solid(leds, NUM_LEDS, CRGB::Black); } else { + // Scale the heat value from 0-255 down to 0-240 + // for best results with color palettes. + //byte colorindex = scale8( heat[j], 240); CRGB color = ColorFromPalette(HeatColors_p, wakeupIndex); + if (wakeupIndex > 240) color = CRGB::White; fill_solid(leds, NUM_LEDS, color); // fadeToBlackBy( leds, NUM_LEDS, 255-wakeupIndex); FastLED.setBrightness(wakeupIndex); @@ -102,7 +106,7 @@ void Led::setup(void) { pinMode(LED_PIN, OUTPUT); FastLED.addLeds(leds, NUM_LEDS); FastLED.setBrightness(96); - FastLED.setCorrection(0xFF5050); + FastLED.setCorrection(TypicalLEDStrip); fill_solid(leds, NUM_LEDS, CRGB::Black); color = CRGB::Orange;