Skip to content

Commit

Permalink
CI extern
Browse files Browse the repository at this point in the history
  • Loading branch information
BlitzCityDIY committed Jan 6, 2025
1 parent 30e081c commit 2742773
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions GemmaM0_Band_Jacket/DiscoBandCamp/DiscoBandCamp.ino
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include "utils.h"
#include "effects.h"
#include "buttons.h"
extern XYMap myXYMap;

// list of Functions:
functionList effectList[] = {SolidRed, //all pixels solid red
Expand Down
6 changes: 5 additions & 1 deletion GemmaM0_Band_Jacket/DiscoBandCamp/XYmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
// XY(x,y) takes x and y coordinates and returns an LED index number,
// for use like this: leds[ XY(x,y) ] == CRGB::Red;

#ifndef XYMAP_H
#define XYMAP_H

#include <FastLED.h>

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

#define NUM_LEDS (kMatrixWidth * kMatrixHeight)
CRGB leds[ NUM_LEDS ];
extern CRGB leds[ NUM_LEDS ];

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

// Instantiate an XYMap object
XYMap myXYMap = XYMap::constructWithUserFunction(kMatrixWidth, kMatrixHeight, XY);
2 changes: 1 addition & 1 deletion GemmaM0_Band_Jacket/DiscoBandCamp/effects.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// Selection of effects from the FastLED library & Macetech RGB Shades
#include "XYmap.h"

extern XYMap myXYMap;
// Triple Sine Waves
void threeSine() {

Expand Down
4 changes: 2 additions & 2 deletions GemmaM0_Band_Jacket/DiscoBandCamp/utils.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-FileCopyrightText: 2019 Anne Barela for Adafruit Industries
//
// SPDX-License-Identifier: MIT

// Assorted useful functions and variables
#include "XYmap.h"
extern XYMap myXYMap;
// Assorted useful functions and variables
// Global variables
boolean effectInit = false; // indicates if a pattern has been recently switched
uint16_t effectDelay = 0; // time between automatic effect changes
Expand Down

0 comments on commit 2742773

Please sign in to comment.