Shortened some unused desriptions to save memory

Made overlays optional due to limited use
This commit is contained in:
cschwinne 2017-09-18 10:20:04 +02:00
parent 30b6fd8589
commit 42e4fe7f3a
4 changed files with 53 additions and 46 deletions

View File

@ -168,22 +168,22 @@ class WS2812FX : public Adafruit_NeoPixel {
_name[FX_MODE_BLINK] = "Blink"; _name[FX_MODE_BLINK] = "Blink";
_name[FX_MODE_BREATH] = "Breath"; _name[FX_MODE_BREATH] = "Breath";
_name[FX_MODE_COLOR_WIPE] = "Color Wipe"; _name[FX_MODE_COLOR_WIPE] = "Color Wipe";
_name[FX_MODE_COLOR_WIPE_RANDOM] = "Color Wipe Random"; _name[FX_MODE_COLOR_WIPE_RANDOM] = "Color Wipe R";
_name[FX_MODE_RANDOM_COLOR] = "Random Color"; _name[FX_MODE_RANDOM_COLOR] = "R Color";
_name[FX_MODE_SINGLE_DYNAMIC] = "Single Dynamic"; _name[FX_MODE_SINGLE_DYNAMIC] = "Dynamic";
_name[FX_MODE_MULTI_DYNAMIC] = "Multi Dynamic"; _name[FX_MODE_MULTI_DYNAMIC] = "M Dynamic";
_name[FX_MODE_RAINBOW] = "Rainbow"; _name[FX_MODE_RAINBOW] = "Rainbow";
_name[FX_MODE_RAINBOW_CYCLE] = "Rainbow Cycle"; _name[FX_MODE_RAINBOW_CYCLE] = "Cycle";
_name[FX_MODE_SCAN] = "Scan"; _name[FX_MODE_SCAN] = "Scan";
_name[FX_MODE_DUAL_SCAN] = "Dual Scan"; _name[FX_MODE_DUAL_SCAN] = "2x Scan";
_name[FX_MODE_FADE] = "Fade"; _name[FX_MODE_FADE] = "Fade";
_name[FX_MODE_THEATER_CHASE] = "Theater Chase"; _name[FX_MODE_THEATER_CHASE] = "T Chase";
_name[FX_MODE_THEATER_CHASE_RAINBOW] = "Theater Chase Rainbow"; _name[FX_MODE_THEATER_CHASE_RAINBOW] = "T Chase Rainbow";
_name[FX_MODE_RUNNING_LIGHTS] = "Running Lights"; _name[FX_MODE_RUNNING_LIGHTS] = "Running";
_name[FX_MODE_TWINKLE] = "Twinkle"; _name[FX_MODE_TWINKLE] = "Twinkle";
_name[FX_MODE_TWINKLE_RANDOM] = "Twinkle Random"; _name[FX_MODE_TWINKLE_RANDOM] = "Twinkle R";
_name[FX_MODE_TWINKLE_FADE] = "Twinkle Fade"; _name[FX_MODE_TWINKLE_FADE] = "Twinkle F";
_name[FX_MODE_TWINKLE_FADE_RANDOM] = "Twinkle Fade Random"; _name[FX_MODE_TWINKLE_FADE_RANDOM] = "Twinkle F R";
_name[FX_MODE_SPARKLE] = "Sparkle"; _name[FX_MODE_SPARKLE] = "Sparkle";
_name[FX_MODE_FLASH_SPARKLE] = "Flash Sparkle"; _name[FX_MODE_FLASH_SPARKLE] = "Flash Sparkle";
_name[FX_MODE_HYPER_SPARKLE] = "Hyper Sparkle"; _name[FX_MODE_HYPER_SPARKLE] = "Hyper Sparkle";
@ -193,30 +193,30 @@ class WS2812FX : public Adafruit_NeoPixel {
_name[FX_MODE_BLINK_RAINBOW] = "Blink Rainbow"; _name[FX_MODE_BLINK_RAINBOW] = "Blink Rainbow";
_name[FX_MODE_CHASE_WHITE] = "Chase White"; _name[FX_MODE_CHASE_WHITE] = "Chase White";
_name[FX_MODE_CHASE_COLOR] = "Chase Color"; _name[FX_MODE_CHASE_COLOR] = "Chase Color";
_name[FX_MODE_CHASE_RANDOM] = "Chase Random"; _name[FX_MODE_CHASE_RANDOM] = "Chase R";
_name[FX_MODE_CHASE_RAINBOW] = "Chase Rainbow"; _name[FX_MODE_CHASE_RAINBOW] = "Chase Rainbow";
_name[FX_MODE_CHASE_FLASH] = "Chase Flash"; _name[FX_MODE_CHASE_FLASH] = "Chase Flash";
_name[FX_MODE_CHASE_FLASH_RANDOM] = "Chase Flash Random"; _name[FX_MODE_CHASE_FLASH_RANDOM] = "Chase Flash R";
_name[FX_MODE_CHASE_RAINBOW_WHITE] = "Chase Rainbow White"; _name[FX_MODE_CHASE_RAINBOW_WHITE] = "Chase Rainbow White";
_name[FX_MODE_CHASE_BLACKOUT] = "Chase Blackout"; _name[FX_MODE_CHASE_BLACKOUT] = "Chase Black";
_name[FX_MODE_CHASE_BLACKOUT_RAINBOW]= "Chase Blackout Rainbow"; _name[FX_MODE_CHASE_BLACKOUT_RAINBOW]= "Chase Black Rainbow";
_name[FX_MODE_COLOR_SWEEP_RANDOM] = "Color Sweep Random"; _name[FX_MODE_COLOR_SWEEP_RANDOM] = "Color Sweep Random";
_name[FX_MODE_RUNNING_COLOR] = "Running Color"; _name[FX_MODE_RUNNING_COLOR] = "Running Color";
_name[FX_MODE_RUNNING_RED_BLUE] = "Running Red Blue"; _name[FX_MODE_RUNNING_RED_BLUE] = "Running Red Blue";
_name[FX_MODE_RUNNING_RANDOM] = "Running Random"; _name[FX_MODE_RUNNING_RANDOM] = "Running R";
_name[FX_MODE_LARSON_SCANNER] = "Larson Scanner"; _name[FX_MODE_LARSON_SCANNER] = "Scanner";
_name[FX_MODE_COMET] = "Comet"; _name[FX_MODE_COMET] = "Comet";
_name[FX_MODE_FIREWORKS] = "Fireworks"; _name[FX_MODE_FIREWORKS] = "Fireworks";
_name[FX_MODE_FIREWORKS_RANDOM] = "Fireworks Random"; _name[FX_MODE_FIREWORKS_RANDOM] = "Fireworks R";
_name[FX_MODE_MERRY_CHRISTMAS] = "Merry Christmas"; _name[FX_MODE_MERRY_CHRISTMAS] = "Christmas";
_name[FX_MODE_FIRE_FLICKER] = "Fire Flicker"; _name[FX_MODE_FIRE_FLICKER] = "Flicker";
_name[FX_MODE_FIRE_FLICKER_SOFT] = "Fire Flicker (soft)"; _name[FX_MODE_FIRE_FLICKER_SOFT] = "Flicker (soft)";
_name[FX_MODE_FADE_DOWN] = "Fade (Internal)"; _name[FX_MODE_FADE_DOWN] = "Fade (Internal)";
_name[FX_MODE_DUAL_COLOR_WIPE_IN_OUT] = "Dual Color Wipe In to Out"; _name[FX_MODE_DUAL_COLOR_WIPE_IN_OUT] = "Wipe In Out";
_name[FX_MODE_DUAL_COLOR_WIPE_IN_IN] = "Dual Color Wipe In to In"; _name[FX_MODE_DUAL_COLOR_WIPE_IN_IN] = "Wipe In In";
_name[FX_MODE_DUAL_COLOR_WIPE_OUT_OUT] = "Dual Color Wipe Out to Out"; _name[FX_MODE_DUAL_COLOR_WIPE_OUT_OUT] = "Wipe Out Out";
_name[FX_MODE_DUAL_COLOR_WIPE_OUT_IN] = "Dual Color Wipe Out to In"; _name[FX_MODE_DUAL_COLOR_WIPE_OUT_IN] = "Wipe Out In";
_name[FX_MODE_CIRCUS_COMBUSTUS] = "Circus Combustus"; _name[FX_MODE_CIRCUS_COMBUSTUS] = "Circus";
_mode_index = DEFAULT_MODE; _mode_index = DEFAULT_MODE;
_speed = DEFAULT_SPEED; _speed = DEFAULT_SPEED;

View File

@ -80,9 +80,8 @@ Send notifications on button press: <input type=checkbox name=NSBTN> <br>
Emulate Alexa device: <input type=checkbox name=ALEXA> <br> Emulate Alexa device: <input type=checkbox name=ALEXA> <br>
Alexa invocation name: <input name=AINVN maxlength=32><br> Alexa invocation name: <input name=AINVN maxlength=32><br>
Send Alexa notifications: <input type=checkbox name=NSALX> <br> Send Alexa notifications: <input type=checkbox name=NSALX> <br>
<h3>Time (highly experimental!)</h3> <h3>Time (experimental!)</h3>
<b> Warning! </b>NTP was updated but still causes crashes. Requires reboot. <br> Could still cause crashes. Requires reboot. <br>
It is really not recommended to use this! <br>
Get time from NTP server: <input type=checkbox name=NTPON> <br> Get time from NTP server: <input type=checkbox name=NTPON> <br>
Current local time is <span class=times>unknown</span> <br> Current local time is <span class=times>unknown</span> <br>
<h3>Advanced</h3> <h3>Advanced</h3>

View File

@ -28,6 +28,9 @@
//spiffs FS only useful for debug //spiffs FS only useful for debug
//#define USEFS //#define USEFS
//overlays, needed for clocks etc.
//#define USEOVERLAYS
#ifdef USEFS #ifdef USEFS
#include <FS.h> #include <FS.h>
#endif #endif
@ -101,21 +104,6 @@ boolean ntpEnabled = false;
IPAddress ntpServerIP; IPAddress ntpServerIP;
const char* ntpServerName = "time.nist.gov"; const char* ntpServerName = "time.nist.gov";
//overlay stuff
uint8_t overlayDefault = 0;
int overlayMin = 0, overlayMax = 9;
int analogClock12pixel = 25;
boolean analogClockSecondsTrail = false;
boolean analogClock5MinuteMarks = true;
boolean nixieClockDisplaySeconds = false;
boolean nixieClock12HourFormat = false;
boolean overlayReverse = true;
uint8_t overlaySpeed = 200;
boolean useGammaCorrectionBri = true;
boolean useGammaCorrectionRGB = true;
int arlsOffset = -22; //10: -22 assuming arls52
boolean realtimeEnabled = true;
//alexa //alexa
boolean alexaEnabled = true; boolean alexaEnabled = true;
String alexaInvocationName = "Light"; String alexaInvocationName = "Light";
@ -155,7 +143,17 @@ unsigned long ntpPacketSentTime = 999000000L;
const unsigned long seventyYears = 2208988800UL; const unsigned long seventyYears = 2208988800UL;
//overlay stuff //overlay stuff
uint8_t overlayDefault = 0;
uint8_t overlayCurrent = 0; uint8_t overlayCurrent = 0;
#ifdef USEOVERLAYS
int overlayMin = 0, overlayMax = 9;
int analogClock12pixel = 25;
boolean analogClockSecondsTrail = false;
boolean analogClock5MinuteMarks = true;
boolean nixieClockDisplaySeconds = false;
boolean nixieClock12HourFormat = false;
boolean overlayReverse = true;
uint8_t overlaySpeed = 200;
long overlayRefreshMs = 200; long overlayRefreshMs = 200;
unsigned long overlayRefreshedTime; unsigned long overlayRefreshedTime;
int overlayArr[6]; int overlayArr[6];
@ -164,6 +162,8 @@ int overlayPauseDur[6];
int nixieClockI = -1; int nixieClockI = -1;
boolean nixiePause; boolean nixiePause;
unsigned long countdownTime = 1483225200L; unsigned long countdownTime = 1483225200L;
#endif
int arlsTimeoutMillis = 2500; int arlsTimeoutMillis = 2500;
boolean arlsTimeout = false; boolean arlsTimeout = false;
long arlsTimeoutTime; long arlsTimeoutTime;
@ -172,6 +172,11 @@ uint8_t auxTime = 0;
unsigned long auxStartTime; unsigned long auxStartTime;
boolean auxActive, auxActiveBefore; boolean auxActive, auxActiveBefore;
boolean useGammaCorrectionBri = true;
boolean useGammaCorrectionRGB = true;
int arlsOffset = -22; //10: -22 assuming arls52
boolean realtimeEnabled = true;
//alexa //alexa
Switch *alexa = NULL; Switch *alexa = NULL;
UpnpBroadcastResponder upnpBroadcastResponder; UpnpBroadcastResponder upnpBroadcastResponder;
@ -239,7 +244,9 @@ void loop() {
yield(); yield();
handleButton(); handleButton();
handleNetworkTime(); handleNetworkTime();
#ifdef USEOVERLAYS
handleOverlays(); handleOverlays();
#endif
handleAlexa(); handleAlexa();
strip.service(); strip.service();

View File

@ -1,3 +1,4 @@
#ifdef USEOVERLAYS
void nixieDisplay(int num[], int dur[], int pausedur[], int cnt) void nixieDisplay(int num[], int dur[], int pausedur[], int cnt)
{ {
strip.setRange(overlayMin, overlayMax, 0); strip.setRange(overlayMin, overlayMax, 0);
@ -270,4 +271,4 @@ void handleOverlays()
} }
} }
} }
#endif