From 27427735ee58aa08471de23e615e51bb2f64ca1d Mon Sep 17 00:00:00 2001 From: Liz Date: Mon, 6 Jan 2025 18:00:11 -0500 Subject: [PATCH] CI extern --- GemmaM0_Band_Jacket/DiscoBandCamp/DiscoBandCamp.ino | 1 + GemmaM0_Band_Jacket/DiscoBandCamp/XYmap.h | 6 +++++- GemmaM0_Band_Jacket/DiscoBandCamp/effects.h | 2 +- GemmaM0_Band_Jacket/DiscoBandCamp/utils.h | 4 ++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/GemmaM0_Band_Jacket/DiscoBandCamp/DiscoBandCamp.ino b/GemmaM0_Band_Jacket/DiscoBandCamp/DiscoBandCamp.ino index 828d99035..dc1c44516 100644 --- a/GemmaM0_Band_Jacket/DiscoBandCamp/DiscoBandCamp.ino +++ b/GemmaM0_Band_Jacket/DiscoBandCamp/DiscoBandCamp.ino @@ -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 diff --git a/GemmaM0_Band_Jacket/DiscoBandCamp/XYmap.h b/GemmaM0_Band_Jacket/DiscoBandCamp/XYmap.h index 1355be492..3178e2e98 100644 --- a/GemmaM0_Band_Jacket/DiscoBandCamp/XYmap.h +++ b/GemmaM0_Band_Jacket/DiscoBandCamp/XYmap.h @@ -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 // Parameters for width and height @@ -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 @@ -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); diff --git a/GemmaM0_Band_Jacket/DiscoBandCamp/effects.h b/GemmaM0_Band_Jacket/DiscoBandCamp/effects.h index b715c8ed2..709ac2172 100644 --- a/GemmaM0_Band_Jacket/DiscoBandCamp/effects.h +++ b/GemmaM0_Band_Jacket/DiscoBandCamp/effects.h @@ -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() { diff --git a/GemmaM0_Band_Jacket/DiscoBandCamp/utils.h b/GemmaM0_Band_Jacket/DiscoBandCamp/utils.h index b5b7206f3..378a3d039 100644 --- a/GemmaM0_Band_Jacket/DiscoBandCamp/utils.h +++ b/GemmaM0_Band_Jacket/DiscoBandCamp/utils.h @@ -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