Skip to content

Commit 2742773

Browse files
committed
CI extern
1 parent 30e081c commit 2742773

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

GemmaM0_Band_Jacket/DiscoBandCamp/DiscoBandCamp.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include "utils.h"
4343
#include "effects.h"
4444
#include "buttons.h"
45+
extern XYMap myXYMap;
4546

4647
// list of Functions:
4748
functionList effectList[] = {SolidRed, //all pixels solid red

GemmaM0_Band_Jacket/DiscoBandCamp/XYmap.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
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+
#ifndef XYMAP_H
27+
#define XYMAP_H
28+
2629
#include <FastLED.h>
2730

2831
// Parameters for width and height
@@ -31,7 +34,7 @@ const uint8_t kMatrixHeight = 8;
3134
const uint8_t kBorderWidth = 2; //for swirly
3235

3336
#define NUM_LEDS (kMatrixWidth * kMatrixHeight)
34-
CRGB leds[ NUM_LEDS ];
37+
extern CRGB leds[ NUM_LEDS ];
3538

3639
// This function will return the right 'led index number' for
3740
// a given set of X and Y coordinates on DiscoBandCamp
@@ -82,6 +85,7 @@ uint16_t XY(uint16_t x, uint16_t y, uint16_t width, uint16_t height)
8285
uint8_t j = JacketTable[i];
8386
return j;
8487
}
88+
#endif
8589

8690
// Instantiate an XYMap object
8791
XYMap myXYMap = XYMap::constructWithUserFunction(kMatrixWidth, kMatrixHeight, XY);

GemmaM0_Band_Jacket/DiscoBandCamp/effects.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
// Selection of effects from the FastLED library & Macetech RGB Shades
66
#include "XYmap.h"
7-
7+
extern XYMap myXYMap;
88
// Triple Sine Waves
99
void threeSine() {
1010

GemmaM0_Band_Jacket/DiscoBandCamp/utils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// SPDX-FileCopyrightText: 2019 Anne Barela for Adafruit Industries
22
//
33
// SPDX-License-Identifier: MIT
4-
5-
// Assorted useful functions and variables
64
#include "XYmap.h"
5+
extern XYMap myXYMap;
6+
// Assorted useful functions and variables
77
// Global variables
88
boolean effectInit = false; // indicates if a pattern has been recently switched
99
uint16_t effectDelay = 0; // time between automatic effect changes

0 commit comments

Comments
 (0)