fixes for fastled refactor
TProgmemRGBGradientPalettePtr was replaced with TProgmemRGBGradientPaletteRef
This commit is contained in:
parent
31ccb26ecc
commit
3caeb03f56
4 changed files with 11 additions and 8 deletions
|
|
@ -23,6 +23,7 @@
|
|||
// XY(x,y) takes x and y coordinates and returns an LED index number,
|
||||
// for use like this: leds[ XY(x,y) ] == CRGB::Red;
|
||||
|
||||
#include <FastLED.h>
|
||||
|
||||
// Parameters for width and height
|
||||
const uint8_t kMatrixWidth = 24;
|
||||
|
|
@ -79,3 +80,6 @@ uint8_t XY( uint8_t x, uint8_t y)
|
|||
uint8_t j = JacketTable[i];
|
||||
return j;
|
||||
}
|
||||
|
||||
// Instantiate an XYMap object
|
||||
XYMap myXYMap(kMatrixWidth, kMatrixHeight);
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ void swirly()
|
|||
// blur it repeatedly. Since the blurring is 'lossy', there's
|
||||
// an automatic trend toward black -- by design.
|
||||
uint8_t blurAmount = beatsin8(2,10,255);
|
||||
blur2d( leds, kMatrixWidth, kMatrixHeight, blurAmount);
|
||||
blur2d(leds, kMatrixWidth, kMatrixHeight, blurAmount, myXYMap);
|
||||
|
||||
// Use two out-of-sync sine waves
|
||||
uint8_t i = beatsin8( 27, kBorderWidth, kMatrixHeight-kBorderWidth);
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ void setup() {
|
|||
// Forward declarations of an array of cpt-city gradient palettes, and
|
||||
// a count of how many there are. The actual color palette definitions
|
||||
// are at the bottom of this file.
|
||||
extern const TProgmemRGBGradientPalettePtr gGradientPalettes[];
|
||||
extern const TProgmemRGBGradientPaletteRef gGradientPalettes[];
|
||||
extern const uint8_t gGradientPaletteCount;
|
||||
|
||||
// Current palette number from the 'playlist' of color palettes
|
||||
|
|
@ -265,7 +265,7 @@ DEFINE_GRADIENT_PALETTE( bhw3_32_gp ) {
|
|||
//
|
||||
// This list of color palettes acts as a "playlist"; you can
|
||||
// add or delete, or re-arrange as you wish.
|
||||
const TProgmemRGBGradientPalettePtr gGradientPalettes[] = {
|
||||
const TProgmemRGBGradientPaletteRef gGradientPalettes[] = {
|
||||
bhw3_32_gp,
|
||||
bhw1_01_gp,
|
||||
bhw1_07_gp,
|
||||
|
|
@ -281,7 +281,7 @@ const TProgmemRGBGradientPalettePtr gGradientPalettes[] = {
|
|||
|
||||
// Count of how many cpt-city gradients are defined:
|
||||
const uint8_t gGradientPaletteCount =
|
||||
sizeof( gGradientPalettes) / sizeof( TProgmemRGBGradientPalettePtr );
|
||||
sizeof( gGradientPalettes) / sizeof( TProgmemRGBGradientPaletteRef );
|
||||
void loop()
|
||||
{
|
||||
EVERY_N_SECONDS( SECONDS_PER_PALETTE ) {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ void setup() {
|
|||
// Forward declarations of an array of cpt-city gradient palettes, and
|
||||
// a count of how many there are. The actual color palette definitions
|
||||
// are at the bottom of this file.
|
||||
extern const TProgmemRGBGradientPalettePtr gGradientPalettes[];
|
||||
extern const TProgmemRGBGradientPaletteRef gGradientPalettes[];
|
||||
extern const uint8_t gGradientPaletteCount;
|
||||
|
||||
// Current palette number from the 'playlist' of color palettes
|
||||
|
|
@ -618,7 +618,7 @@ DEFINE_GRADIENT_PALETTE( bhw1_28_gp ) {
|
|||
//
|
||||
// This list of color palettes acts as a "playlist"; you can
|
||||
// add or delete, or re-arrange as you wish.
|
||||
const TProgmemRGBGradientPalettePtr gGradientPalettes[] = {
|
||||
const TProgmemRGBGradientPaletteRef gGradientPalettes[] = {
|
||||
bhw1_28_gp,
|
||||
Sunset_Real_gp,
|
||||
es_rivendell_15_gp,
|
||||
|
|
@ -657,7 +657,7 @@ const TProgmemRGBGradientPalettePtr gGradientPalettes[] = {
|
|||
|
||||
// Count of how many cpt-city gradients are defined:
|
||||
const uint8_t gGradientPaletteCount =
|
||||
sizeof( gGradientPalettes) / sizeof( TProgmemRGBGradientPalettePtr );
|
||||
sizeof( gGradientPalettes) / sizeof( TProgmemRGBGradientPaletteRef );
|
||||
|
||||
|
||||
|
||||
|
|
@ -677,4 +677,3 @@ const uint8_t gGradientPaletteCount =
|
|||
FastLED.show();
|
||||
FastLED.delay(20);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue