Skip to content

Commit 3caeb03

Browse files
committed
fixes for fastled refactor
TProgmemRGBGradientPalettePtr was replaced with TProgmemRGBGradientPaletteRef
1 parent 31ccb26 commit 3caeb03

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

GemmaM0_Band_Jacket/DiscoBandCamp/XYmap.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
// XY(x,y) takes x and y coordinates and returns an LED index number,
2424
// for use like this: leds[ XY(x,y) ] == CRGB::Red;
2525

26+
#include <FastLED.h>
2627

2728
// Parameters for width and height
2829
const uint8_t kMatrixWidth = 24;
@@ -79,3 +80,6 @@ uint8_t XY( uint8_t x, uint8_t y)
7980
uint8_t j = JacketTable[i];
8081
return j;
8182
}
83+
84+
// Instantiate an XYMap object
85+
XYMap myXYMap(kMatrixWidth, kMatrixHeight);

GemmaM0_Band_Jacket/DiscoBandCamp/effects.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ void swirly()
286286
// blur it repeatedly. Since the blurring is 'lossy', there's
287287
// an automatic trend toward black -- by design.
288288
uint8_t blurAmount = beatsin8(2,10,255);
289-
blur2d( leds, kMatrixWidth, kMatrixHeight, blurAmount);
289+
blur2d(leds, kMatrixWidth, kMatrixHeight, blurAmount, myXYMap);
290290

291291
// Use two out-of-sync sine waves
292292
uint8_t i = beatsin8( 27, kBorderWidth, kMatrixHeight-kBorderWidth);

Programmable_12v_Outdoor_Cafe_Lights/Programmable_12v_Outdoor_Cafe_Lights.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void setup() {
4343
// Forward declarations of an array of cpt-city gradient palettes, and
4444
// a count of how many there are. The actual color palette definitions
4545
// are at the bottom of this file.
46-
extern const TProgmemRGBGradientPalettePtr gGradientPalettes[];
46+
extern const TProgmemRGBGradientPaletteRef gGradientPalettes[];
4747
extern const uint8_t gGradientPaletteCount;
4848

4949
// Current palette number from the 'playlist' of color palettes
@@ -265,7 +265,7 @@ DEFINE_GRADIENT_PALETTE( bhw3_32_gp ) {
265265
//
266266
// This list of color palettes acts as a "playlist"; you can
267267
// add or delete, or re-arrange as you wish.
268-
const TProgmemRGBGradientPalettePtr gGradientPalettes[] = {
268+
const TProgmemRGBGradientPaletteRef gGradientPalettes[] = {
269269
bhw3_32_gp,
270270
bhw1_01_gp,
271271
bhw1_07_gp,
@@ -281,7 +281,7 @@ const TProgmemRGBGradientPalettePtr gGradientPalettes[] = {
281281

282282
// Count of how many cpt-city gradients are defined:
283283
const uint8_t gGradientPaletteCount =
284-
sizeof( gGradientPalettes) / sizeof( TProgmemRGBGradientPalettePtr );
284+
sizeof( gGradientPalettes) / sizeof( TProgmemRGBGradientPaletteRef );
285285
void loop()
286286
{
287287
EVERY_N_SECONDS( SECONDS_PER_PALETTE ) {

simple_strand_palettes/simple_strand_palettes.ino

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void setup() {
4848
// Forward declarations of an array of cpt-city gradient palettes, and
4949
// a count of how many there are. The actual color palette definitions
5050
// are at the bottom of this file.
51-
extern const TProgmemRGBGradientPalettePtr gGradientPalettes[];
51+
extern const TProgmemRGBGradientPaletteRef gGradientPalettes[];
5252
extern const uint8_t gGradientPaletteCount;
5353

5454
// Current palette number from the 'playlist' of color palettes
@@ -618,7 +618,7 @@ DEFINE_GRADIENT_PALETTE( bhw1_28_gp ) {
618618
//
619619
// This list of color palettes acts as a "playlist"; you can
620620
// add or delete, or re-arrange as you wish.
621-
const TProgmemRGBGradientPalettePtr gGradientPalettes[] = {
621+
const TProgmemRGBGradientPaletteRef gGradientPalettes[] = {
622622
bhw1_28_gp,
623623
Sunset_Real_gp,
624624
es_rivendell_15_gp,
@@ -657,7 +657,7 @@ const TProgmemRGBGradientPalettePtr gGradientPalettes[] = {
657657

658658
// Count of how many cpt-city gradients are defined:
659659
const uint8_t gGradientPaletteCount =
660-
sizeof( gGradientPalettes) / sizeof( TProgmemRGBGradientPalettePtr );
660+
sizeof( gGradientPalettes) / sizeof( TProgmemRGBGradientPaletteRef );
661661

662662

663663

@@ -677,4 +677,3 @@ const uint8_t gGradientPaletteCount =
677677
FastLED.show();
678678
FastLED.delay(20);
679679
}
680-

0 commit comments

Comments
 (0)