TV Simulator Effect (#1548)

* New Effect "TV Simulator"

based on "Fake TV Light for Engineers" by Phillip Burgess https://learn.adafruit.com/fake-tv-light-for-engineers/arduino-sketch

* removed some not-used functions 

...from my 1st attempt with "Phoney TV" - but this one did not look good.

* Created new version of tv_colors.h based on 18 movies

...and some corrections

* Add include guards for tv_colors.h and disable option

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
This commit is contained in:
Def3nder
2020-12-22 13:15:57 +01:00
committed by GitHub
parent 068c5851ef
commit e16bab8dd9
4 changed files with 1611 additions and 5 deletions

View File

@@ -52,6 +52,9 @@
#define MAX(a,b) ((a)>(b)?(a):(b))
#endif
/* Disable effects with high flash memory usage (currently TV simulator) - saves 18.5kB */
//#define WLED_DISABLE_FX_HIGH_FLASH_USE
/* Not used in all effects yet */
#define WLED_FPS 42
#define FRAMETIME (1000/WLED_FPS)
@@ -116,7 +119,7 @@
#define IS_REVERSE ((SEGMENT.options & REVERSE ) == REVERSE )
#define IS_SELECTED ((SEGMENT.options & SELECTED ) == SELECTED )
#define MODE_COUNT 116
#define MODE_COUNT 117
#define FX_MODE_STATIC 0
#define FX_MODE_BLINK 1
@@ -234,6 +237,7 @@
#define FX_MODE_WASHING_MACHINE 113
#define FX_MODE_CANDY_CANE 114
#define FX_MODE_BLENDS 115
#define FX_MODE_TV_SIMULATOR 116
class WS2812FX {
typedef uint16_t (WS2812FX::*mode_ptr)(void);
@@ -463,6 +467,7 @@ class WS2812FX {
_mode[FX_MODE_WASHING_MACHINE] = &WS2812FX::mode_washing_machine;
_mode[FX_MODE_CANDY_CANE] = &WS2812FX::mode_candy_cane;
_mode[FX_MODE_BLENDS] = &WS2812FX::mode_blends;
_mode[FX_MODE_TV_SIMULATOR] = &WS2812FX::mode_tv_simulator;
_brightness = DEFAULT_BRIGHTNESS;
currentPalette = CRGBPalette16(CRGB::Black);
@@ -673,7 +678,8 @@ class WS2812FX {
mode_dancing_shadows(void),
mode_washing_machine(void),
mode_candy_cane(void),
mode_blends(void);
mode_blends(void),
mode_tv_simulator(void);
private:
NeoPixelWrapper *bus;
@@ -761,7 +767,7 @@ const char JSON_mode_names[] PROGMEM = R"=====([
"Twinklefox","Twinklecat","Halloween Eyes","Solid Pattern","Solid Pattern Tri","Spots","Spots Fade","Glitter","Candle","Fireworks Starburst",
"Fireworks 1D","Bouncing Balls","Sinelon","Sinelon Dual","Sinelon Rainbow","Popcorn","Drip","Plasma","Percent","Ripple Rainbow",
"Heartbeat","Pacifica","Candle Multi", "Solid Glitter","Sunrise","Phased","Twinkleup","Noise Pal", "Sine","Phased Noise",
"Flow","Chunchun","Dancing Shadows","Washing Machine","Candy Cane","Blends"
"Flow","Chunchun","Dancing Shadows","Washing Machine","Candy Cane","Blends","TV Simulator"
])=====";