From 6ceb6385e2089c6ec42614e5b41d8b1fc93579a1 Mon Sep 17 00:00:00 2001 From: Ronald Schaten Date: Fri, 28 Jul 2017 12:36:22 +0200 Subject: [PATCH] enable main_color to be initialized in definitions.h --- Arduino/McLighting/McLighting.ino | 1 + Arduino/McLighting/definitions.h | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Arduino/McLighting/McLighting.ino b/Arduino/McLighting/McLighting.ino index 62c2037..432e395 100644 --- a/Arduino/McLighting/McLighting.ino +++ b/Arduino/McLighting/McLighting.ino @@ -121,6 +121,7 @@ void setup() { strip.setBrightness(brightness); strip.setSpeed(ws2812fx_speed); //strip.setMode(FX_MODE_RAINBOW_CYCLE); + strip.setColor(main_color.red, main_color.green, main_color.blue); strip.start(); // *************************************************************************** diff --git a/Arduino/McLighting/definitions.h b/Arduino/McLighting/definitions.h index 85e3923..8481c9a 100644 --- a/Arduino/McLighting/definitions.h +++ b/Arduino/McLighting/definitions.h @@ -32,6 +32,6 @@ struct ledstate // Data structure to store a state of a single led uint8_t blue; }; -typedef struct ledstate LEDState; // Define the datatype LEDState -LEDState ledstates[NUMLEDS]; // Get an array of led states to store the state of the whole strip -LEDState main_color; // Store the "main color" of the strip used in single color modes +typedef struct ledstate LEDState; // Define the datatype LEDState +LEDState ledstates[NUMLEDS]; // Get an array of led states to store the state of the whole strip +LEDState main_color = { 255, 0, 0 }; // Store the "main color" of the strip used in single color modes