Compare commits
170 Commits
989eabee4a
...
master
Author | SHA1 | Date | |
---|---|---|---|
d76e088c37 | |||
c9825c8f9b | |||
ae997ef802 | |||
a6af2829ee | |||
0a4a62d7c8 | |||
7747e38253 | |||
b9cfc6568b | |||
1d66f9c541 | |||
f9e6a5ebd6 | |||
a96f6c79e3 | |||
ecf5998510 | |||
0ac4f9b181 | |||
fd44b217a7 | |||
209140cfb7 | |||
bcb5fdc9be | |||
b5bb0feccf | |||
0863380648 | |||
075823220a | |||
caa86551a0 | |||
10be8ef7cc | |||
9de77349e8 | |||
599bcd87bc | |||
70ddba2cbc | |||
3f09d9adbf | |||
cfb25d6030 | |||
4762a852d8 | |||
8e2d2225cb | |||
65dd09ca0d | |||
f014fd7cae | |||
1707084299 | |||
402d7f5d75 | |||
521e5f735d | |||
0da161ccd1 | |||
f8b6f5cc02 | |||
c6b2a8a1d0 | |||
6ba916282b | |||
79c13e760f | |||
47812de405 | |||
d28dca0a4d | |||
e2a56d7c29 | |||
439e2de17f | |||
994f4894dd | |||
b5343b59e5 | |||
66c0124072 | |||
2a6f68cc45 | |||
f5d47fe7da | |||
029c93166d | |||
141210a370 | |||
a902addf94 | |||
b644006036 | |||
dfe99408c9 | |||
3c0e4af325 | |||
aa72196a07 | |||
f76354a4d5 | |||
01c364795f | |||
38aa654c54 | |||
1418d519d5 | |||
efe9b924ec | |||
7b8dabee43 | |||
783cfdae3f | |||
54925dfc0e | |||
306f72d838 | |||
230a1f1a91 | |||
bd0041619a | |||
a3caaa1fef | |||
ec379c009e | |||
8568436fc1 | |||
6eeb7488b1 | |||
efa9a73cae | |||
bbdb46c04d | |||
4c611da6d1 | |||
377ccc477f | |||
efebe9adb4 | |||
359b7a7826 | |||
b5c1f350d2 | |||
5eba691429 | |||
d8fe055e3d | |||
6b4f75b8bc | |||
416ab46f9b | |||
b4aa711940 | |||
205a0df842 | |||
8bcee1871f | |||
ef57c5ea2e | |||
0f1d4abe04 | |||
2b50691067 | |||
af1314632e | |||
2b7033b685 | |||
97dd6de280 | |||
54d357e6df | |||
ac1f758b87 | |||
85aee53462 | |||
f42b5e1034 | |||
083564caef | |||
3f6d4cb0be | |||
382631d7d7 | |||
096d13438a | |||
075f434997 | |||
c1024b3423 | |||
2395e51e88 | |||
1c1c3a8054 | |||
937850c90a | |||
b0c1bcaa65 | |||
7cbb156b66 | |||
0a7334e448 | |||
29aa47177e | |||
7ac681002e | |||
36edb94ff0 | |||
d396b68191 | |||
c1cfb693d3 | |||
34d5aa6496 | |||
781954d7f1 | |||
73b8d162c7 | |||
62549e73bf | |||
3018bc6375 | |||
1cd94ac4ae | |||
b8f39410c9 | |||
711719921a | |||
6ba2854a8d | |||
aa11f5ed8a | |||
fa5f1c8816 | |||
b5c99c320b | |||
96e144f96b | |||
792354e371 | |||
571ae26c25 | |||
549bce479a | |||
5bd831cedc | |||
642c91ba96 | |||
fb7c366ed6 | |||
2d4009075d | |||
f7a6a17beb | |||
1754f49b68 | |||
0b80b74be3 | |||
33c2417534 | |||
bf1666fb32 | |||
0d23e5ec6c | |||
a05931d7f9 | |||
a6cd94e416 | |||
2ddd77eb5c | |||
1122546853 | |||
5b70511570 | |||
77fdba213a | |||
ead076f9a3 | |||
82fbc7be43 | |||
90c0df093e | |||
26df11fc47 | |||
0163bbef6c | |||
9eeb4b50fd | |||
d2c0268dce | |||
e897c6bdcd | |||
f1821b0b85 | |||
41af01ee0b | |||
cb4afa5043 | |||
74b967392d | |||
8c9e9e2e2e | |||
f1424d0277 | |||
e52d7c750d | |||
d1a49fe625 | |||
0941ad8349 | |||
5a02050680 | |||
5af7c6337d | |||
ae02509712 | |||
3c0e7a116a | |||
1912772da3 | |||
72cdb46451 | |||
f0509de411 | |||
e8f3ea3281 | |||
3edbf6b252 | |||
dc40653fea | |||
b65afde142 | |||
02b3bbcea8 |
@ -9,7 +9,6 @@ steps:
|
|||||||
- cp include/config.sample.h include/config.h
|
- cp include/config.sample.h include/config.h
|
||||||
- PLATFORMIO_BUILD_FLAGS="-DCONFIG_USABLE -DDEBUG -DMQTT_ENABLE -DMQTT_REPORT_METRICS" pio run
|
- PLATFORMIO_BUILD_FLAGS="-DCONFIG_USABLE -DDEBUG -DMQTT_ENABLE -DMQTT_REPORT_METRICS" pio run
|
||||||
- PLATFORMIO_BUILD_FLAGS="-DCONFIG_USABLE -UDEBUG -UMQTT_ENABLE -UMQTT_REPORT_METRICS" pio run
|
- PLATFORMIO_BUILD_FLAGS="-DCONFIG_USABLE -UDEBUG -UMQTT_ENABLE -UMQTT_REPORT_METRICS" pio run
|
||||||
- PLATFORMIO_BUILD_FLAGS="-DCONFIG_USABLE -DDEBUG -DMQTT_ENABLE -DMQTT_REPORT_METRICS" pio run --environment=esp32
|
|
||||||
|
|
||||||
- name: Notify
|
- name: Notify
|
||||||
image: plugins/matrix
|
image: plugins/matrix
|
||||||
@ -28,6 +27,6 @@ steps:
|
|||||||
{{else}}
|
{{else}}
|
||||||
<strong>Build {{build.number}} failed.</strong> See {{build.link}} for more information.
|
<strong>Build {{build.number}} failed.</strong> See {{build.link}} for more information.
|
||||||
{{/success}}
|
{{/success}}
|
||||||
|
|
||||||
when:
|
when:
|
||||||
status: [success, failure]
|
status: [success, failure]
|
||||||
|
5
.gitignore
vendored
@ -3,6 +3,11 @@
|
|||||||
.gcc-flags.json
|
.gcc-flags.json
|
||||||
src/config.h
|
src/config.h
|
||||||
src/tools/*.gif
|
src/tools/*.gif
|
||||||
|
src/tools/*.pia
|
||||||
|
src/tools/*.pia.debug
|
||||||
include/config.h
|
include/config.h
|
||||||
.piolibdeps
|
.piolibdeps
|
||||||
.pioenvs
|
.pioenvs
|
||||||
|
.DS_Store
|
||||||
|
.vscode
|
||||||
|
src/tools/snakenet/data_set.*
|
||||||
|
50
README.md
@ -10,6 +10,35 @@ pitrix fetches the current time via NTP, is controllable via MQTT and
|
|||||||
can be flashed over-the-air, so you don't need to disassemble your
|
can be flashed over-the-air, so you don't need to disassemble your
|
||||||
nice-looking LED matrix everytime you want to update the software.
|
nice-looking LED matrix everytime you want to update the software.
|
||||||
|
|
||||||
|
### Effects
|
||||||
|
|
||||||
|
|
||||||
|
| Name | Description | Image |
|
||||||
|
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| bell | An example for a blinking sprite. Can be used for home automation, for example. | <img width="128" height="128" src="https://git.schle.nz/fabian/pitrix/raw/branch/master/docs/effects/bell.gif" /> |
|
||||||
|
| big_clock | A big clock. Seconds are moving around the edge. | <img width="128" height="128" src="https://git.schle.nz/fabian/pitrix/raw/branch/master/docs/effects/big_clock.gif" /> |
|
||||||
|
| big_dynamic | Big squares appearing in sequential colors. | <img width="128" height="128" src="https://git.schle.nz/fabian/pitrix/raw/branch/master/docs/effects/big_dynamic.gif" /> |
|
||||||
|
| clock | The small clock at the bottom. Usually used by other effects to integrate a clock. | <img width="128" height="128" src="https://git.schle.nz/fabian/pitrix/raw/branch/master/docs/effects/clock.gif" /> |
|
||||||
|
| cycle | Meta effect: Cycles through some of the other effects. | - |
|
||||||
|
| confetti | Random pixels lighting up in sequential colors and fading out again. | <img width="128" height="128" src="https://git.schle.nz/fabian/pitrix/raw/branch/master/docs/effects/confetti.gif" /> |
|
||||||
|
| dvd | The bouncing-around dvd logo we all know and love. High chance of hitting cordners because of the low resolution of the LED panel. | <img width="128" height="128" src="https://git.schle.nz/fabian/pitrix/raw/branch/master/docs/effects/dvd.gif" /> |
|
||||||
|
| fire | Fireplace-like effect. Needs more tweaking. | <img width="128" height="128" src="https://git.schle.nz/fabian/pitrix/raw/branch/master/docs/effects/fire.gif" /> |
|
||||||
|
| firework | Firework-like effect. Needs more work. | <img width="128" height="128" src="https://git.schle.nz/fabian/pitrix/raw/branch/master/docs/effects/firework.gif" /> |
|
||||||
|
| gol | Conway's Game of Life. | <img width="128" height="128" src="https://git.schle.nz/fabian/pitrix/raw/branch/master/docs/effects/gol.gif" /> |
|
||||||
|
| matrix | That green effect from The Matrix. | <img width="128" height="128" src="https://git.schle.nz/fabian/pitrix/raw/branch/master/docs/effects/matrix.gif" /> |
|
||||||
|
| multi_dynamic | Space is divided in 2x2 squares which are changing their color random-sequentially. | <img width="128" height="128" src="https://git.schle.nz/fabian/pitrix/raw/branch/master/docs/effects/multi_dynamic.gif" /> |
|
||||||
|
| pixel_clock | A clock using single pixels to display the current time. | <img width="128" height="128" src="https://git.schle.nz/fabian/pitrix/raw/branch/master/docs/effects/pixel_clock.gif" /> |
|
||||||
|
| rainbow_matrix | Like matrix, but not just green but displaying a rainbow across the columns. | <img width="128" height="128" src="https://git.schle.nz/fabian/pitrix/raw/branch/master/docs/effects/rainbow_matrix.gif" /> |
|
||||||
|
| random_matrix | Like matrix, but with random colors and random directions. | <img width="128" height="128" src="https://git.schle.nz/fabian/pitrix/raw/branch/master/docs/effects/random_matrix.gif" /> |
|
||||||
|
| sinematrix3 | Colorful pastel images, slowly moving about. | <img width="128" height="128" src="https://git.schle.nz/fabian/pitrix/raw/branch/master/docs/effects/sinematrix3.gif" /> |
|
||||||
|
| single_dynamic | 2x2 squares random-sequentially changing their color one after another. | <img width="128" height="128" src="https://git.schle.nz/fabian/pitrix/raw/branch/master/docs/effects/single_dynamic.gif" /> |
|
||||||
|
| snake | Snake. Without self-collision detection or AI. | <img width="128" height="128" src="https://git.schle.nz/fabian/pitrix/raw/branch/master/docs/effects/snake.gif" /> |
|
||||||
|
| twirl | A colorful twirl. | <img width="128" height="128" src="https://git.schle.nz/fabian/pitrix/raw/branch/master/docs/effects/twirl.gif" /> |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## How to use
|
## How to use
|
||||||
|
|
||||||
Checkout the code, rename `include/config.sample.h` to `include/config.h`
|
Checkout the code, rename `include/config.sample.h` to `include/config.h`
|
||||||
@ -55,3 +84,24 @@ seconds:
|
|||||||
If you enabled HTTP server, you can always make GET requests to `/free_heap`, `/uptime` or `/fps` to get those values.
|
If you enabled HTTP server, you can always make GET requests to `/free_heap`, `/uptime` or `/fps` to get those values.
|
||||||
|
|
||||||
If you enabled `DEBUG`, log messages will be sent to `MQTT_TOPIC/log`.
|
If you enabled `DEBUG`, log messages will be sent to `MQTT_TOPIC/log`.
|
||||||
|
|
||||||
|
## Aknowledgements
|
||||||
|
|
||||||
|
### Libraries
|
||||||
|
|
||||||
|
| Library | Author | Link |
|
||||||
|
| ------- | ------ | ---- |
|
||||||
|
| PubSubClient | knolleary | https://pubsubclient.knolleary.net/
|
||||||
|
| FastLED (with small modifications) | Daniel Garcia & Mark Kriegsman | https://fastled.io
|
||||||
|
| NTPClient (with modifications) | | https://github.com/arduino-libraries/NTPClient
|
||||||
|
| ESP8266WebServer | | https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WebServer
|
||||||
|
| ESPAsyncTCP | me-no-dev | https://github.com/me-no-dev/ESPAsyncTCP
|
||||||
|
|
||||||
|
### Inspirations and stuff
|
||||||
|
* This whole project was inspired by
|
||||||
|
https://github.com/orithena/Arduino-LED-experiments/tree/master/Ribba16x16_v2_ESP32.
|
||||||
|
The sinematrix3 effect was also taken from there.
|
||||||
|
* The firework effect was heavily inspired (aka copied) from
|
||||||
|
https://gist.github.com/kriegsman/68929cbd1d6de4535b20
|
||||||
|
* The sines effect is based upon
|
||||||
|
https://github.com/atuline/FastLED-Demos/blob/master/sinelon/sinelon.ino
|
||||||
|
BIN
data/bell.pia
Normal file
BIN
data/cake.pia
Normal file
BIN
data/child.pia
Normal file
BIN
data/koopa.pia
Normal file
BIN
docs/effects/analog_clock.gif
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
docs/effects/bell.gif
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
docs/effects/big_clock.gif
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
docs/effects/big_dynamic.gif
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
docs/effects/clock.gif
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
docs/effects/confetti.gif
Normal file
After Width: | Height: | Size: 122 KiB |
BIN
docs/effects/dvd.gif
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
docs/effects/fire.gif
Normal file
After Width: | Height: | Size: 57 KiB |
BIN
docs/effects/firework.gif
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
docs/effects/gol.gif
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
docs/effects/heart.gif
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
docs/effects/matrix.gif
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
docs/effects/multi_dynamic.gif
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
docs/effects/pixel_clock.gif
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
docs/effects/rainbow_matrix.gif
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
docs/effects/random_confetti.gif
Normal file
After Width: | Height: | Size: 152 KiB |
BIN
docs/effects/random_matrix.gif
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
docs/effects/sinematrix3.gif
Normal file
After Width: | Height: | Size: 86 KiB |
BIN
docs/effects/single_dynamic.gif
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
docs/effects/snake.gif
Normal file
After Width: | Height: | Size: 51 KiB |
BIN
docs/effects/twirl.gif
Normal file
After Width: | Height: | Size: 190 KiB |
@ -38,26 +38,35 @@ it contains only one entry and .individual_delays will be false.
|
|||||||
|
|
||||||
class Animation {
|
class Animation {
|
||||||
protected:
|
protected:
|
||||||
AnimationData* data;
|
|
||||||
unsigned long currentFrameSince;
|
unsigned long currentFrameSince;
|
||||||
uint8_t currentFrame = 0;
|
uint8_t currentFrame = 0;
|
||||||
uint8_t* animation_data;
|
uint8_t* animation_data;
|
||||||
CRGB* colors;
|
CRGB** _colors = NULL;
|
||||||
CRGB* fgColor = NULL;
|
CRGB* fgColor = NULL;
|
||||||
CRGB* bgColor = new CRGB(0x000000);
|
CRGB* bgColor = new CRGB(0x000000);
|
||||||
int8_t xOffset = 0;
|
int8_t xOffset = 0;
|
||||||
int8_t yOffset = 0;
|
int8_t yOffset = 0;
|
||||||
uint8_t startFrame = 0;
|
uint8_t _startFrame = 0;
|
||||||
uint8_t endFrame = 0;
|
uint8_t _endFrame = 0;
|
||||||
|
Window* _window;
|
||||||
|
uint8_t _width;
|
||||||
|
uint8_t _height;
|
||||||
|
uint8_t _frame_count = 0;
|
||||||
|
uint8_t _color_count = 0;
|
||||||
|
uint16_t* _frame_times = NULL;
|
||||||
|
uint16_t* _frame_data_lengths = NULL;
|
||||||
|
uint8_t** _frame_data = NULL;
|
||||||
|
bool _data_valid = false;
|
||||||
|
|
||||||
virtual CRGB* getColor(uint8_t color_index);
|
virtual CRGB* getColor(uint8_t color_index);
|
||||||
void drawFrame(Window* w, uint8_t frame_index);
|
|
||||||
void drawPixel(Window* w, int index, CRGB* color);
|
void drawPixel(int index, CRGB* color);
|
||||||
uint16_t getFrameDelay(int frame);
|
uint16_t getFrameDelay(int frame);
|
||||||
|
bool _load_from_file(const char* c);
|
||||||
public:
|
public:
|
||||||
Animation(AnimationData* d);
|
Animation(const char* filename, Window* win);
|
||||||
void setFgColor(CRGB*);
|
void setFgColor(uint32_t c);
|
||||||
void setBgColor(CRGB* bg_color);
|
void setBgColor(uint32_t c);
|
||||||
bool invert();
|
bool invert();
|
||||||
void setOffsets(int8_t x, int8_t y);
|
void setOffsets(int8_t x, int8_t y);
|
||||||
void setStartFrame(uint8_t sf);
|
void setStartFrame(uint8_t sf);
|
||||||
@ -65,7 +74,8 @@ public:
|
|||||||
void setFrameRange(uint8_t sf, uint8_t ef);
|
void setFrameRange(uint8_t sf, uint8_t ef);
|
||||||
void setSingleFrame(uint8_t frame);
|
void setSingleFrame(uint8_t frame);
|
||||||
virtual ~Animation();
|
virtual ~Animation();
|
||||||
void draw(Window* w);
|
void draw();
|
||||||
void drawFrame(Window* w);
|
void drawFrame();
|
||||||
|
void drawFrame(uint8_t frame_index);
|
||||||
virtual bool advance();
|
virtual bool advance();
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#ifndef Effect_H
|
#pragma once
|
||||||
#define Effect_H
|
|
||||||
|
|
||||||
#include "Window.h"
|
#include "Window.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@ -7,17 +6,17 @@
|
|||||||
|
|
||||||
class Effect {
|
class Effect {
|
||||||
protected:
|
protected:
|
||||||
Window* window = Window::getFullWindow(); // Use a full screen window per default.
|
Window* window = &Window::window_full; // Use a full screen window per default.
|
||||||
public:
|
public:
|
||||||
virtual void loop() = 0;
|
virtual ~Effect() {};
|
||||||
|
virtual void loop(uint16_t ms) = 0;
|
||||||
|
virtual String get_name() = 0;
|
||||||
boolean supports_window = false;
|
boolean supports_window = false;
|
||||||
virtual boolean can_be_shown_with_clock() { return false; };
|
virtual boolean can_be_shown_with_clock() { return false; };
|
||||||
virtual boolean clock_as_mask() { return false; };
|
virtual boolean clock_as_mask() { return false; };
|
||||||
void setWindow(Window* win) {
|
void setWindow(Window* win) {
|
||||||
window = win;
|
window = win;
|
||||||
};
|
};
|
||||||
virtual void start() {}
|
virtual void apply_option(String key, String value) {};
|
||||||
virtual void stop() {}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
#ifndef EffectEntry_H
|
|
||||||
#define EffectEntry_H
|
|
||||||
|
|
||||||
#include "Effect.h"
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
const char* name;
|
|
||||||
Effect* effect;
|
|
||||||
} EffectEntry;
|
|
||||||
|
|
||||||
#endif
|
|
32
include/SimpleEffect.h
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "Effect.h"
|
||||||
|
#include "prototypes.h"
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
|
#define SE_CYCLE_COLORS 1 // Slowly cycle through the rainbow.
|
||||||
|
#define SE_RANDOM_PIXEL_COLORS 2 // Every pixel gets a random color every frame.
|
||||||
|
#define SE_ONLY_POSITIVE 4 // Only use colors, not white. This is equivalent to running your output through abs()
|
||||||
|
#define SE_FADEOUT 8 // Fades the old image out. Returning 0 doesn't change the pixel's value.
|
||||||
|
#define SE_RANDOM_STATIC_COLOR 16 // Sets a random static color at start of the effect.
|
||||||
|
#define SE_DEBUG 32 // Prints debug messages.
|
||||||
|
|
||||||
|
class SimpleEffect : public Effect {
|
||||||
|
protected:
|
||||||
|
Window* window = &Window::window_full; // Use a full screen window per default.
|
||||||
|
uint8_t _color = 0;
|
||||||
|
uint16_t _flags;
|
||||||
|
String _name;
|
||||||
|
simple_effect_t _method;
|
||||||
|
public:
|
||||||
|
SimpleEffect(String name, uint16_t flags, simple_effect_t method): _name { name }, _method { method } {
|
||||||
|
_flags = flags;
|
||||||
|
if (_flags & SE_RANDOM_STATIC_COLOR) {
|
||||||
|
_color = random8();
|
||||||
|
_flags &= ~SE_CYCLE_COLORS & ~SE_RANDOM_PIXEL_COLORS;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
void loop(uint16_t ms) override;
|
||||||
|
String get_name() { return _name; };
|
||||||
|
boolean can_be_shown_with_clock() { return true; }
|
||||||
|
|
||||||
|
};
|
@ -3,13 +3,25 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "prototypes.h"
|
#include "prototypes.h"
|
||||||
|
|
||||||
|
enum SubpixelRenderingMode {
|
||||||
|
SUBPIXEL_RENDERING_SET,
|
||||||
|
SUBPIXEL_RENDERING_ADD,
|
||||||
|
SUBPIXEL_RENDERING_RAISE
|
||||||
|
};
|
||||||
|
|
||||||
class Window {
|
class Window {
|
||||||
|
private:
|
||||||
|
void _circle_point(int x0, int y0, int x1, int y1, CRGB* color);
|
||||||
|
void _subpixel_render(uint8_t x, uint8_t y, CRGB* color, SubpixelRenderingMode m);
|
||||||
public:
|
public:
|
||||||
|
static Window window_full;
|
||||||
|
static Window window_with_clock;
|
||||||
|
static Window window_clock;
|
||||||
|
|
||||||
const uint8_t x, y;
|
const uint8_t x, y;
|
||||||
const uint8_t width, height;
|
const uint8_t width, height;
|
||||||
uint16_t count;
|
uint16_t count;
|
||||||
static Window* getFullWindow();
|
|
||||||
|
|
||||||
Window(): Window(0, 0, LED_WIDTH, LED_HEIGHT) {};
|
Window(): Window(0, 0, LED_WIDTH, LED_HEIGHT) {};
|
||||||
Window(uint8_t x, uint8_t y) : Window(x, y, LED_WIDTH-x, LED_HEIGHT-y) {};
|
Window(uint8_t x, uint8_t y) : Window(x, y, LED_WIDTH-x, LED_HEIGHT-y) {};
|
||||||
Window(uint8_t x, uint8_t y, uint8_t width, uint8_t height) : x(x), y(y), width(width), height(height) { count = width*height; };
|
Window(uint8_t x, uint8_t y, uint8_t width, uint8_t height) : x(x), y(y), width(width), height(height) { count = width*height; };
|
||||||
@ -17,11 +29,29 @@ public:
|
|||||||
void clear();
|
void clear();
|
||||||
void clear(CRGB* color);
|
void clear(CRGB* color);
|
||||||
void setPixel(uint8_t x, uint8_t y, CRGB* color);
|
void setPixel(uint8_t x, uint8_t y, CRGB* color);
|
||||||
|
void setSubPixel(accum88 x, accum88 y, CRGB* color, SubpixelRenderingMode m = SUBPIXEL_RENDERING_ADD);
|
||||||
void setPixelByIndex(uint16_t index, CRGB* color);
|
void setPixelByIndex(uint16_t index, CRGB* color);
|
||||||
void line(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2, CRGB* color, bool antialias=false);
|
void raisePixel(uint8_t x, uint8_t y, CRGB* color);
|
||||||
|
void line(saccum78 x1, saccum78 y1, saccum78 x2, saccum78 y2, CRGB* color);
|
||||||
|
void lineWithAngle(uint8_t x, uint8_t y, uint16_t angle, uint8_t length, CRGB* color);
|
||||||
|
void lineWithAngle(uint8_t x, uint8_t y, uint16_t angle, uint8_t startdist, uint8_t length, CRGB* color);
|
||||||
|
void circle(uint8_t x, uint8_t y, uint8_t r, CRGB* color);
|
||||||
uint16_t coordsToGlobalIndex(uint8_t x, uint8_t y);
|
uint16_t coordsToGlobalIndex(uint8_t x, uint8_t y);
|
||||||
uint16_t localToGlobalIndex(uint16_t);
|
uint16_t localToGlobalIndex(uint16_t);
|
||||||
void drawChar(Font* f, uint8_t x, uint8_t y, const char c, CRGB* color, bool mask=false);
|
void drawChar(Font* f, accum88 x, accum88 y, const char c, CRGB* color, bool mask=false);
|
||||||
|
void drawText(Font* f, uint16_t x, uint16_t y, String s, CRGB* color);
|
||||||
|
void drawSubText(Font* f, accum88 x, accum88 y, String s, CRGB* color);
|
||||||
void addPixelColor(uint16_t index, CRGB* color);
|
void addPixelColor(uint16_t index, CRGB* color);
|
||||||
|
void addPixelColor(uint8_t x, uint8_t y, CRGB* color);
|
||||||
|
CRGB get_pixel(uint8_t x, uint8_t y);
|
||||||
void fadeToBlackBy(fract8 speed);
|
void fadeToBlackBy(fract8 speed);
|
||||||
|
void shift_down();
|
||||||
|
void shift_down_and_blur();
|
||||||
|
void clear_row(uint8_t y);
|
||||||
|
void blur(fract8 intensity);
|
||||||
|
void blur_rows(fract8 intensity);
|
||||||
|
void blur_row(uint8_t y, fract8 intensity);
|
||||||
|
void blur_columns(fract8 intensity);
|
||||||
|
void blur_column(uint8_t x, fract8 intensity);
|
||||||
|
void fill_with_checkerboard();
|
||||||
};
|
};
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
/**
|
|
||||||
Animations are structured in AnimationData as follows:
|
|
||||||
|
|
||||||
.colors contains .color_count*3 uint8_t values for R, G and B.
|
|
||||||
|
|
||||||
.offsets contains the frame start offsets within .data + the length of the data. (So
|
|
||||||
you can always do something like `for (int i=anim.offsets[i]; i<anim.offsets[i+1]; i++)`.
|
|
||||||
Accordingly it has a length of .frame_count+1.
|
|
||||||
|
|
||||||
.data contains all frames data with a run-length compression with escape char 255.
|
|
||||||
This data references the index of one or multiple pixels in .colors. It starts at the
|
|
||||||
top left pixel and walks each row to the right before starting the next row.
|
|
||||||
To decode it: Start at a frame (indicated by .offsets). Get one byte as x.
|
|
||||||
If x is <255: This is a single pixel of color x.
|
|
||||||
if x is 255: Run-length-encoding. The next byte indicates of often the byte after that
|
|
||||||
will be repeated. So, {255, 4, 10} is equal to {10, 10, 10, 10}.
|
|
||||||
A special case that may happen in larger GIFs is that there are more than 255 repetitions
|
|
||||||
of a color. Those will be split, so 355*color #10 will be: {255, 255, 10, 255, 100, 10},
|
|
||||||
e.g. 255*10 + 100*10. Usually this shouldn't need special handling within a decoder.
|
|
||||||
Regarding colors in .data:
|
|
||||||
Color 0 means "keep the color from the previous frame". This color should never appear on frame #0.
|
|
||||||
Color 1 means "show the background color".
|
|
||||||
All other color values point to a color in .colors - with an offset of 2.
|
|
||||||
So if in .data there's a color 3, paint this pixel in .colors[1].
|
|
||||||
|
|
||||||
.individual_delays contains either 1 or .frame_count delays. They are given in ms and
|
|
||||||
indicate how long the matching frame should be displayed. If all times are equal, then
|
|
||||||
it contains only one entry and .individual_delays will be false.
|
|
||||||
|
|
||||||
.w and .h contain the dimensions of the image.
|
|
||||||
**/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
#include <Arduino.h>
|
|
||||||
#include "prototypes.h"
|
|
||||||
|
|
||||||
extern AnimationData animation_koopa;
|
|
||||||
extern AnimationData animation_couple_rain;
|
|
||||||
extern AnimationData animation_couple_snow;
|
|
||||||
extern AnimationData animation_heart;
|
|
||||||
extern AnimationData animation_weather_icons;
|
|
||||||
extern AnimationData animation_cake;
|
|
@ -3,6 +3,7 @@
|
|||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#define FASTLED_INTERNAL
|
#define FASTLED_INTERNAL
|
||||||
#include <FastLED.h>
|
#include <FastLED.h>
|
||||||
|
#include "settings.h"
|
||||||
|
|
||||||
//#define DEBUG // Uncomment this to enable Debug messages via Serial and, if enabled, MQTT.
|
//#define DEBUG // Uncomment this to enable Debug messages via Serial and, if enabled, MQTT.
|
||||||
//#define CONFIG_USABLE // Uncomment this by removing the // at the beginning!
|
//#define CONFIG_USABLE // Uncomment this by removing the // at the beginning!
|
||||||
@ -35,6 +36,8 @@
|
|||||||
#define MQTT_TOPIC "pitrix/" // MQTT topic to listen to. Must not start with a slash, but must end with one.
|
#define MQTT_TOPIC "pitrix/" // MQTT topic to listen to. Must not start with a slash, but must end with one.
|
||||||
#define MQTT_REPORT_METRICS // Whether to report metrics via MQTT. Disable if unwanted.
|
#define MQTT_REPORT_METRICS // Whether to report metrics via MQTT. Disable if unwanted.
|
||||||
#define MQTT_TOPIC_WEATHER "accuweather/pitrix/" // MQTT topic to listen for weather data. Must not start with a slash, but must end with one.
|
#define MQTT_TOPIC_WEATHER "accuweather/pitrix/" // MQTT topic to listen for weather data. Must not start with a slash, but must end with one.
|
||||||
|
#define MQTT_TOPIC_TIMER "alexa/timer"
|
||||||
|
#define MQTT_TOPIC_HOMEASSISTANT "homeassistant"
|
||||||
|
|
||||||
#define HOSTNAME "pitrix-%08X" // Hostname of the ESP to use for OTA and MQTT client id. %08X will be replaced by the chip id.
|
#define HOSTNAME "pitrix-%08X" // Hostname of the ESP to use for OTA and MQTT client id. %08X will be replaced by the chip id.
|
||||||
#define OTA_STARTUP_DELAY 10 // How many seconds to wait at startup. This is useful to prevent being unable to flash OTA by a bug in the code. Set to 0 to disable.
|
#define OTA_STARTUP_DELAY 10 // How many seconds to wait at startup. This is useful to prevent being unable to flash OTA by a bug in the code. Set to 0 to disable.
|
||||||
@ -46,49 +49,66 @@
|
|||||||
#define MONITOR_LOOP_TIME_THRESHOLD 500
|
#define MONITOR_LOOP_TIME_THRESHOLD 500
|
||||||
#define MONITOR_LOOP_TIME_COUNT_MAX 10
|
#define MONITOR_LOOP_TIME_COUNT_MAX 10
|
||||||
|
|
||||||
#define EFFECT_CYCLE_TIME 300 // Time in seconds between cycling effects.
|
// settings.effects.cycle.time = 300; // Time in seconds between cycling effects.
|
||||||
#define EFFECT_CYCLE_RANDOM false
|
// settings.effects.cycle.random = true;
|
||||||
|
|
||||||
#define EFFECT_MATRIX_LENGTH_MIN 4
|
// settings.effects.matrix.length_min = 4;
|
||||||
#define EFFECT_MATRIX_LENGTH_MAX 20
|
// settings.effects.matrix.length_max = 20;
|
||||||
#define EFFECT_MATRIX_SPEED_MIN 50
|
// settings.effects.matrix.speed_min = 1;
|
||||||
#define EFFECT_MATRIX_SPEED_MAX 135
|
// settings.effects.matrix.speed_max = 10;
|
||||||
|
|
||||||
#define EFFECT_SINGLE_DYNAMIC_LOOP_TIME 40
|
// .dynamic.single_loop_time = 40;
|
||||||
#define EFFECT_MULTI_DYNAMIC_LOOP_TIME 1400
|
// .dynamic.multi_loop_time = 1400;
|
||||||
|
// .dynamic.big_loop_time = 50;
|
||||||
|
// .dynamic.big_size = 3;
|
||||||
|
|
||||||
#define EFFECT_CONFETTI_PIXELS_PER_LOOP 2
|
// .fire.cooldown = 192;
|
||||||
|
// .fire.spark_chance = 5;
|
||||||
|
|
||||||
#define EFFECT_SNAKE_DIRECTION_CHANGE 10
|
// .firework.drag = 255;
|
||||||
#define EFFECT_SNAKE_SLOWDOWN 2
|
// .firework.bounce = 200;
|
||||||
|
// .firework.gravity = 10;
|
||||||
|
// .firework.sparks = 12;
|
||||||
|
|
||||||
#define EFFECT_FIRE_COOLDOWN 192
|
// .gol.start_percentage = 90;
|
||||||
#define EFFECT_FIRE_SPARK_CHANCE 5
|
// .gol.blend_speed = 10;
|
||||||
|
// .gol.restart_after_steps = 100;
|
||||||
|
|
||||||
#define EFFECT_FIREWORK_SHOT_CHANCE 200
|
// .sines.count = 5;
|
||||||
#define EFFECT_FIREWORK_BLUR 200
|
|
||||||
#define EFFECT_FIREWORK_FADEOUT_SPEED 5
|
// .snake.direction_change = 5;
|
||||||
|
// .snake.slowdown = 2;
|
||||||
|
|
||||||
#define EFFECT_GOL_START_PERCENTAGE 90
|
|
||||||
#define EFFECT_GOL_BLEND_SPEED 10
|
|
||||||
#define EFFECT_GOL_RESTART_AFTER_STEPS 100
|
|
||||||
|
|
||||||
// Stop editing here
|
// Stop editing here
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
#ifdef MQTT_ENABLE
|
#ifdef MQTT_ENABLE
|
||||||
#include "my_mqtt.h"
|
#include "my_mqtt.h"
|
||||||
#define LOG(x) mqtt_log(x); Serial.print(x);
|
#define LOG(msg, ...) do { \
|
||||||
#define LOGln(x) mqtt_log_ln(x); Serial.println(x);
|
char buffer[128]; \
|
||||||
|
snprintf_P(buffer, 128, PSTR(msg), ##__VA_ARGS__);\
|
||||||
|
mqtt_log(buffer);\
|
||||||
|
Serial.print(buffer);\
|
||||||
|
} while (0);
|
||||||
|
#define LOGln(msg, ...) do {\
|
||||||
|
char buffer[128]; \
|
||||||
|
snprintf_P(buffer, 128, PSTR(msg), ##__VA_ARGS__);\
|
||||||
|
mqtt_log_ln(buffer);\
|
||||||
|
Serial.println(buffer);\
|
||||||
|
} while (0);
|
||||||
#else
|
#else
|
||||||
#define LOG(x) Serial.print(x);
|
#define LOG(x, ...) Serial.printf(x, ##__VA_ARGS__);
|
||||||
#define LOGln(x) Serial.println(x);
|
#define LOGln(x, ...) { Serial.printf(x, ##__VA_ARGS__); Serial.println(); }
|
||||||
#endif
|
#endif
|
||||||
|
#define DBG(msg, ...) { Serial.printf(msg, ##__VA_ARGS__); Serial.println(); }
|
||||||
#else
|
#else
|
||||||
#define LOG(x) do {} while(0);
|
#define LOG(x) do {} while(0);
|
||||||
#define LOGln(x) do {} while(0);
|
#define LOGln(x) do {} while(0);
|
||||||
|
#define DBG(msg, ...) do {} while(0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if !defined( ESP8266 ) && !defined( ESP32 )
|
#if !defined( ESP8266 ) && !defined( ESP32 )
|
||||||
#error "Neither ESP8266 nor ESP32 are set. Maybe you are compiling this for another platform...?"
|
#error "Neither ESP8266 nor ESP32 are set. Maybe you are compiling this for another platform...?"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "Effect.h"
|
|
||||||
#include "prototypes.h"
|
|
||||||
#include "my_fastled.h"
|
|
||||||
#include "Animation.h"
|
|
||||||
|
|
||||||
class AnimationEffect : public Effect {
|
|
||||||
private:
|
|
||||||
Animation *animation;
|
|
||||||
AnimationData *animation_data;
|
|
||||||
CRGB *bg_color;
|
|
||||||
uint16_t xOffset;
|
|
||||||
uint16_t yOffset;
|
|
||||||
public:
|
|
||||||
AnimationEffect(AnimationData* anim) : AnimationEffect(anim, new CRGB(0x000000), 0, 0) {}
|
|
||||||
AnimationEffect(AnimationData* anim, CRGB* background_color) : AnimationEffect(anim, background_color, 0, 0) {}
|
|
||||||
AnimationEffect(AnimationData* anim, CRGB* bg_color, int x, int y);
|
|
||||||
void start();
|
|
||||||
void stop();
|
|
||||||
void loop();
|
|
||||||
};
|
|
@ -1,24 +0,0 @@
|
|||||||
#ifndef effect_big_clock_H
|
|
||||||
#define effect_big_clock_H
|
|
||||||
|
|
||||||
#include "Effect.h"
|
|
||||||
|
|
||||||
class BigClockEffect : public Effect {
|
|
||||||
private:
|
|
||||||
CRGB color_h = CRGB(0xFF0000);
|
|
||||||
CRGB color_m = CRGB(0x00FF00);
|
|
||||||
CRGB color_colon = CRGB(0xFFFF00);
|
|
||||||
|
|
||||||
void drawNumber(uint8_t number, int x, int y, CRGB color);
|
|
||||||
|
|
||||||
void drawText(char *text, int x, int y, CRGB color);
|
|
||||||
|
|
||||||
const unsigned char* font_char(const unsigned char* font, char c);
|
|
||||||
|
|
||||||
void drawSprite(const unsigned char* sprite, int xOffset, int yOffset, CRGB color);
|
|
||||||
|
|
||||||
public:
|
|
||||||
void loop();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,15 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "Effect.h"
|
|
||||||
#include "prototypes.h"
|
|
||||||
#include "my_fastled.h"
|
|
||||||
#include "Window.h"
|
|
||||||
|
|
||||||
class ClockEffect : public Effect {
|
|
||||||
private:
|
|
||||||
Window* window = new Window(0, LED_HEIGHT - 6, LED_WIDTH, 6);
|
|
||||||
|
|
||||||
public:
|
|
||||||
void loop();
|
|
||||||
void loop(boolean invert, CRGB fg_color, CRGB bg_color);
|
|
||||||
};
|
|
@ -1,12 +0,0 @@
|
|||||||
#ifndef effect_confetti_H
|
|
||||||
#define effect_confetti_H
|
|
||||||
|
|
||||||
#include "Effect.h"
|
|
||||||
#include "my_fastled.h"
|
|
||||||
|
|
||||||
class ConfettiEffect : public Effect {
|
|
||||||
void loop();
|
|
||||||
boolean can_be_shown_with_clock();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,7 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "Effect.h"
|
|
||||||
|
|
||||||
class FireworkEffect : public Effect {
|
|
||||||
void loop();
|
|
||||||
};
|
|
@ -1,40 +0,0 @@
|
|||||||
#ifndef effect_matrix_H
|
|
||||||
#define effect_matrix_H
|
|
||||||
|
|
||||||
#include "prototypes.h"
|
|
||||||
#include "Effect.h"
|
|
||||||
#include "config.h"
|
|
||||||
#include "my_fastled.h"
|
|
||||||
#include "my_color_palettes.h"
|
|
||||||
|
|
||||||
class MatrixEffectColumn {
|
|
||||||
private:
|
|
||||||
int x, y;
|
|
||||||
int length;
|
|
||||||
Window* window;
|
|
||||||
uint16_t speed;
|
|
||||||
boolean running;
|
|
||||||
unsigned long last_move = 0;
|
|
||||||
public:
|
|
||||||
MatrixEffectColumn();
|
|
||||||
MatrixEffectColumn(Window* win, int xPos);
|
|
||||||
|
|
||||||
void start();
|
|
||||||
|
|
||||||
void advance();
|
|
||||||
|
|
||||||
void draw();
|
|
||||||
|
|
||||||
void loop();
|
|
||||||
};
|
|
||||||
|
|
||||||
class MatrixEffect : public Effect {
|
|
||||||
private:
|
|
||||||
MatrixEffectColumn columns[LED_WIDTH];
|
|
||||||
public:
|
|
||||||
boolean can_be_shown_with_clock();
|
|
||||||
MatrixEffect();
|
|
||||||
void loop();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,26 +0,0 @@
|
|||||||
#ifndef effect_snake_H
|
|
||||||
#define effect_snake_H
|
|
||||||
|
|
||||||
#include "Effect.h"
|
|
||||||
#include "prototypes.h"
|
|
||||||
|
|
||||||
class SnakeEffect : public Effect {
|
|
||||||
private:
|
|
||||||
Coords coords;
|
|
||||||
uint8_t direction = 1;
|
|
||||||
uint8_t hue = 0;
|
|
||||||
uint8_t run = 0;
|
|
||||||
bool is_turn_needed();
|
|
||||||
void turn_random();
|
|
||||||
bool turn_right();
|
|
||||||
bool turn_left();
|
|
||||||
bool is_direction_okay(uint8_t direction);
|
|
||||||
public:
|
|
||||||
SnakeEffect();
|
|
||||||
void loop();
|
|
||||||
boolean valid_position(Coords c);
|
|
||||||
Coords update_position(Coords c, uint8_t direction);
|
|
||||||
boolean can_be_shown_with_clock();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,16 +0,0 @@
|
|||||||
#ifndef effect_twirl_H
|
|
||||||
#define effect_twirl_H
|
|
||||||
|
|
||||||
#include "Effect.h"
|
|
||||||
#include <Arduino.h>
|
|
||||||
|
|
||||||
class TwirlEffect : public Effect {
|
|
||||||
private:
|
|
||||||
uint8_t angleOffset = 0;
|
|
||||||
double center_x = 8;
|
|
||||||
double center_y = 8;
|
|
||||||
public:
|
|
||||||
void loop();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,17 +1,28 @@
|
|||||||
#ifndef effects_H
|
#pragma once
|
||||||
#define effects_H
|
|
||||||
|
|
||||||
#include <SimpleList.h>
|
|
||||||
#include "EffectEntry.h"
|
|
||||||
#include "Effect.h"
|
#include "Effect.h"
|
||||||
#include "effect_clock.h"
|
#include "effects/clock.h"
|
||||||
|
#include "effects/timer.h"
|
||||||
|
|
||||||
extern SimpleList<EffectEntry>* effects;
|
#define SIMPLE_EFFECT(name, use_in_cycle, flags, ...) {name, use_in_cycle, [](){ return new SimpleEffect(name, flags, [](double t, uint16_t i, uint8_t x, uint8_t y)->double __VA_ARGS__ ); }}
|
||||||
extern SimpleList<Effect*>* cycle_effects;
|
|
||||||
|
struct EffectEntry {
|
||||||
|
const char* name;
|
||||||
|
bool use_in_cycle;
|
||||||
|
std::function<Effect*()> create;
|
||||||
|
#ifdef MQTT_REPORT_METRICS
|
||||||
|
int16_t heap_change_sum;
|
||||||
|
uint16_t run_count;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
extern EffectEntry effects[];
|
||||||
|
extern const uint8_t effects_size;
|
||||||
|
|
||||||
extern Effect* current_effect;
|
extern Effect* current_effect;
|
||||||
extern ClockEffect effect_clock;
|
extern ClockEffect effect_clock;
|
||||||
|
extern TimerEffect effect_timer;
|
||||||
|
|
||||||
|
Effect* select_effect(char* name);
|
||||||
|
Effect* select_effect(uint8_t id);
|
||||||
|
bool change_current_effect(String s);
|
||||||
void setup_effects();
|
void setup_effects();
|
||||||
|
|
||||||
#endif
|
|
||||||
|
9
include/effects/analogclock.h
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Effect.h"
|
||||||
|
|
||||||
|
class AnalogClockEffect : public Effect {
|
||||||
|
public:
|
||||||
|
void loop(uint16_t ms);
|
||||||
|
String get_name() override { return "analog_clock"; }
|
||||||
|
};
|
24
include/effects/animation.h
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Effect.h"
|
||||||
|
#include "prototypes.h"
|
||||||
|
#include "my_fastled.h"
|
||||||
|
#include "../Animation.h"
|
||||||
|
|
||||||
|
class AnimationEffect : public Effect {
|
||||||
|
private:
|
||||||
|
Animation *animation;
|
||||||
|
const char* name;
|
||||||
|
uint16_t xOffset;
|
||||||
|
uint16_t yOffset;
|
||||||
|
unsigned long _last_blink_at;
|
||||||
|
uint16_t _blink_freq;
|
||||||
|
public:
|
||||||
|
AnimationEffect(const char* name, uint32_t bg_color=0x000000, int x=0, int y=0);
|
||||||
|
static AnimationEffect* Blinker(const char* name, uint16_t interval, uint32_t color, uint32_t background_color=0x000000);
|
||||||
|
~AnimationEffect();
|
||||||
|
AnimationEffect* setFgColor(uint32_t c);
|
||||||
|
AnimationEffect* setBlinkFrequency(uint16_t);
|
||||||
|
void loop(uint16_t ms);
|
||||||
|
String get_name() override;
|
||||||
|
};
|
@ -1,5 +1,4 @@
|
|||||||
#ifndef effect_bell_H
|
#pragma once
|
||||||
#define effect_bell_H
|
|
||||||
|
|
||||||
#include "Effect.h"
|
#include "Effect.h"
|
||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
@ -10,7 +9,7 @@ private:
|
|||||||
CRGB color_off = CRGB(0x000000);
|
CRGB color_off = CRGB(0x000000);
|
||||||
boolean invert = false;
|
boolean invert = false;
|
||||||
public:
|
public:
|
||||||
void loop();
|
void loop(uint16_t ms);
|
||||||
|
String get_name() override { return "bell"; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
21
include/effects/big_clock.h
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Effect.h"
|
||||||
|
|
||||||
|
class BigClockEffect : public Effect {
|
||||||
|
protected:
|
||||||
|
CRGB _color_font = CRGB(0xAAAAAA);
|
||||||
|
CRGB _color_seconds_light = CRGB(0xFFFF00);
|
||||||
|
CRGB _color_seconds_dark = CRGB(0xAA0000);
|
||||||
|
CRGB _color_seconds_moving_light = CRGB(0x666600);
|
||||||
|
CRGB _color_seconds_moving_dark = CRGB(0x660000);
|
||||||
|
|
||||||
|
virtual CRGB _get_color_font() { return CRGB(0xAAAAAA); }
|
||||||
|
|
||||||
|
void _draw_seconds(uint8_t seconds);
|
||||||
|
virtual void _draw_border_pixel(accum88 pos, CRGB* color);
|
||||||
|
void _draw_colon(bool odd);
|
||||||
|
public:
|
||||||
|
virtual void loop(uint16_t ms);
|
||||||
|
String get_name() override { return "big_clock"; }
|
||||||
|
};
|
32
include/effects/blur2d.h
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "prototypes.h"
|
||||||
|
#include "functions.h"
|
||||||
|
#include "Effect.h"
|
||||||
|
|
||||||
|
class Blur2DBlob {
|
||||||
|
private:
|
||||||
|
accum88 _x_freq;
|
||||||
|
accum88 _y_freq;
|
||||||
|
uint8_t _color_freq;
|
||||||
|
public:
|
||||||
|
Blur2DBlob();
|
||||||
|
void render(Window* win);
|
||||||
|
};
|
||||||
|
|
||||||
|
class Blur2DEffect : public Effect {
|
||||||
|
private:
|
||||||
|
Window* window = &Window::window_with_clock;
|
||||||
|
uint8_t _count;
|
||||||
|
Blur2DBlob* _blobs;
|
||||||
|
public:
|
||||||
|
Blur2DEffect();
|
||||||
|
~Blur2DEffect();
|
||||||
|
void _init();
|
||||||
|
void _delete();
|
||||||
|
boolean supports_window = true;
|
||||||
|
boolean can_be_shown_with_clock();
|
||||||
|
void loop(uint16_t ms);
|
||||||
|
String get_name() override { return "blur2d"; }
|
||||||
|
};
|
||||||
|
|
18
include/effects/clock.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Effect.h"
|
||||||
|
#include "prototypes.h"
|
||||||
|
#include "my_fastled.h"
|
||||||
|
#include "Window.h"
|
||||||
|
|
||||||
|
class ClockEffect : public Effect {
|
||||||
|
protected:
|
||||||
|
Window* window = &Window::window_clock;
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual ~ClockEffect();
|
||||||
|
virtual void loop(uint16_t ms);
|
||||||
|
String get_name() override { return "clock"; }
|
||||||
|
void loop_with_invert(bool invert);
|
||||||
|
void loop(boolean invert, CRGB fg_color, CRGB bg_color, uint8_t y);
|
||||||
|
};
|
@ -1,23 +1,23 @@
|
|||||||
#ifndef effect_cycle_H
|
#pragma once
|
||||||
#define effect_cycle_H
|
|
||||||
|
|
||||||
#include "Effect.h"
|
#include "Effect.h"
|
||||||
#include "effects.h"
|
#include "effects.h"
|
||||||
|
|
||||||
class CycleEffect : public Effect {
|
class CycleEffect : public Effect {
|
||||||
private:
|
private:
|
||||||
Effect* effect;
|
Effect* effect = NULL;
|
||||||
uint16_t effect_id = -1;
|
uint16_t effect_id = -1;
|
||||||
unsigned long effectSince = 0;
|
unsigned long effectSince = 0;
|
||||||
|
uint16_t _heap_free = 0;
|
||||||
|
uint8_t _effects_count;
|
||||||
public:
|
public:
|
||||||
|
CycleEffect();
|
||||||
|
~CycleEffect();
|
||||||
void changeEffect();
|
void changeEffect();
|
||||||
void start();
|
|
||||||
void stop();
|
|
||||||
|
|
||||||
boolean can_be_shown_with_clock();
|
boolean can_be_shown_with_clock();
|
||||||
boolean clock_as_mask();
|
boolean clock_as_mask();
|
||||||
|
String get_name() override;
|
||||||
|
|
||||||
void loop();
|
void loop(uint16_t ms);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
11
include/effects/diamond.h
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "Effect.h"
|
||||||
|
|
||||||
|
class DiamondEffect : public Effect {
|
||||||
|
private:
|
||||||
|
Window* window = &Window::window_with_clock;
|
||||||
|
public:
|
||||||
|
void loop(uint16_t ms) override;
|
||||||
|
bool can_be_shown_with_clock() override;
|
||||||
|
String get_name() override { return "diamond"; }
|
||||||
|
};
|
18
include/effects/dvd.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "Effect.h"
|
||||||
|
|
||||||
|
class DvdEffect : public Effect {
|
||||||
|
private:
|
||||||
|
Window* window = &Window::window_with_clock;
|
||||||
|
saccum78 _x = 0;
|
||||||
|
saccum78 _y = 0;
|
||||||
|
int8_t _x_dir = 1;
|
||||||
|
int8_t _y_dir = 1;
|
||||||
|
CRGB _color;
|
||||||
|
public:
|
||||||
|
DvdEffect();
|
||||||
|
~DvdEffect();
|
||||||
|
void loop(uint16_t ms) override;
|
||||||
|
bool can_be_shown_with_clock() override;
|
||||||
|
String get_name() override { return "dvd"; }
|
||||||
|
};
|
@ -13,11 +13,23 @@ public:
|
|||||||
SingleDynamicEffect();
|
SingleDynamicEffect();
|
||||||
void init();
|
void init();
|
||||||
boolean can_be_shown_with_clock();
|
boolean can_be_shown_with_clock();
|
||||||
virtual void loop();
|
virtual void loop(uint16_t ms);
|
||||||
void draw();
|
void draw();
|
||||||
|
String get_name() override { return "single_dynamic"; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class MultiDynamicEffect : public SingleDynamicEffect {
|
class MultiDynamicEffect : public SingleDynamicEffect {
|
||||||
public:
|
public:
|
||||||
void loop();
|
void loop(uint16_t ms);
|
||||||
|
String get_name() override { return "multi_dynamic"; }
|
||||||
|
};
|
||||||
|
|
||||||
|
class BigDynamicEffect : public Effect {
|
||||||
|
private:
|
||||||
|
Window* window = &Window::window_with_clock;
|
||||||
|
public:
|
||||||
|
void loop(uint16_t ms);
|
||||||
|
~BigDynamicEffect();
|
||||||
|
boolean can_be_shown_with_clock() override;
|
||||||
|
String get_name() override { return "big_dynamic"; }
|
||||||
};
|
};
|
@ -13,7 +13,8 @@ private:
|
|||||||
static CRGBPalette16 palette;
|
static CRGBPalette16 palette;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void start();
|
FireEffect();
|
||||||
void stop();
|
~FireEffect();
|
||||||
void loop();
|
void loop(uint16_t ms);
|
||||||
|
String get_name() override { return "fire"; }
|
||||||
};
|
};
|
57
include/effects/firework.h
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "prototypes.h"
|
||||||
|
#include "functions.h"
|
||||||
|
#include "Effect.h"
|
||||||
|
|
||||||
|
enum FireworkDotType { FIREWORK_DOT_NONE, FIREWORK_DOT_SHELL, FIREWORK_DOT_SPARK };
|
||||||
|
|
||||||
|
class FireworkEffect;
|
||||||
|
|
||||||
|
class FireworkEffectDot {
|
||||||
|
private:
|
||||||
|
Window* _window;
|
||||||
|
FireworkEffect* _main;
|
||||||
|
accum88 _x;
|
||||||
|
accum88 _y;
|
||||||
|
saccum78 _xv;
|
||||||
|
saccum78 _yv;
|
||||||
|
accum88 _r;
|
||||||
|
CRGB _color;
|
||||||
|
|
||||||
|
void _screenscale(accum88 a, byte n, byte& screen, byte& screenerr);
|
||||||
|
int16_t _scale15by8_local(int16_t i, fract8 scale);
|
||||||
|
public:
|
||||||
|
byte show;
|
||||||
|
FireworkDotType type;
|
||||||
|
|
||||||
|
FireworkEffectDot(Window* w, FireworkEffect* e);
|
||||||
|
void draw();
|
||||||
|
void move();
|
||||||
|
void ground_launch();
|
||||||
|
void sky_burst(accum88 basex, accum88 basey, saccum78 basedv, CRGB& basecolor);
|
||||||
|
};
|
||||||
|
|
||||||
|
class FireworkEffect : public Effect {
|
||||||
|
private:
|
||||||
|
Window* window = &Window::window_with_clock;
|
||||||
|
bool _skyburst = 0;
|
||||||
|
|
||||||
|
accum88 _burst_x;
|
||||||
|
accum88 _burst_y;
|
||||||
|
saccum78 _burst_xv;
|
||||||
|
saccum78 _burst_yv;
|
||||||
|
CRGB _burst_color;
|
||||||
|
|
||||||
|
FireworkEffectDot* _dot;
|
||||||
|
FireworkEffectDot** _sparks;
|
||||||
|
public:
|
||||||
|
FireworkEffect();
|
||||||
|
~FireworkEffect();
|
||||||
|
void skyburst(accum88 x, accum88 y, saccum78 xv, saccum78 yv, CRGB c);
|
||||||
|
boolean supports_window = true;
|
||||||
|
boolean can_be_shown_with_clock();
|
||||||
|
void loop(uint16_t ms);
|
||||||
|
String get_name() override { return "firework"; }
|
||||||
|
};
|
||||||
|
|
@ -16,8 +16,8 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
GolEffect();
|
GolEffect();
|
||||||
void start();
|
~GolEffect();
|
||||||
void stop();
|
void loop(uint16_t ms);
|
||||||
void loop();
|
|
||||||
bool can_be_shown_with_clock();
|
bool can_be_shown_with_clock();
|
||||||
|
String get_name() override { return "gol"; }
|
||||||
};
|
};
|
32
include/effects/lightspeed.h
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Effect.h"
|
||||||
|
#include "my_fastled.h"
|
||||||
|
|
||||||
|
class LightspeedEffectStar {
|
||||||
|
private:
|
||||||
|
uint16_t _angle;
|
||||||
|
accum88 _distance;
|
||||||
|
uint16_t _speed;
|
||||||
|
uint16_t _target;
|
||||||
|
uint8_t _saturation;
|
||||||
|
void _init();
|
||||||
|
public:
|
||||||
|
LightspeedEffectStar();
|
||||||
|
void loop(Window* win);
|
||||||
|
};
|
||||||
|
|
||||||
|
class LightspeedEffect : public Effect {
|
||||||
|
private:
|
||||||
|
LightspeedEffectStar* _stars;
|
||||||
|
uint8_t _count;
|
||||||
|
void _init();
|
||||||
|
void _delete();
|
||||||
|
public:
|
||||||
|
LightspeedEffect();
|
||||||
|
~LightspeedEffect();
|
||||||
|
void loop(uint16_t ms);
|
||||||
|
boolean can_be_shown_with_clock();
|
||||||
|
String get_name() override { return "lightspeed"; }
|
||||||
|
};
|
||||||
|
|
19
include/effects/marquee.h
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "prototypes.h"
|
||||||
|
#include "functions.h"
|
||||||
|
#include "Effect.h"
|
||||||
|
|
||||||
|
class MarqueeEffect : public Effect {
|
||||||
|
private:
|
||||||
|
Window* window = &Window::window_with_clock;
|
||||||
|
String _text = String("No text set +++ ");
|
||||||
|
saccum78 _position = (window->width<<8);
|
||||||
|
public:
|
||||||
|
boolean supports_window = true;
|
||||||
|
boolean can_be_shown_with_clock();
|
||||||
|
void loop(uint16_t ms);
|
||||||
|
void apply_option(String key, String value) override;
|
||||||
|
String get_name() override { return "marquee"; }
|
||||||
|
};
|
||||||
|
|
105
include/effects/matrix.h
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "prototypes.h"
|
||||||
|
#include "Effect.h"
|
||||||
|
#include "config.h"
|
||||||
|
#include "my_fastled.h"
|
||||||
|
#include "my_color_palettes.h"
|
||||||
|
|
||||||
|
class MatrixEffectColumn {
|
||||||
|
protected:
|
||||||
|
Window* window;
|
||||||
|
saccum78 x, y;
|
||||||
|
uint8_t length = 1;
|
||||||
|
uint8_t _direction = 2;
|
||||||
|
bool _random_direction = false;
|
||||||
|
virtual CRGB _getColor(uint8_t height);
|
||||||
|
virtual void restart(bool completely_random);
|
||||||
|
private:
|
||||||
|
uint16_t speed;
|
||||||
|
boolean running;
|
||||||
|
unsigned long last_move = 0;
|
||||||
|
public:
|
||||||
|
static const uint8_t DIR_NORTH = 0;
|
||||||
|
static const uint8_t DIR_EAST = 1;
|
||||||
|
static const uint8_t DIR_SOUTH = 2;
|
||||||
|
static const uint8_t DIR_WEST = 3;
|
||||||
|
|
||||||
|
MatrixEffectColumn(Window* win, uint8_t direction=0, bool random_direction=false);
|
||||||
|
virtual ~MatrixEffectColumn() {};
|
||||||
|
void advance(uint16_t ms);
|
||||||
|
void draw();
|
||||||
|
void loop(uint16_t ms);
|
||||||
|
};
|
||||||
|
|
||||||
|
class RainbowMatrixEffectColumn : public MatrixEffectColumn {
|
||||||
|
protected:
|
||||||
|
CRGB _getColor(uint8_t height) override;
|
||||||
|
public:
|
||||||
|
RainbowMatrixEffectColumn(Window* win, uint8_t dir, bool rnd=false) : MatrixEffectColumn(win, dir, rnd) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
class RandomMatrixEffectColumn : public MatrixEffectColumn {
|
||||||
|
protected:
|
||||||
|
uint8_t _hue = 42;
|
||||||
|
CRGB _getColor(uint8_t height) override;
|
||||||
|
void restart(bool completely_random) override;
|
||||||
|
public:
|
||||||
|
RandomMatrixEffectColumn(Window* win, uint8_t dir, bool rnd=false) : MatrixEffectColumn(win, dir, rnd) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
class ColumnMatrixEffectColumn : public MatrixEffectColumn {
|
||||||
|
protected:
|
||||||
|
uint8_t _hue;
|
||||||
|
CRGB _getColor(uint8_t height) override;
|
||||||
|
void restart(bool completely_random) override;
|
||||||
|
public:
|
||||||
|
ColumnMatrixEffectColumn(Window* win, uint8_t dir, bool rnd=false) : MatrixEffectColumn(win, dir, rnd) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
class MatrixEffectBase : public Effect {
|
||||||
|
protected:
|
||||||
|
MatrixEffectColumn** _columns;
|
||||||
|
uint8_t _count;
|
||||||
|
virtual uint8_t _get_count();
|
||||||
|
virtual void _delete();
|
||||||
|
void _init();
|
||||||
|
virtual void _create() = 0;
|
||||||
|
public:
|
||||||
|
boolean can_be_shown_with_clock();
|
||||||
|
virtual ~MatrixEffectBase();
|
||||||
|
void loop(uint16_t ms);
|
||||||
|
};
|
||||||
|
|
||||||
|
class MatrixEffect : public MatrixEffectBase {
|
||||||
|
protected:
|
||||||
|
void _create() override;
|
||||||
|
public:
|
||||||
|
MatrixEffect();
|
||||||
|
String get_name() override { return "matrix"; }
|
||||||
|
};
|
||||||
|
|
||||||
|
class RainbowMatrixEffect : public MatrixEffectBase {
|
||||||
|
protected:
|
||||||
|
void _create() override;
|
||||||
|
public:
|
||||||
|
RainbowMatrixEffect();
|
||||||
|
String get_name() override { return "rainbow_matrix"; }
|
||||||
|
};
|
||||||
|
|
||||||
|
class RandomMatrixEffect : public MatrixEffectBase {
|
||||||
|
protected:
|
||||||
|
uint8_t _get_count() override;
|
||||||
|
void _create() override;
|
||||||
|
public:
|
||||||
|
RandomMatrixEffect();
|
||||||
|
String get_name() override { return "random_matrix"; }
|
||||||
|
};
|
||||||
|
|
||||||
|
class ColumnMatrixEffect : public MatrixEffectBase {
|
||||||
|
protected:
|
||||||
|
void _create() override;
|
||||||
|
public:
|
||||||
|
ColumnMatrixEffect();
|
||||||
|
String get_name() override { return "column_matrix"; }
|
||||||
|
};
|
8
include/effects/night_clock.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "Effect.h"
|
||||||
|
|
||||||
|
class NightClockEffect : public Effect {
|
||||||
|
public:
|
||||||
|
virtual void loop(uint16_t ms);
|
||||||
|
String get_name() override { return "night_clock"; }
|
||||||
|
};
|
16
include/effects/pixelclock.h
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Effect.h"
|
||||||
|
#include "my_fastled.h"
|
||||||
|
|
||||||
|
class PixelClockEffect : public Effect {
|
||||||
|
private:
|
||||||
|
CRGB* _color_seconds;
|
||||||
|
CRGB* _color_minutes;
|
||||||
|
public:
|
||||||
|
PixelClockEffect();
|
||||||
|
~PixelClockEffect();
|
||||||
|
void loop(uint16_t ms);
|
||||||
|
bool can_be_shown_with_clock();
|
||||||
|
String get_name() override { return "pixel_clock"; }
|
||||||
|
};
|
@ -1,10 +1,15 @@
|
|||||||
#ifndef effect_sinematrix3_H
|
#pragma once
|
||||||
#define effect_sinematrix3_H
|
|
||||||
|
|
||||||
#include "prototypes.h"
|
#include "prototypes.h"
|
||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
#include "Effect.h"
|
#include "Effect.h"
|
||||||
|
|
||||||
|
enum SinematrixColorScheme {
|
||||||
|
SINEMATRIX_COLOR_PASTEL_RAINBOW,
|
||||||
|
SINEMATRIX_COLOR_RAINBOW,
|
||||||
|
SINEMATRIX_COLOR_PURPLEFLY,
|
||||||
|
};
|
||||||
|
|
||||||
class Sinematrix3Effect : public Effect {
|
class Sinematrix3Effect : public Effect {
|
||||||
private:
|
private:
|
||||||
double pangle = 0;
|
double pangle = 0;
|
||||||
@ -26,12 +31,14 @@ private:
|
|||||||
double fx = 1.0 / (LED_WIDTH / PI);
|
double fx = 1.0 / (LED_WIDTH / PI);
|
||||||
double fy = 1.0 / (LED_HEIGHT / PI);
|
double fy = 1.0 / (LED_HEIGHT / PI);
|
||||||
Matrix rotate;
|
Matrix rotate;
|
||||||
|
SinematrixColorScheme _color_scheme;
|
||||||
|
CRGB _get_color(int value);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Sinematrix3Effect(SinematrixColorScheme s = SINEMATRIX_COLOR_PASTEL_RAINBOW): _color_scheme(s) {};
|
||||||
boolean supports_window = true;
|
boolean supports_window = true;
|
||||||
boolean can_be_shown_with_clock();
|
boolean can_be_shown_with_clock();
|
||||||
boolean clock_as_mask();
|
boolean clock_as_mask();
|
||||||
void loop();
|
void loop(uint16_t ms);
|
||||||
|
String get_name() override { return "sinematrix3"; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
34
include/effects/sines.h
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "prototypes.h"
|
||||||
|
#include "functions.h"
|
||||||
|
#include "Effect.h"
|
||||||
|
|
||||||
|
class SinesEffectSinus {
|
||||||
|
private:
|
||||||
|
uint16_t _frequency;
|
||||||
|
uint16_t _color_frequency;
|
||||||
|
uint16_t _amplitude;
|
||||||
|
uint16_t _x;
|
||||||
|
uint16_t _offset;
|
||||||
|
Window* _window;
|
||||||
|
public:
|
||||||
|
SinesEffectSinus(Window* w);
|
||||||
|
void loop(uint16_t ms);
|
||||||
|
};
|
||||||
|
|
||||||
|
class SinesEffect : public Effect {
|
||||||
|
private:
|
||||||
|
SinesEffectSinus** _sinus;
|
||||||
|
uint8_t _count;
|
||||||
|
void _init();
|
||||||
|
void _delete();
|
||||||
|
public:
|
||||||
|
SinesEffect();
|
||||||
|
~SinesEffect();
|
||||||
|
boolean supports_window = true;
|
||||||
|
boolean can_be_shown_with_clock();
|
||||||
|
void loop(uint16_t ms);
|
||||||
|
String get_name() override { return "sines"; }
|
||||||
|
};
|
||||||
|
|
68
include/effects/snake.h
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Effect.h"
|
||||||
|
#include "prototypes.h"
|
||||||
|
|
||||||
|
#define SNAKE_DIR_NORTH 0
|
||||||
|
#define SNAKE_DIR_EAST 1
|
||||||
|
#define SNAKE_DIR_SOUTH 2
|
||||||
|
#define SNAKE_DIR_WEST 3
|
||||||
|
|
||||||
|
#define SNAKE_DEBUG false
|
||||||
|
|
||||||
|
class SnakeEffect : public Effect {
|
||||||
|
private:
|
||||||
|
Coords _pos;
|
||||||
|
Coords _apple;
|
||||||
|
Coords _tail;
|
||||||
|
int8_t _dir = SNAKE_DIR_NORTH;
|
||||||
|
uint8_t* _map;
|
||||||
|
uint16_t _pixels;
|
||||||
|
uint8_t _length;
|
||||||
|
unsigned long _last_apple_at;
|
||||||
|
unsigned long _last_move_at;
|
||||||
|
uint16_t _round;
|
||||||
|
|
||||||
|
// Neural net config
|
||||||
|
// These are actually float values. But in order to prevent rounding errors and stuff, they are provided
|
||||||
|
// in form of the raw binary data of the IEE754 floating point numbers.
|
||||||
|
// In _decide() there's code to memcpy()-convert them to a float.
|
||||||
|
// Round 340, 223.4 points, length 39, 36% stopped, 64% died
|
||||||
|
// const uint32_t _weights[36] = {0xbd8e626e, 0xbee2cd2c, 0x3e4d5cab, 0x3eceb8c3, 0xbed0a514, 0x3ec62438, 0x3e947ed4, 0xbe4b8bf2, 0xbf301113, 0xbf3f0a75, 0x3f1868f7, 0xbf0253ca, 0xbedca2f2, 0xbd547c6d, 0x3edd6a8a, 0xbd4b97b6, 0x3f64ec26, 0xbe5323c1, 0x3eccf87d, 0xbf2d4796, 0xbf62b6e8, 0xbf71daf6, 0xbf03f08e, 0xbf222609, 0x3e26c03c, 0xbf497837, 0xbee4d175, 0x3ec601de, 0x3e4e0695, 0x3eef2619, 0xbe849370, 0xbf18fb2b, 0x3f25bbd1, 0xbf3dcd78, 0x3f37a58d, 0x3ef4a25b};
|
||||||
|
// Round 630, 221.0 points, length 38, 36% stopped, 64% died
|
||||||
|
const uint32_t _weights[36] = {0xbd25943f, 0xbf279d81, 0x3e25d128, 0x3ec62438, 0x3f0e719c, 0x3eefbea9, 0x3e947ed4, 0xbe5323c1, 0xbf2d4796, 0xbf3f0a75, 0x3f0e45d9, 0xbf0253ca, 0xbedca2f2, 0xbd79073c, 0x3ede80ec, 0xbd4b97b6, 0x3f69a6be, 0xbe4b8bf2, 0x3eccf87d, 0xbf301113, 0xbf62b6e8, 0xbf71daf6, 0xbf204130, 0xbf222609, 0x3e26c03c, 0xbf497837, 0xbee4d175, 0x3ec601de, 0x3e4954eb, 0x3eef2619, 0xbe849370, 0xbf18fb2b, 0x3f25bbd1, 0xbf3b4e44, 0x3f484d59, 0x3edd6a8a};
|
||||||
|
// Round 193, 164.8 points, length 36, 6% stopped, 94% died
|
||||||
|
//const uint32_t _weights[36] = {0x3e872ffb, 0xbea57262, 0xbee269bf, 0x3ed790a3, 0xbf54014f, 0x3ecde0a6, 0xbf240a93, 0xbe9e4782, 0x3f205106, 0xbf4465c2, 0xbf79579a, 0xbf07f122, 0x3ed0e1bc, 0xbf7a5a09, 0xbf0fc70b, 0xbf6d1971, 0xbe0f5585, 0xbec94b12, 0x3f51f7a9, 0x3eaac42b, 0xbe6aafa6, 0x3d3e3ce3, 0xbf7c4232, 0xbe634103, 0x3f800000, 0x3eff886c, 0x3deae1e8, 0x3eea6988, 0xbf800000, 0xbf426a20, 0x3e3a0a45, 0xbe848803, 0x3e84e8c9, 0x3ef9fabc, 0xbe7733e6, 0xbecda633};
|
||||||
|
// Round 13650, 244.8 points, length 42, 34% stopped, 66% died
|
||||||
|
//const uint32_t _weights[36] = {0xbeb99de3, 0x3e6ca488, 0xbe3e9dad, 0xbed38d4e, 0x3f279fc1, 0xbd367111, 0xbf473843, 0xbf800000, 0x3f614edc, 0xbecc734f, 0xbe59b29d, 0x3d479078, 0x3efa7ca6, 0xbedc6ce6, 0x3f4626a1, 0x3e9d8c2c, 0x3f29e25c, 0x3ebde05d, 0x3e8f3e29, 0xbe8ad92c, 0xbe148f2d, 0x3d4a3ca7, 0xbf800000, 0x3d9cd634, 0x3f29802e, 0xbf2cc57e, 0xbcbfafff, 0x3e280b8a, 0x3f5ff9a3, 0xbf4e29c9, 0x3e8936d2, 0xbf49dda9, 0xbe9bf4c7, 0x3e203ea8, 0xbd4edf4d, 0xbf4e3c05};
|
||||||
|
|
||||||
|
const uint8_t _net_layout[3] = {6, 4, 3};
|
||||||
|
const uint8_t _net_layers = 3;
|
||||||
|
const uint8_t _net_total_size = 36;
|
||||||
|
|
||||||
|
uint8_t _head_rounds = 0;
|
||||||
|
uint8_t _tail_rounds = 0;
|
||||||
|
|
||||||
|
|
||||||
|
uint16_t _xy2i(uint8_t x, uint8_t y);
|
||||||
|
uint16_t _xy2i(Coords c);
|
||||||
|
Coords _i2xy(uint16_t i);
|
||||||
|
Coords _new_pos(uint8_t dir);
|
||||||
|
uint8_t _dying = 0;
|
||||||
|
bool _is_free(uint8_t dir);
|
||||||
|
uint8_t _free_spaces(uint8_t dir);
|
||||||
|
uint8_t _to_apple(uint8_t dir);
|
||||||
|
void _place_apple();
|
||||||
|
void _init();
|
||||||
|
void _decide();
|
||||||
|
uint8_t _coords_to_field_id(Coords);
|
||||||
|
int8_t _manual_decision();
|
||||||
|
void _move();
|
||||||
|
void _draw();
|
||||||
|
public:
|
||||||
|
SnakeEffect();
|
||||||
|
~SnakeEffect();
|
||||||
|
void loop(uint16_t ms);
|
||||||
|
boolean can_be_shown_with_clock();
|
||||||
|
String get_name() override { return "snake"; }
|
||||||
|
};
|
@ -1,5 +1,4 @@
|
|||||||
#ifndef effect_static_H
|
#pragma once
|
||||||
#define effect_static_H
|
|
||||||
|
|
||||||
#include "Effect.h"
|
#include "Effect.h"
|
||||||
#include "my_fastled.h"
|
#include "my_fastled.h"
|
||||||
@ -10,7 +9,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
StaticEffect(CRGB col);
|
StaticEffect(CRGB col);
|
||||||
boolean supports_window = true;
|
boolean supports_window = true;
|
||||||
void loop();
|
void loop(uint16_t ms);
|
||||||
|
String get_name() override { return "static"; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
16
include/effects/timer.h
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Effect.h"
|
||||||
|
#include "prototypes.h"
|
||||||
|
#include "my_fastled.h"
|
||||||
|
#include "Window.h"
|
||||||
|
|
||||||
|
class TimerEffect : public Effect {
|
||||||
|
protected:
|
||||||
|
Window* window = new Window(0, 0, LED_WIDTH, 6);
|
||||||
|
|
||||||
|
public:
|
||||||
|
~TimerEffect();
|
||||||
|
void loop(uint16_t ms);
|
||||||
|
String get_name() override { return "timer"; }
|
||||||
|
};
|
30
include/effects/tpm2_net.h
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Effect.h"
|
||||||
|
#include "prototypes.h"
|
||||||
|
#include "my_fastled.h"
|
||||||
|
#include "Window.h"
|
||||||
|
#include "config.h"
|
||||||
|
#include <WiFiUdp.h>
|
||||||
|
|
||||||
|
class Tpm2NetEffect : public Effect {
|
||||||
|
protected:
|
||||||
|
Window* window = &Window::window_full;
|
||||||
|
WiFiUDP _udp;
|
||||||
|
uint16_t _pixel_index = 0;
|
||||||
|
|
||||||
|
void _parse_command(uint16_t size, uint8_t packet_number);
|
||||||
|
void _parse_data(uint16_t size, uint8_t packet_number);
|
||||||
|
void _respond(uint8_t* data, uint8_t len);
|
||||||
|
void _respond_ack();
|
||||||
|
void _respond_with_data(uint8_t* data, uint8_t len);
|
||||||
|
void _respond_unknown_command();
|
||||||
|
unsigned long _last_packet_at = 0;
|
||||||
|
|
||||||
|
public:
|
||||||
|
Tpm2NetEffect();
|
||||||
|
virtual ~Tpm2NetEffect();
|
||||||
|
virtual void loop(uint16_t ms);
|
||||||
|
bool can_be_shown_with_clock();
|
||||||
|
String get_name() override { return "tpm2.net"; }
|
||||||
|
};
|
12
include/effects/tv_static.h
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "Effect.h"
|
||||||
|
|
||||||
|
class TvStaticEffect : public Effect {
|
||||||
|
private:
|
||||||
|
Window* _window = &Window::window_with_clock;
|
||||||
|
public:
|
||||||
|
~TvStaticEffect();
|
||||||
|
void loop(uint16_t ms) override;
|
||||||
|
bool can_be_shown_with_clock() override;
|
||||||
|
String get_name() override { return "tv_static"; }
|
||||||
|
};
|
18
include/effects/twirl.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Effect.h"
|
||||||
|
#include <Arduino.h>
|
||||||
|
|
||||||
|
class TwirlEffect : public Effect {
|
||||||
|
private:
|
||||||
|
uint8_t angleOffset = 0;
|
||||||
|
uint8_t _center_offset_angle = 0;
|
||||||
|
double _real_center_x = LED_WIDTH / 2;
|
||||||
|
double _real_center_y = LED_HEIGHT / 2;
|
||||||
|
public:
|
||||||
|
void loop(uint16_t ms);
|
||||||
|
boolean can_be_shown_with_clock() override;
|
||||||
|
boolean clock_as_mask() override;
|
||||||
|
String get_name() override { return "twirl"; }
|
||||||
|
};
|
||||||
|
|
@ -2,4 +2,7 @@
|
|||||||
#include "prototypes.h"
|
#include "prototypes.h"
|
||||||
|
|
||||||
extern Font font_numbers3x5;
|
extern Font font_numbers3x5;
|
||||||
|
extern Font font_numbers3x3;
|
||||||
|
extern Font font_numbers3x5_blocky;
|
||||||
extern Font font_numbers4x7;
|
extern Font font_numbers4x7;
|
||||||
|
extern Font font5x7;
|
||||||
|
@ -4,13 +4,14 @@
|
|||||||
#ifdef HTTP_SERVER_ENABLE
|
#ifdef HTTP_SERVER_ENABLE
|
||||||
|
|
||||||
#include "my_wifi.h"
|
#include "my_wifi.h"
|
||||||
|
#include <FS.h>
|
||||||
|
#include <ESPAsyncWebServer.h>
|
||||||
|
|
||||||
#if defined ( ESP8266 )
|
extern AsyncWebServer http_server;
|
||||||
extern ESP8266WebServer http_server;
|
|
||||||
#elif defined ( ESP32 )
|
extern File upload_file;
|
||||||
extern ESP32WebServer http_server;
|
extern uint32_t monitor_client;
|
||||||
#endif
|
|
||||||
|
|
||||||
void http_server_setup();
|
void http_server_setup();
|
||||||
void http_server_loop();
|
void http_server_send_framedata();
|
||||||
#endif
|
#endif
|
||||||
|
@ -6,3 +6,4 @@
|
|||||||
|
|
||||||
extern const TProgmemRGBGradientPalette_byte palette_fire[] FL_PROGMEM;
|
extern const TProgmemRGBGradientPalette_byte palette_fire[] FL_PROGMEM;
|
||||||
extern const TProgmemRGBGradientPalette_byte palette_matrix[] FL_PROGMEM;
|
extern const TProgmemRGBGradientPalette_byte palette_matrix[] FL_PROGMEM;
|
||||||
|
extern const TProgmemRGBGradientPalette_byte palette_purplefly_gp[] FL_PROGMEM;
|
||||||
|
@ -17,18 +17,21 @@ void mqtt_setup();
|
|||||||
|
|
||||||
void mqtt_loop();
|
void mqtt_loop();
|
||||||
|
|
||||||
void mqtt_publish(const char* topic, int number);
|
void mqtt_publish(const char* topic, int number, bool retain=false);
|
||||||
|
void mqtt_publish(const char* topic, const char* message, bool retain=false);
|
||||||
|
|
||||||
void mqtt_log(const char* message);
|
void mqtt_log(const char* message);
|
||||||
void mqtt_log(int number);
|
void mqtt_log(int number);
|
||||||
void mqtt_log(long unsigned int number);
|
void mqtt_log(long unsigned int number);
|
||||||
void mqtt_log(long int number);
|
void mqtt_log(long int number);
|
||||||
|
void mqtt_log(size_t number);
|
||||||
void mqtt_log(String str);
|
void mqtt_log(String str);
|
||||||
|
|
||||||
void mqtt_log_ln(const char* message);
|
void mqtt_log_ln(const char* message);
|
||||||
void mqtt_log_ln(int number);
|
void mqtt_log_ln(int number);
|
||||||
void mqtt_log_ln(long unsigned int number);
|
void mqtt_log_ln(long unsigned int number);
|
||||||
void mqtt_log_ln(long int number);
|
void mqtt_log_ln(long int number);
|
||||||
|
void mqtt_log_ln(size_t number);
|
||||||
void mqtt_log_ln(String str);
|
void mqtt_log_ln(String str);
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,13 +5,11 @@
|
|||||||
#if defined( ESP8266 )
|
#if defined( ESP8266 )
|
||||||
#include <ESP8266WiFi.h>
|
#include <ESP8266WiFi.h>
|
||||||
#include <ESP8266mDNS.h>
|
#include <ESP8266mDNS.h>
|
||||||
#include <ESP8266WebServer.h>
|
|
||||||
#elif defined( ESP32 )
|
#elif defined( ESP32 )
|
||||||
#include <WiFi.h>
|
#include <WiFi.h>
|
||||||
#include <ESPmDNS.h>
|
#include <ESPmDNS.h>
|
||||||
#include <WiFiClient.h>
|
#include <WiFiClient.h>
|
||||||
#include <WiFiServer.h>
|
#include <WiFiServer.h>
|
||||||
#include <ESP32WebServer.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <WiFiUdp.h>
|
#include <WiFiUdp.h>
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <NTPClient.h>
|
|
||||||
#include "my_wifi.h"
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
void time_changed();
|
||||||
extern NTPClient ntpClient;
|
|
||||||
void updateCallback(NTPClient* c);
|
|
||||||
void ntp_setup();
|
void ntp_setup();
|
||||||
|
@ -1,18 +1,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
#include "my_fastled.h"
|
||||||
|
|
||||||
typedef struct {
|
extern uint8_t baseHue;
|
||||||
uint8_t *colors;
|
extern char hostname[30];
|
||||||
uint8_t *data;
|
extern uint16_t frame;
|
||||||
uint16_t *offsets;
|
extern unsigned long timer;
|
||||||
uint16_t *delays;
|
|
||||||
boolean individual_delays;
|
|
||||||
int color_count;
|
|
||||||
int frame_count;
|
|
||||||
int w;
|
|
||||||
int h;
|
|
||||||
} AnimationData;
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint8_t width;
|
uint8_t width;
|
||||||
@ -39,5 +33,4 @@ typedef struct {
|
|||||||
uint16_t y;
|
uint16_t y;
|
||||||
} Coords;
|
} Coords;
|
||||||
|
|
||||||
extern uint8_t baseHue;
|
typedef std::function<double(double, uint16_t, uint8_t, uint8_t)> simple_effect_t;
|
||||||
extern char hostname[30];
|
|
104
include/settings.h
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <Arduino.h>
|
||||||
|
|
||||||
|
enum SettingType {
|
||||||
|
TYPE_UINT8,
|
||||||
|
TYPE_UINT16,
|
||||||
|
TYPE_BOOL
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
const char* name;
|
||||||
|
uint16_t* value;
|
||||||
|
SettingType type;
|
||||||
|
} Setting;
|
||||||
|
|
||||||
|
struct Settings {
|
||||||
|
uint16_t fps = 50;
|
||||||
|
|
||||||
|
struct /* effects */ {
|
||||||
|
struct /* cycle */ {
|
||||||
|
uint16_t time = 300;
|
||||||
|
uint16_t random = 1;
|
||||||
|
} cycle ;
|
||||||
|
|
||||||
|
struct /* matrix */ {
|
||||||
|
uint16_t length_min = 4;
|
||||||
|
uint16_t length_max = 20;
|
||||||
|
uint16_t speed_min = 3;
|
||||||
|
uint16_t speed_max = 7;
|
||||||
|
uint16_t count = 16;
|
||||||
|
uint16_t random_count = 32;
|
||||||
|
} matrix;
|
||||||
|
|
||||||
|
struct /* big_clock */ {
|
||||||
|
uint16_t spacing = 5;
|
||||||
|
} big_clock;
|
||||||
|
|
||||||
|
struct /* blur2d */ {
|
||||||
|
uint16_t count = 5;
|
||||||
|
} blur2d;
|
||||||
|
|
||||||
|
struct /* confetti */ {
|
||||||
|
uint16_t pixels_per_loop = 2;
|
||||||
|
} confetti;
|
||||||
|
|
||||||
|
struct /* dvd */ {
|
||||||
|
uint16_t width = 3;
|
||||||
|
uint16_t height = 2;
|
||||||
|
uint16_t speed = 50;
|
||||||
|
} dvd;
|
||||||
|
|
||||||
|
struct /* dynamic */ {
|
||||||
|
uint16_t single_loop_time = 40;
|
||||||
|
uint16_t multi_loop_time = 1400;
|
||||||
|
uint16_t big_loop_time = 50;
|
||||||
|
uint16_t big_size = 3;
|
||||||
|
} dynamic;
|
||||||
|
|
||||||
|
struct /* fire */ {
|
||||||
|
uint16_t cooldown = 192;
|
||||||
|
uint16_t spark_chance = 5;
|
||||||
|
} fire;
|
||||||
|
|
||||||
|
struct /* firework */ {
|
||||||
|
uint16_t drag = 255;
|
||||||
|
uint16_t bounce = 200;
|
||||||
|
uint16_t gravity = 10;
|
||||||
|
uint16_t sparks = 12;
|
||||||
|
} firework;
|
||||||
|
|
||||||
|
struct /* gol */ {
|
||||||
|
uint16_t start_percentage = 90;
|
||||||
|
uint16_t blend_speed = 10;
|
||||||
|
uint16_t restart_after_steps = 100;
|
||||||
|
} gol;
|
||||||
|
|
||||||
|
struct /* lightspeed */ {
|
||||||
|
uint16_t count = 25;
|
||||||
|
} lightspeed;
|
||||||
|
|
||||||
|
struct /* sines */ {
|
||||||
|
uint16_t count = 5;
|
||||||
|
} sines;
|
||||||
|
|
||||||
|
struct /* snake */ {
|
||||||
|
uint16_t direction_change = 5;
|
||||||
|
uint16_t slowdown = 2;
|
||||||
|
} snake;
|
||||||
|
|
||||||
|
struct /* tv_static */ {
|
||||||
|
uint16_t black_bar_speed = 12;
|
||||||
|
} tv_static;
|
||||||
|
} effects;
|
||||||
|
};
|
||||||
|
|
||||||
|
extern Settings settings;
|
||||||
|
extern Setting all_settings[];
|
||||||
|
extern const uint8_t all_settings_size;
|
||||||
|
|
||||||
|
bool change_setting(const char* key, uint16_t new_value);
|
||||||
|
uint16_t setting_default(Setting* s);
|
||||||
|
bool save_settings();
|
||||||
|
bool load_settings();
|
6
include/tests.h
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace tests {
|
||||||
|
void run();
|
||||||
|
void test_effects_for_memory_leaks();
|
||||||
|
}
|
@ -10,41 +10,31 @@
|
|||||||
|
|
||||||
[platformio]
|
[platformio]
|
||||||
lib_dir = lib
|
lib_dir = lib
|
||||||
env_default = ota
|
default_envs = ota
|
||||||
lib_ldf_mode = chain+
|
|
||||||
|
|
||||||
|
|
||||||
[extra]
|
[extra]
|
||||||
lib_deps =
|
lib_deps =
|
||||||
PubSubClient
|
PubSubClient
|
||||||
https://github.com/fabianonline/FastLED.git
|
https://github.com/fabianonline/FastLED.git
|
||||||
https://github.com/fabianonline/simplelist.git
|
https://github.com/me-no-dev/ESPAsyncWebServer.git
|
||||||
https://github.com/fabianonline/NTPClient.git
|
|
||||||
ESP8266WebServer
|
|
||||||
|
|
||||||
[env:ota]
|
[env:ota]
|
||||||
upload_port = 10.10.2.78
|
upload_port = 10.10.2.78 ; .78=prod, .80=dev
|
||||||
upload_protocol = espota
|
upload_protocol = espota
|
||||||
platform = espressif8266
|
platform = espressif8266
|
||||||
board = esp07
|
board = esp07
|
||||||
framework = arduino
|
framework = arduino
|
||||||
lib_deps = ${extra.lib_deps}
|
lib_deps = ${extra.lib_deps}
|
||||||
lib_ldf_mode = chain+
|
lib_ldf_mode = deep
|
||||||
|
build_flags = -Wl,-Teagle.flash.2m512.ld
|
||||||
|
|
||||||
[env:local]
|
[env:local]
|
||||||
upload_port = /dev/cu.wchusbserial1420
|
upload_port = /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
|
||||||
platform = espressif8266
|
platform = espressif8266
|
||||||
board = esp07
|
board = esp07
|
||||||
framework = arduino
|
framework = arduino
|
||||||
lib_deps = ${extra.lib_deps}
|
lib_deps = ${extra.lib_deps}
|
||||||
lib_ldf_mode = chain+
|
lib_ldf_mode = deep
|
||||||
|
build_flags = -Wl,-Teagle.flash.2m512.ld
|
||||||
[env:esp32]
|
monitor_filters = time, esp8266_exception_decoder
|
||||||
platform = espressif32
|
build_type = debug
|
||||||
board = esp32dev
|
|
||||||
framework = arduino
|
|
||||||
lib_deps =
|
|
||||||
${extra.lib_deps}
|
|
||||||
ESP32WebServer
|
|
||||||
FS
|
|
||||||
lib_ldf_mode = chain+
|
|
||||||
|
2
src/.gitignore
vendored
@ -1,2 +0,0 @@
|
|||||||
config.h
|
|
||||||
tools/*.gif
|
|
@ -33,27 +33,138 @@ it contains only one entry and .individual_delays will be false.
|
|||||||
#include "Animation.h"
|
#include "Animation.h"
|
||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
#include "Window.h"
|
#include "Window.h"
|
||||||
|
#include <FS.h>
|
||||||
|
|
||||||
Animation::Animation(AnimationData *d) {
|
bool Animation::_load_from_file(const char* filename) {
|
||||||
this->data = d;
|
LOGln("Animation * Loading animation %s...", filename);
|
||||||
|
if (!SPIFFS.begin()) {
|
||||||
|
LOGln("Animation * Could not mount SPIFFS file system.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
File file = SPIFFS.open(filename, "r");
|
||||||
|
if (!file) {
|
||||||
|
LOGln("Animation * Could not open file.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
this->endFrame = d->frame_count-1;
|
size_t size = file.size();
|
||||||
this->colors = new CRGB[this->data->color_count];
|
LOGln("Animation * Opened %s with %d bytes.", filename, size);
|
||||||
uint8_t *color_data = new uint8_t[this->data->color_count * 3];
|
|
||||||
memcpy_P(color_data, this->data->colors, this->data->color_count * 3);
|
if (file.available() < 6) {
|
||||||
for (int i = 0; i<this->data->color_count; i++) colors[i] = CRGB(color_data[i * 3], color_data[i * 3 + 1], color_data[i * 3 + 2]);
|
LOGln("Animation * Less than 6 bytes available. Stopping.");
|
||||||
delete color_data;
|
file.close();
|
||||||
int length = this->data->offsets[this->data->frame_count];
|
return false;
|
||||||
this->animation_data = new uint8_t[length];
|
}
|
||||||
memcpy_P(this->animation_data, this->data->data, length);
|
|
||||||
|
if (file.read() != 'P' || file.read() != 'I' || file.read() != 'A') {
|
||||||
|
LOGln("Animation * Magic number not found");
|
||||||
|
file.close();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t version = file.read();
|
||||||
|
if (version!=1) {
|
||||||
|
LOGln("Animation * Unexpected version %d, expected version 1.", version);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint16_t expected_size = (file.read() << 8) | file.read();
|
||||||
|
if (expected_size != size) {
|
||||||
|
LOGln("Animation * Expected file to have %d bytes, but found %d bytes.", expected_size, size);
|
||||||
|
file.close();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (file.available() < 0 || file.available() + 6 != size) {
|
||||||
|
LOGln("Animation * Expected file to have %d bytes available, but found %d bytes available.", size - 6, file.available());
|
||||||
|
file.close();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Now we can be sure to have the right amount of bytes available for reading
|
||||||
|
|
||||||
|
_width = file.read();
|
||||||
|
DBG("Animation * width: %d", _width);
|
||||||
|
_height = file.read();
|
||||||
|
DBG("Animation * height: %d", _height);
|
||||||
|
|
||||||
|
_frame_count = file.read();
|
||||||
|
DBG("Animation * frame_count: %d", _frame_count);
|
||||||
|
_color_count = file.read();
|
||||||
|
DBG("Animation * color_count: %d", _color_count);
|
||||||
|
|
||||||
|
DBG("Animation * Loading colors...");
|
||||||
|
_colors = new CRGB*[_color_count];
|
||||||
|
char* temp = new char[_color_count*3];
|
||||||
|
int bytes_read = file.readBytes(temp, _color_count*3);
|
||||||
|
LOGln("Animation * Read %d bytes.", bytes_read);
|
||||||
|
for (int i=0; i<_color_count; i++) {
|
||||||
|
_colors[i] = new CRGB(temp[i*3], temp[i*3+1], temp[i*3+2]);
|
||||||
|
}
|
||||||
|
delete [] temp;
|
||||||
|
DBG("Animation * Color loading done.");
|
||||||
|
|
||||||
|
DBG("Animation * Loading frame times...");
|
||||||
|
_frame_times = new uint16_t[_frame_count];
|
||||||
|
for (int i=0; i<_frame_count; i++) {
|
||||||
|
_frame_times[i] = (file.read() << 8) | file.read();
|
||||||
|
}
|
||||||
|
DBG(" done.");
|
||||||
|
|
||||||
|
DBG("Animation * Loading frame lengths...");
|
||||||
|
_frame_data_lengths = new uint16_t[_frame_count];
|
||||||
|
temp = new char[_frame_count*2];
|
||||||
|
bytes_read = file.readBytes(temp, _frame_count*2);
|
||||||
|
DBG("Animation * Read %d bytes.", bytes_read);
|
||||||
|
for (int i=0; i<_frame_count; i++) {
|
||||||
|
//LOGln("Animation * Raw frame lengths: %d, %d", temp[i*2], temp[i*2+1]);
|
||||||
|
_frame_data_lengths[i] = (temp[i*2]<<8) | temp[i*2+1];
|
||||||
|
}
|
||||||
|
delete [] temp;
|
||||||
|
DBG("Animation * Frame length loading done.");
|
||||||
|
|
||||||
|
DBG("Animation * Loading frame data...");
|
||||||
|
_frame_data = new uint8_t*[_frame_count];
|
||||||
|
for (int i=0; i<_frame_count; i++) {
|
||||||
|
uint16_t fl = _frame_data_lengths[i];
|
||||||
|
DBG("Animation * Loading frame %d/%d with %d bytes...", i, _frame_count, fl);
|
||||||
|
_frame_data[i] = new uint8_t[fl];
|
||||||
|
file.readBytes((char*)_frame_data[i], fl);
|
||||||
|
}
|
||||||
|
LOGln("Animation * Frame data loaded.");
|
||||||
|
|
||||||
|
if (file.position() != size) {
|
||||||
|
LOGln("Animation * Expected position to be %d, but are at %d.", size, file.position());
|
||||||
|
file.close();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
file.close();
|
||||||
|
|
||||||
|
LOGln("Animation * Loading completed successfully.");
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Animation::setFgColor(CRGB* fg_color) {
|
Animation::Animation(const char* filename, Window* win) {
|
||||||
this->fgColor = fg_color;
|
_window = win;
|
||||||
|
if (_load_from_file(filename)) {
|
||||||
|
_endFrame = _frame_count-1;
|
||||||
|
_data_valid = true;
|
||||||
|
} else {
|
||||||
|
_endFrame = 0;
|
||||||
|
_data_valid = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Animation::setBgColor(CRGB* bg_color) {
|
void Animation::setFgColor(uint32_t c) {
|
||||||
this->bgColor = bg_color;
|
if (this->fgColor) delete this->fgColor;
|
||||||
|
this->fgColor = new CRGB(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Animation::setBgColor(uint32_t c) {
|
||||||
|
if (this->bgColor) delete this->bgColor;
|
||||||
|
this->bgColor = new CRGB(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Animation::invert() {
|
bool Animation::invert() {
|
||||||
@ -70,87 +181,115 @@ void Animation::setOffsets(int8_t x, int8_t y) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Animation::setStartFrame(uint8_t sf) {
|
void Animation::setStartFrame(uint8_t sf) {
|
||||||
if (sf <= this->endFrame && sf < this->data->frame_count ) this->startFrame = sf;
|
if (_data_valid && sf <= _endFrame && sf < _frame_count ) _startFrame = sf;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Animation::setEndFrame(uint8_t ef) {
|
void Animation::setEndFrame(uint8_t ef) {
|
||||||
if (ef >= this->startFrame && ef < this->data->frame_count) this->endFrame = ef;
|
if (_data_valid && ef >= _startFrame && ef < _frame_count) _endFrame = ef;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Animation::setFrameRange(uint8_t sf, uint8_t ef) {
|
void Animation::setFrameRange(uint8_t sf, uint8_t ef) {
|
||||||
if (sf<=ef && ef < this->data->frame_count) {
|
if (_data_valid && sf<=ef && ef < _frame_count) {
|
||||||
this->startFrame = sf;
|
_startFrame = sf;
|
||||||
this->endFrame = ef;
|
_endFrame = ef;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Animation::setSingleFrame(uint8_t frame) {
|
void Animation::setSingleFrame(uint8_t frame) {
|
||||||
if (frame < this->data->frame_count) {
|
if (_data_valid && frame < _frame_count) {
|
||||||
this->startFrame = frame;
|
_startFrame = frame;
|
||||||
this->endFrame = frame;
|
_endFrame = frame;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Animation::~Animation() {
|
Animation::~Animation() {
|
||||||
delete this->colors;
|
for (int i=0; i<_color_count; i++) delete _colors[i];
|
||||||
delete this->animation_data;
|
|
||||||
|
DBG("Animation * Deleting _colors...");
|
||||||
|
if (_colors) delete[] _colors;
|
||||||
|
|
||||||
|
DBG("Animation * Deleting fgColor...");
|
||||||
|
if (fgColor != NULL) delete fgColor;
|
||||||
|
|
||||||
|
DBG("Animation * Deleting bgColor...");
|
||||||
|
if (bgColor != NULL) delete bgColor;
|
||||||
|
|
||||||
|
DBG("Animation * Deleting _frame_data_lengths...");
|
||||||
|
if (_frame_data_lengths) delete[] _frame_data_lengths;
|
||||||
|
|
||||||
|
DBG("Animation * Deleting _frame_times...");
|
||||||
|
if (_frame_times) delete[] _frame_times;
|
||||||
|
for (int i=0; i<_frame_count; i++) {
|
||||||
|
delete[] _frame_data[i];
|
||||||
|
}
|
||||||
|
DBG("Animation * Deleting _frame_data...");
|
||||||
|
if (_frame_data) delete[] _frame_data;
|
||||||
|
LOGln("Animation * Deletion done.");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Animation::draw(Window* win) {
|
void Animation::draw() {
|
||||||
for (uint16_t i=0; i<this->currentFrame; i++) this->drawFrame(win, i);
|
for (uint16_t i=0; i<this->currentFrame; i++) this->drawFrame(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Animation::drawFrame(Window* win) {
|
void Animation::drawFrame() {
|
||||||
this->drawFrame(win, currentFrame);
|
this->drawFrame(currentFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Animation::drawFrame(Window* win, uint8_t frame_index) {
|
void Animation::drawFrame(uint8_t frame_index) {
|
||||||
uint16_t led_index = 0;
|
uint16_t led_index = 0;
|
||||||
for (uint16_t i=this->data->offsets[frame_index]; i<this->data->offsets[frame_index + 1]; i++) {
|
if (!_data_valid) {
|
||||||
|
CRGB red(0xFF0000);
|
||||||
|
CRGB black(0x000000);
|
||||||
|
for (int x=0; x<_window->width; x++) for (int y=0; y<_window->height; y++) {
|
||||||
|
_window->setPixel(x, y, (y*_window->width+x + y) % 2 ? &red : &black);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (uint16_t i=0; i<_frame_data_lengths[frame_index]; i++) {
|
||||||
uint8_t color_index;
|
uint8_t color_index;
|
||||||
uint8_t count = 1;
|
uint8_t count = 1;
|
||||||
if (this->animation_data[i]==255) { // Run-length encoded data
|
if (_frame_data[frame_index][i]==255) { // Run-length encoded data
|
||||||
color_index = this->animation_data[i + 2];
|
color_index = _frame_data[frame_index][i+2];
|
||||||
count = this->animation_data[i + 1];
|
count = _frame_data[frame_index][i+1];
|
||||||
i += 2;
|
i += 2;
|
||||||
} else {
|
} else {
|
||||||
color_index = this->animation_data[i];
|
color_index = _frame_data[frame_index][i];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (color_index == 0) { // color #0 = skip this pixels
|
if (color_index == 0) { // color #0 = skip this pixels
|
||||||
led_index += count;
|
led_index += count;
|
||||||
} else {
|
} else {
|
||||||
CRGB* color = this->getColor(color_index);
|
CRGB* color = this->getColor(color_index);
|
||||||
for (int j=0; j<count; j++) this->drawPixel(win, led_index++, color);
|
for (int j=0; j<count; j++) this->drawPixel(led_index++, color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Animation::advance() {
|
bool Animation::advance() {
|
||||||
|
if (!_data_valid) return false;
|
||||||
if (this->currentFrameSince == 0) {
|
if (this->currentFrameSince == 0) {
|
||||||
this->currentFrameSince = millis();
|
this->currentFrameSince = millis();
|
||||||
} else if (this->currentFrameSince + this->getFrameDelay(currentFrame) < millis() || this->currentFrameSince > millis()) {
|
} else if (this->currentFrameSince + this->getFrameDelay(currentFrame) < millis() || this->currentFrameSince > millis()) {
|
||||||
currentFrame++;
|
currentFrame++;
|
||||||
if (currentFrame > endFrame) currentFrame = startFrame;
|
if (currentFrame > _endFrame) currentFrame = _startFrame;
|
||||||
this->currentFrameSince = millis();
|
this->currentFrameSince = millis();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Animation::drawPixel(Window* win, int index, CRGB* color) {
|
void Animation::drawPixel(int index, CRGB* color) {
|
||||||
uint8_t x = this->xOffset + (index % this->data->w);
|
uint8_t x = this->xOffset + (index % _width);
|
||||||
uint8_t y = this->yOffset + (index / this->data->h);
|
uint8_t y = this->yOffset + (index / _height);
|
||||||
win->setPixel(x, y, color);
|
_window->setPixel(x, y, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t Animation::getFrameDelay(int frame) {
|
uint16_t Animation::getFrameDelay(int frame) {
|
||||||
if (this->data->individual_delays) return this->data->delays[frame];
|
return _frame_times[frame];
|
||||||
return this->data->delays[0];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CRGB* Animation::getColor(uint8_t index) {
|
CRGB* Animation::getColor(uint8_t index) {
|
||||||
if (index==1) return this->bgColor;
|
if (index==1) return this->bgColor;
|
||||||
else if (this->fgColor != NULL) return this->fgColor;
|
else if (this->fgColor != NULL) return this->fgColor;
|
||||||
else return &(this->colors[index - 2]);
|
else return _colors[index - 2];
|
||||||
}
|
}
|
||||||
|
35
src/SimpleEffect.cpp
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#include "SimpleEffect.h"
|
||||||
|
|
||||||
|
void SimpleEffect::loop(uint16_t ms) {
|
||||||
|
if (_flags & SE_FADEOUT) window->fadeToBlackBy(3);
|
||||||
|
double t = 0.001 * millis();
|
||||||
|
for(uint8_t x=0; x<window->width; x++) for(uint8_t y=0; y<window->height; y++) {
|
||||||
|
uint16_t i = y*window->width + x;
|
||||||
|
double r = _method(t, i, x, y);
|
||||||
|
//if (i==0) Serial.printf("t=%f i=%d x=%d y=%d => r=%f, abs(r)=%d\n", t, i, x, y, r, abs(r)*255);
|
||||||
|
if ((_flags & SE_DEBUG) && i==17) Serial.printf("t=%f i=%d x=%d y=%d => r=%f, abs(r*255)=%d\n", t, i, x, y, r, (int)abs(r*255));
|
||||||
|
if ((_flags & SE_FADEOUT) && r==0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clamp r between -1.0 and +1.0
|
||||||
|
if (r<-1.0) {
|
||||||
|
r = -1.0;
|
||||||
|
} else if (r>1.0) {
|
||||||
|
r = 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_flags & SE_ONLY_POSITIVE) {
|
||||||
|
r = abs(r);
|
||||||
|
}
|
||||||
|
|
||||||
|
CRGB color;
|
||||||
|
if (_flags & SE_RANDOM_PIXEL_COLORS) {
|
||||||
|
color = CHSV(random8(), 255, abs(r*255));
|
||||||
|
} else {
|
||||||
|
color = CHSV(_flags & SE_CYCLE_COLORS ? baseHue : _color, r<0?0:255, abs(r*255));
|
||||||
|
}
|
||||||
|
|
||||||
|
window->setPixel(x, y, &color);
|
||||||
|
}
|
||||||
|
}
|
235
src/Window.cpp
@ -1,16 +1,20 @@
|
|||||||
#include "Window.h"
|
#include "Window.h"
|
||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
|
|
||||||
Window* Window::getFullWindow() {
|
Window Window::window_full = Window();
|
||||||
static Window win;
|
Window Window::window_with_clock = Window(0, 0, LED_WIDTH, LED_HEIGHT-6);
|
||||||
return &win;
|
Window Window::window_clock = Window(0, LED_HEIGHT-6, LED_WIDTH, 6);
|
||||||
}
|
|
||||||
|
|
||||||
void Window::setPixel(uint8_t x, uint8_t y, CRGB* color) {
|
void Window::setPixel(uint8_t x, uint8_t y, CRGB* color) {
|
||||||
if (x>=this->width || y>=this->height) return;
|
if (x>=this->width || y>=this->height) return;
|
||||||
leds[this->coordsToGlobalIndex(x, y)] = *color;
|
leds[this->coordsToGlobalIndex(x, y)] = *color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Window::raisePixel(uint8_t x, uint8_t y, CRGB* color) {
|
||||||
|
if (x>=this->width || y>=this->height) return;
|
||||||
|
leds[this->coordsToGlobalIndex(x, y)] |= *color;
|
||||||
|
}
|
||||||
|
|
||||||
void Window::setPixelByIndex(uint16_t index, CRGB* color) {
|
void Window::setPixelByIndex(uint16_t index, CRGB* color) {
|
||||||
uint8_t x = index % this->width;
|
uint8_t x = index % this->width;
|
||||||
uint8_t y = index / this->width;
|
uint8_t y = index / this->width;
|
||||||
@ -36,7 +40,20 @@ void Window::clear(CRGB* color) {
|
|||||||
for(int x=0; x<this->width; x++) for(int y=0; y<this->height; y++) this->setPixel(x, y, color);
|
for(int x=0; x<this->width; x++) for(int y=0; y<this->height; y++) this->setPixel(x, y, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::drawChar(Font* font, uint8_t xPos, uint8_t yPos, const char c, CRGB* color, bool mask) {
|
void Window::drawText(Font* font, uint16_t x, uint16_t y, String text, CRGB* color) {
|
||||||
|
for (uint16_t i=0; i<text.length(); i++) {
|
||||||
|
drawChar(font, (x+((i*(font->width + 1))<<8)), (y<<8), text[i], color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Window::drawSubText(Font* font, accum88 x, accum88 y, String text, CRGB* color) {
|
||||||
|
for (uint16_t i=0; i<text.length(); i++) {
|
||||||
|
drawChar(font, x+(i*((font->width + 1)<<8)), y, text[i], color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Window::drawChar(Font* font, accum88 xPos, accum88 yPos, const char c, CRGB* color, bool mask) {
|
||||||
|
SubpixelRenderingMode mode = mask ? SUBPIXEL_RENDERING_SET : SUBPIXEL_RENDERING_ADD;
|
||||||
if (!font->isCharAllowed(c)) return;
|
if (!font->isCharAllowed(c)) return;
|
||||||
uint16_t position = font->getCharPosition(c);
|
uint16_t position = font->getCharPosition(c);
|
||||||
uint8_t* data = new uint8_t[font->width];
|
uint8_t* data = new uint8_t[font->width];
|
||||||
@ -45,18 +62,224 @@ void Window::drawChar(Font* font, uint8_t xPos, uint8_t yPos, const char c, CRGB
|
|||||||
for(uint8_t y=0; y<font->height; y++) for(uint8_t x=0; x<font->width; x++) {
|
for(uint8_t y=0; y<font->height; y++) for(uint8_t x=0; x<font->width; x++) {
|
||||||
bool on = (data[x]>>(font->height - 1 - y) & 1) * 255;
|
bool on = (data[x]>>(font->height - 1 - y) & 1) * 255;
|
||||||
if (mask) on = !on;
|
if (mask) on = !on;
|
||||||
if (on) this->setPixel(x + xPos, y + yPos, color);
|
if (on) this->setSubPixel(xPos + (x<<8), yPos + (y<<8), color, mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
free(data);
|
free(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Window::clear_row(uint8_t y) {
|
||||||
|
CRGB black(0x000000);
|
||||||
|
for (uint8_t x=0; x<this->width; x++) this->setPixel(x, y, &black);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Window::shift_down() {
|
||||||
|
for (uint8_t y=this->height-1; y>=1; y--) {
|
||||||
|
for (uint8_t x=0; x<this->width; x++) {
|
||||||
|
leds[coordsToGlobalIndex(x, y)] = leds[coordsToGlobalIndex(x, y-1)];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
clear_row(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Window::shift_down_and_blur() {
|
||||||
|
shift_down();
|
||||||
|
for (uint8_t y=1; y<this->height; y++) {
|
||||||
|
blur_row(y, 128);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Window::blur(fract8 intensity) {
|
||||||
|
blur_rows(intensity);
|
||||||
|
blur_columns(intensity);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Window::blur_rows(fract8 intensity) {
|
||||||
|
for (uint8_t y=0; y<this->height; y++) {
|
||||||
|
blur_row(y, intensity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Window::blur_columns(fract8 intensity) {
|
||||||
|
for (uint8_t x=0; x<this->width; x++) {
|
||||||
|
blur_column(x, intensity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Window::blur_row(uint8_t y, fract8 intensity) {
|
||||||
|
uint16_t idx1 = coordsToGlobalIndex(0, y);
|
||||||
|
uint16_t idx2 = coordsToGlobalIndex(this->width - 1, y);
|
||||||
|
blur1d(&(leds[idx1 < idx2 ? idx1 : idx2]), this->width, intensity);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Window::blur_column(uint8_t x, fract8 intensity) {
|
||||||
|
// Reimplementation from FastLEDs blurColumns
|
||||||
|
uint8_t keep = 255 - intensity;
|
||||||
|
uint8_t seep = intensity >> 1;
|
||||||
|
CRGB carryover = CRGB::Black;
|
||||||
|
|
||||||
|
for (uint8_t y=0; y<this->height; y++) {
|
||||||
|
CRGB cur = leds[coordsToGlobalIndex(x, y)];
|
||||||
|
CRGB part = cur;
|
||||||
|
part.nscale8(seep);
|
||||||
|
cur.nscale8(keep);
|
||||||
|
cur += carryover;
|
||||||
|
if (y>0) leds[coordsToGlobalIndex(x, y-1)] += part;
|
||||||
|
leds[coordsToGlobalIndex(x, y)] = cur;
|
||||||
|
carryover = part;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Window::addPixelColor(uint16_t index, CRGB* color) {
|
void Window::addPixelColor(uint16_t index, CRGB* color) {
|
||||||
leds[localToGlobalIndex(index)] += *color;
|
leds[localToGlobalIndex(index)] += *color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Window::addPixelColor(uint8_t x, uint8_t y, CRGB* color) {
|
||||||
|
leds[coordsToGlobalIndex(x, y)] += *color;
|
||||||
|
}
|
||||||
|
|
||||||
|
CRGB Window::get_pixel(uint8_t x, uint8_t y) {
|
||||||
|
return leds[coordsToGlobalIndex(x, y)];
|
||||||
|
}
|
||||||
|
|
||||||
void Window::fadeToBlackBy(fract8 speed) {
|
void Window::fadeToBlackBy(fract8 speed) {
|
||||||
for (uint8_t x=0; x<this->width; x++) for(uint8_t y=0; y<this->height; y++) {
|
for (uint8_t x=0; x<this->width; x++) for(uint8_t y=0; y<this->height; y++) {
|
||||||
leds[coordsToGlobalIndex(x, y)].nscale8(255 - speed);
|
leds[coordsToGlobalIndex(x, y)].nscale8(255 - speed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Window::line(saccum78 x1, saccum78 y1, saccum78 x2, saccum78 y2, CRGB* color) {
|
||||||
|
// Bresenham algorithm
|
||||||
|
const uint8_t stepsize = 64;
|
||||||
|
saccum78 dx = abs(x2 - x1);
|
||||||
|
saccum78 dy = -abs(y2 - y1);
|
||||||
|
int8_t sx = x1<x2 ? 1 : -1;
|
||||||
|
int8_t sy = y1<y2 ? 1 : -1;
|
||||||
|
saccum78 err = dx + dy;
|
||||||
|
saccum78 e2;
|
||||||
|
uint8_t step = 0;
|
||||||
|
while (1) {
|
||||||
|
if (step == 0) setSubPixel(x1, y1, color, SUBPIXEL_RENDERING_RAISE);
|
||||||
|
if (++step >= stepsize) step=0;
|
||||||
|
if (x1>>8==x2>>8 && y1>>8==y2>>8) break;
|
||||||
|
e2 = 2*err;
|
||||||
|
if (e2 > dy) {
|
||||||
|
err += dy;
|
||||||
|
x1 += sx;
|
||||||
|
}
|
||||||
|
if (e2 < dx) {
|
||||||
|
err += dx;
|
||||||
|
y1 += sy;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Window::_circle_point(int x0, int y0, int x1, int y1, CRGB* color) {
|
||||||
|
setPixel(x0+x1, y0+y1, color);
|
||||||
|
setPixel(x0-x1, y0+y1, color);
|
||||||
|
setPixel(x0+x1, y0-y1, color);
|
||||||
|
setPixel(x0-x1, y0-y1, color);
|
||||||
|
setPixel(x0+y1, y0+x1, color);
|
||||||
|
setPixel(x0-y1, y0+x1, color);
|
||||||
|
setPixel(x0+y1, y0-x1, color);
|
||||||
|
setPixel(x0-y1, y0-x1, color);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Window::circle(uint8_t x0, uint8_t y0, uint8_t radius, CRGB* color) {
|
||||||
|
// Again, Bresenham
|
||||||
|
int x=0, y=radius;
|
||||||
|
int d=3 - 2*radius;
|
||||||
|
_circle_point(x0, y0, x, y, color);
|
||||||
|
while (y >= x) {
|
||||||
|
x++;
|
||||||
|
if (d>0) {
|
||||||
|
y--;
|
||||||
|
d = d + 4*(x-y) + 10;
|
||||||
|
} else {
|
||||||
|
d = d + 4*x + 6;
|
||||||
|
}
|
||||||
|
_circle_point(x0, y0, x, y, color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Window::lineWithAngle(uint8_t x, uint8_t y, uint16_t angle, uint8_t length, CRGB* color) {
|
||||||
|
lineWithAngle(x, y, angle, 0, length, color);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Window::lineWithAngle(uint8_t x, uint8_t y, uint16_t angle, uint8_t startdist, uint8_t length, CRGB* color) {
|
||||||
|
//LOGln("lineWithAngle called. x: %d.%03d, y: %d.%03d, angle: %d", x>>8, x&0xFF, y>>8, y&0xFF, angle);
|
||||||
|
saccum78 x1 = x<<8;
|
||||||
|
saccum78 y1 = y<<8;
|
||||||
|
|
||||||
|
if (startdist > 0) {
|
||||||
|
x1 = (x<<8) + (startdist<<8) * cos16(angle) / 0x10000;
|
||||||
|
y1 = (y<<8) + (startdist<<8) * sin16(angle) / 0x10000;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (length==0) {
|
||||||
|
setSubPixel(x1, y1, color);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
saccum78 x2 = (x<<8) + ((startdist + length)<<8) * cos16(angle) / 0x10000;
|
||||||
|
saccum78 y2 = (y<<8) + ((startdist + length)<<8) * sin16(angle) / 0x10000;
|
||||||
|
//LOGln("x1: %d.%03d, y1: %d.%03d, x2: %d.%03d, y2: %d.%03d", x1>>8, x1&0xFF, y1>>8, y1&0xFF, x2>>8, x2&0xFF, y2>>8, y2&0xFF);
|
||||||
|
line(x1, y1, x2, y2, color);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Window::setSubPixel(accum88 x, accum88 y, CRGB* color, SubpixelRenderingMode mode) {
|
||||||
|
uint8_t px, py;
|
||||||
|
// px = Part of next pixel to fill
|
||||||
|
// x = "Origin pixel"
|
||||||
|
px = x & 0xFF;
|
||||||
|
py = y & 0xFF;
|
||||||
|
x = x >> 8;
|
||||||
|
y = y >> 8;
|
||||||
|
|
||||||
|
CRGB c;
|
||||||
|
c = CRGB(scale8( scale8( color->r, 255-py), 255-px),
|
||||||
|
scale8( scale8( color->g, 255-py), 255-px),
|
||||||
|
scale8( scale8( color->b, 255-py), 255-px));
|
||||||
|
_subpixel_render(x, y, &c, mode);
|
||||||
|
|
||||||
|
if (px) {
|
||||||
|
c = CRGB(scale8( scale8( color->r, 255-py), px),
|
||||||
|
scale8( scale8( color->g, 255-py), px),
|
||||||
|
scale8( scale8( color->b, 255-py), px));
|
||||||
|
_subpixel_render(x+1, y, &c, mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (py) {
|
||||||
|
c = CRGB(scale8( scale8( color->r, py), 255-px),
|
||||||
|
scale8( scale8( color->g, py), 255-px),
|
||||||
|
scale8( scale8( color->b, py), 255-px));
|
||||||
|
_subpixel_render(x, y+1, &c, mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (px || py) {
|
||||||
|
c = CRGB(scale8( scale8( color->r, py), px),
|
||||||
|
scale8( scale8( color->g, py), px),
|
||||||
|
scale8( scale8( color->b, py), px));
|
||||||
|
_subpixel_render(x+1, y+1, &c, mode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Window::_subpixel_render(uint8_t x, uint8_t y, CRGB* color, SubpixelRenderingMode mode) {
|
||||||
|
switch(mode) {
|
||||||
|
case SUBPIXEL_RENDERING_ADD: addPixelColor(x, y, color); break;
|
||||||
|
case SUBPIXEL_RENDERING_RAISE: raisePixel(x, y, color); break;
|
||||||
|
case SUBPIXEL_RENDERING_SET: setPixel(x, y, color); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Window::fill_with_checkerboard() {
|
||||||
|
CRGB pink(0xFF00FF);
|
||||||
|
CRGB black(0x000000);
|
||||||
|
uint8_t s = (uint8_t)(millis() / 1000);
|
||||||
|
for(int x=0; x<this->width; x++) {
|
||||||
|
for(int y=0; y<this->height; y++) {
|
||||||
|
this->setPixel(x, y, ((x+y+s) % 2)?&pink:&black);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,165 +0,0 @@
|
|||||||
#include "animations.h"
|
|
||||||
#include "prototypes.h"
|
|
||||||
|
|
||||||
uint8_t animation_koopa_colors[] PROGMEM = {182, 154, 17, 0, 0, 0, 48, 48, 48, 142, 4, 6, 254, 252, 255, 3, 1, 138, 17, 239, 18};
|
|
||||||
uint8_t animation_koopa_data[] PROGMEM = {
|
|
||||||
255, 4, 1, 6, 255, 14, 1, 6, 6, 6, 255, 12, 1, 2, 6, 6, 6, 255, 11, 1, 2, 2, 3, 6, 6, 2, 255, 10, 1, 2, 2, 3, 6, 6, 2, 1, 1, 8, 8, 8, 6, 1, 1, 1, 2, 3, 2, 6, 6, 2, 2, 1, 8, 3, 8, 8, 3, 6, 1, 1, 255, 7, 2, 1, 8, 8, 3, 3, 8, 8, 6, 1, 2, 2, 2, 4, 2, 2, 4, 8, 8, 3, 8, 8, 3, 8, 6, 1, 2, 2, 4, 2, 2, 2, 7, 8, 3, 255, 4, 8, 3, 8, 1, 1, 1, 255, 4, 2, 7, 3, 8, 3, 8, 8, 3, 8, 3, 2, 1, 1, 1, 2, 2, 2, 7, 8, 8, 8, 3, 3, 8, 8, 8, 255, 5, 1, 2, 2, 7, 7, 8, 3, 8, 8, 3, 8, 7, 7, 1, 1, 1, 255, 4, 5, 7, 7, 255, 4, 8, 7, 7, 1, 1, 1, 5, 5, 5, 4, 2, 2, 255, 6, 7, 2, 255, 6, 1, 255, 4, 2, 1, 5, 5, 5, 2, 2, 255, 6, 1, 2, 2, 2, 255, 4, 1, 2, 2, 2, 1,
|
|
||||||
255, 4, 0, 1, 255, 14, 0, 1, 0, 1, 255, 12, 0, 1, 255, 14, 0, 1, 0, 6, 0, 0, 1, 255, 18, 0, 255, 4, 1, 0, 0, 0, 1, 2, 0, 3, 0, 6, 0, 0, 1, 8, 0, 0, 6, 1, 0, 0, 0, 3, 0, 6, 6, 255, 4, 0, 3, 8, 8, 3, 6, 1, 255, 4, 0, 2, 0, 0, 2, 1, 0, 8, 3, 3, 8, 255, 5, 0, 2, 4, 0, 0, 4, 0, 8, 3, 0, 0, 3, 8, 6, 0, 2, 2, 4, 255, 4, 0, 8, 3, 8, 0, 0, 8, 3, 8, 1, 0, 0, 2, 255, 4, 0, 3, 0, 3, 8, 8, 3, 0, 3, 2, 0, 0, 0, 2, 0, 0, 0, 8, 0, 8, 3, 3, 8, 0, 8, 1, 0, 0, 0, 1, 2, 2, 7, 0, 8, 3, 0, 0, 3, 8, 0, 7, 0, 0, 255, 4, 1, 5, 7, 0, 255, 4, 8, 0, 7, 255, 6, 0, 5, 0, 0, 255, 6, 7, 255, 6, 0, 5, 5, 0, 0, 2, 2, 0, 5, 5, 0, 0, 2,
|
|
||||||
255, 4, 0, 6, 255, 14, 0, 6, 0, 6, 255, 12, 0, 2, 255, 14, 0, 2, 0, 3, 0, 0, 2, 255, 25, 0, 2, 3, 0, 6, 0, 2, 255, 11, 0, 2, 0, 2, 2, 255, 17, 0, 1, 255, 11, 0, 1, 1, 0, 0, 1, 255, 9, 0, 255, 4, 1, 255, 14, 0, 1, 1, 255, 14, 0, 2, 255, 35, 0, 2, 255, 14, 0, 2, 255, 14, 0, 2, 2, 0, 0, 1, 1, 0, 1, 1, 255, 3, 0,
|
|
||||||
255, 73, 0, 8, 8, 8, 6, 255, 11, 0, 8, 3, 0, 0, 3, 6, 255, 11, 0, 8, 3, 3, 8, 8, 6, 255, 4, 0, 4, 0, 0, 4, 8, 0, 3, 8, 8, 3, 255, 5, 0, 4, 2, 0, 0, 7, 0, 3, 8, 0, 0, 8, 3, 8, 0, 0, 0, 2, 2, 0, 0, 0, 3, 8, 3, 0, 0, 3, 8, 3, 2, 0, 0, 0, 2, 0, 0, 0, 8, 0, 8, 3, 3, 8, 0, 8, 1, 0, 0, 1, 1, 0, 0, 0, 7, 0, 3, 8, 8, 3, 0, 7, 7, 255, 4, 0, 1, 1, 2, 0, 7, 8, 0, 0, 8, 7, 0, 1, 255, 4, 0, 2, 2, 0, 2, 0, 255, 4, 7, 0, 2, 255, 4, 0, 2, 2, 0, 0, 5, 5, 1, 1, 2, 2, 2, 5, 5, 255, 4, 0, 1, 1, 5, 5, 5, 255, 4, 0, 255, 3, 5,
|
|
||||||
255, 4, 0, 1, 255, 14, 0, 1, 0, 1, 255, 12, 0, 1, 255, 14, 0, 1, 0, 6, 0, 0, 1, 255, 18, 0, 255, 4, 1, 0, 0, 0, 1, 2, 0, 3, 0, 6, 0, 0, 1, 8, 0, 0, 6, 1, 0, 0, 0, 3, 0, 6, 6, 255, 4, 0, 3, 8, 8, 3, 6, 1, 255, 4, 0, 2, 0, 0, 2, 1, 0, 8, 3, 3, 8, 255, 5, 0, 2, 4, 0, 0, 4, 0, 8, 3, 0, 0, 3, 8, 6, 0, 2, 2, 4, 255, 4, 0, 8, 3, 8, 0, 0, 8, 3, 8, 1, 0, 0, 2, 255, 4, 0, 3, 0, 3, 8, 8, 3, 0, 3, 2, 0, 0, 0, 2, 0, 0, 0, 8, 0, 8, 3, 3, 8, 0, 8, 8, 255, 4, 0, 2, 2, 7, 0, 8, 3, 0, 0, 3, 8, 0, 7, 255, 4, 0, 1, 1, 0, 7, 0, 255, 4, 8, 0, 7, 255, 4, 0, 1, 0, 0, 0, 2, 255, 6, 7, 2, 255, 4, 0, 255, 4, 2, 255, 4, 0, 2, 2, 2, 0, 0,
|
|
||||||
255, 4, 0, 6, 255, 14, 0, 6, 0, 6, 255, 12, 0, 2, 255, 14, 0, 2, 0, 3, 0, 0, 2, 255, 25, 0, 2, 3, 0, 6, 0, 2, 255, 11, 0, 2, 0, 2, 2, 255, 17, 0, 1, 255, 11, 0, 1, 1, 0, 0, 1, 255, 9, 0, 255, 4, 1, 255, 14, 0, 1, 1, 255, 14, 0, 2, 255, 12, 0, 1, 255, 36, 0, 1, 255, 10, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 1, 0, 0, 1, 1, 0, 2, 2
|
|
||||||
};
|
|
||||||
uint16_t animation_koopa_delays[] = {100, 100, 100, 100, 100, 100};
|
|
||||||
uint16_t animation_koopa_offsets[] = {0, 199, 390, 479, 640, 832, 926};
|
|
||||||
AnimationData animation_koopa = {&animation_koopa_colors[0], &animation_koopa_data[0], &animation_koopa_offsets[0], &animation_koopa_delays[0], false, 7, 6, 16, 16};
|
|
||||||
|
|
||||||
|
|
||||||
uint8_t animation_couple_rain_colors[] PROGMEM = {0, 0, 0, 2, 139, 218, 181, 171, 255, 255, 255, 255, 255, 76, 11, 220, 206, 180, 49, 49, 49, 21, 1, 175, 100, 27, 0, 81, 66, 37, 51, 25, 253, 46, 12, 0, 218, 2, 86, 37, 175, 253, 128, 104, 60};
|
|
||||||
uint8_t animation_couple_rain_data[] PROGMEM = {
|
|
||||||
255, 6, 2, 3, 255, 7, 2, 3, 255, 14, 2, 3, 255, 8, 2, 3, 255, 7, 2, 3, 255, 14, 2, 3, 255, 25, 2, 3, 255, 5, 2, 3, 255, 12, 2, 3, 255, 12, 2, 3, 255, 18, 2, 3, 255, 12, 2, 3, 255, 18, 2, 3, 255, 12, 2, 3, 255, 18, 2, 3, 255, 12, 2, 3, 255, 10, 2, 3, 255, 7, 2, 3, 255, 23, 2, 3, 255, 11, 2, 3, 255, 19, 2, 3, 255, 11, 2, 3, 255, 15, 2, 3, 2, 2, 2, 3, 255, 11, 2, 3, 255, 5, 2, 15, 255, 9, 2, 3, 2, 2, 2, 3, 255, 11, 2, 3, 2, 2, 2, 3, 255, 11, 2, 3, 255, 15, 2, 3, 5, 2, 15, 3, 255, 7, 2, 3, 2, 2, 2, 3, 255, 8, 2, 3, 255, 4, 2, 255, 7, 5, 255, 7, 2, 3, 2, 2, 2, 3, 255, 8, 2, 3, 2, 2, 2, 5, 5, 12, 12, 5, 12, 12, 5, 5, 255, 6, 2, 3, 255, 12, 2, 3, 2, 2, 5, 5, 12, 12, 5, 5, 5, 12, 12, 5, 5, 255, 5, 2, 3, 255, 12, 2, 3, 2, 4, 4, 9, 9, 12, 5, 5, 5, 12, 9, 9, 4, 4, 255, 4, 2, 3, 255, 8, 2, 3, 2, 2, 2, 3, 2, 4, 4, 9, 9, 9, 4, 4, 4, 9, 9, 9, 4, 4, 255, 13, 2, 3, 255, 11, 2, 9, 255, 6, 2, 3, 255, 12, 2, 3, 255, 7, 2, 6, 6, 6, 2, 9, 255, 6, 2, 3, 255, 12, 2, 3, 255, 7, 2, 6, 6, 6, 2, 9, 2, 10, 10, 10, 2, 2, 3, 255, 12, 2, 3, 255, 7, 2, 10, 10, 10, 2, 9, 255, 5, 10, 2, 3, 255, 19, 2, 255, 5, 6, 12, 10, 7, 7, 7, 10, 2, 3, 255, 6, 2, 3, 255, 13, 2, 11, 7, 11, 2, 12, 10, 11, 7, 11, 10, 255, 8, 2, 3, 255, 13, 2, 7, 7, 7, 2, 7, 10, 7, 7, 7, 10, 255, 8, 2, 3, 255, 6, 2, 3, 255, 6, 2, 255, 5, 6, 13, 13, 16, 13, 13, 255, 8, 2, 3, 255, 6, 2, 3, 255, 5, 2, 255, 4, 6, 2, 2, 2, 14, 14, 14, 255, 9, 2, 3, 255, 6, 2, 3, 255, 5, 2, 7, 10, 10, 10, 2, 2, 7, 14, 14, 14, 7, 255, 15, 2, 3, 255, 6, 2, 6, 6, 6, 2, 2, 255, 5, 14, 2, 2, 2, 15, 255, 11, 2, 3, 255, 6, 2, 6, 2, 6, 2, 2, 2, 7, 2, 7, 255, 6, 2, 15, 255, 15, 2, 8, 8, 2, 8, 8, 2, 2, 8, 2, 8, 255, 6, 2, 3, 255, 37, 2,
|
|
||||||
255, 19, 0, 3, 255, 31, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 14, 0, 3, 0, 0, 0, 2, 0, 0, 0, 3, 255, 8, 0, 2, 255, 5, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 255, 68, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 7, 0, 3, 0, 0, 0, 2, 255, 8, 0, 3, 255, 18, 0, 3, 0, 0, 0, 2, 255, 15, 0, 2, 255, 21, 0, 2, 15, 255, 8, 0, 2, 255, 14, 0, 15, 0, 0, 0, 15, 2, 255, 15, 0, 3, 255, 14, 0, 2, 2, 255, 7, 0, 2, 255, 7, 0, 3, 255, 4, 0, 2, 255, 18, 0, 2, 255, 12, 0, 2, 255, 22, 0, 3, 255, 31, 0, 3, 255, 36, 0, 2, 255, 22, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 255, 14, 0, 2, 0, 0, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 76, 0, 3, 255, 25, 0, 2, 255, 5, 0, 3, 255, 18, 0, 3, 255, 6, 0, 2, 255, 24, 0, 3, 255, 13, 0, 2, 255, 31, 0, 2, 255, 50, 0, 15, 255, 5, 0, 3, 255, 5, 0, 15, 255, 20, 0, 2, 0, 15, 0, 0, 3, 255, 7, 0, 15, 255, 20, 0, 2, 255, 9, 0, 3, 255, 21, 0, 2, 255, 37, 0,
|
|
||||||
255, 6, 0, 2, 255, 7, 0, 2, 255, 14, 0, 2, 255, 31, 0, 2, 255, 21, 0, 3, 255, 31, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 14, 0, 3, 0, 0, 0, 2, 0, 0, 0, 3, 255, 8, 0, 2, 255, 5, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 255, 68, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 7, 0, 3, 0, 15, 0, 2, 15, 0, 15, 0, 0, 0, 2, 0, 3, 255, 18, 0, 3, 0, 0, 2, 2, 0, 0, 2, 255, 4, 0, 15, 255, 7, 0, 2, 255, 31, 0, 2, 255, 35, 0, 3, 255, 23, 0, 2, 255, 7, 0, 3, 255, 4, 0, 2, 255, 18, 0, 2, 255, 12, 0, 2, 255, 22, 0, 3, 255, 31, 0, 3, 255, 36, 0, 2, 255, 22, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 255, 14, 0, 2, 0, 0, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 76, 0, 3, 255, 25, 0, 2, 255, 5, 0, 3, 255, 18, 0, 3, 255, 6, 0, 2, 255, 24, 0, 3, 255, 11, 0, 15, 0, 2, 255, 18, 0, 2, 0, 0, 15, 255, 8, 0, 2, 2, 0, 15, 255, 19, 0, 2, 255, 10, 0, 2, 255, 23, 0, 3, 255, 31, 0, 3, 255, 34, 0,
|
|
||||||
0, 0, 3, 255, 16, 0, 2, 255, 7, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 7, 0, 2, 255, 12, 0, 3, 255, 10, 0, 2, 255, 7, 0, 2, 255, 14, 0, 2, 255, 31, 0, 2, 255, 21, 0, 3, 255, 31, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 14, 0, 3, 0, 0, 0, 2, 0, 0, 0, 3, 255, 8, 0, 2, 255, 5, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 255, 18, 0, 15, 255, 26, 0, 15, 2, 0, 0, 2, 0, 2, 255, 16, 0, 2, 255, 19, 0, 2, 3, 255, 10, 0, 2, 255, 7, 0, 3, 0, 0, 0, 2, 255, 8, 0, 3, 255, 18, 0, 3, 255, 19, 0, 2, 255, 31, 0, 2, 255, 35, 0, 3, 255, 23, 0, 2, 255, 7, 0, 3, 255, 4, 0, 2, 255, 18, 0, 2, 255, 12, 0, 2, 255, 22, 0, 3, 255, 31, 0, 3, 255, 36, 0, 2, 255, 22, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 255, 14, 0, 2, 0, 0, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 76, 0, 3, 255, 23, 0, 15, 0, 2, 0, 0, 0, 15, 2, 3, 255, 18, 0, 3, 0, 0, 0, 2, 0, 0, 2, 255, 8, 0, 2, 15, 255, 14, 0, 3, 255, 5, 0, 15, 255, 7, 0, 2, 255, 25, 0, 15, 255, 5, 0, 2, 255, 59, 0,
|
|
||||||
255, 10, 0, 3, 255, 31, 0, 3, 255, 8, 0, 2, 255, 14, 0, 3, 255, 16, 0, 2, 255, 7, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 7, 0, 2, 255, 12, 0, 3, 255, 10, 0, 2, 255, 7, 0, 2, 255, 14, 0, 2, 255, 31, 0, 2, 255, 21, 0, 3, 255, 31, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 14, 0, 3, 0, 0, 0, 2, 0, 0, 0, 3, 0, 2, 15, 255, 5, 0, 2, 255, 5, 0, 3, 255, 12, 0, 15, 2, 255, 17, 0, 3, 255, 45, 0, 15, 255, 22, 0, 2, 255, 6, 0, 15, 255, 13, 0, 3, 255, 10, 0, 2, 255, 7, 0, 3, 255, 12, 0, 3, 255, 38, 0, 2, 255, 31, 0, 2, 255, 35, 0, 3, 255, 23, 0, 2, 255, 7, 0, 3, 255, 4, 0, 2, 255, 18, 0, 2, 255, 12, 0, 2, 255, 22, 0, 3, 255, 31, 0, 3, 255, 36, 0, 2, 255, 22, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 255, 14, 0, 2, 0, 0, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 36, 0, 2, 255, 5, 0, 2, 255, 26, 0, 15, 255, 6, 0, 3, 0, 0, 0, 2, 255, 20, 0, 2, 2, 15, 255, 4, 0, 3, 255, 18, 0, 3, 255, 6, 0, 2, 2, 255, 23, 0, 3, 255, 41, 0,
|
|
||||||
0, 0, 2, 255, 20, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 255, 18, 0, 3, 255, 31, 0, 3, 255, 8, 0, 2, 255, 14, 0, 3, 255, 16, 0, 2, 255, 7, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 7, 0, 2, 255, 12, 0, 3, 255, 10, 0, 2, 255, 7, 0, 2, 255, 14, 0, 2, 255, 31, 0, 2, 255, 21, 0, 3, 255, 29, 0, 2, 0, 3, 255, 18, 0, 3, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 15, 255, 4, 0, 2, 255, 14, 0, 3, 0, 0, 15, 2, 0, 15, 0, 3, 255, 8, 0, 2, 255, 5, 0, 3, 255, 12, 0, 15, 2, 255, 17, 0, 3, 255, 10, 0, 15, 2, 255, 56, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 20, 0, 3, 255, 38, 0, 2, 255, 31, 0, 2, 255, 35, 0, 3, 255, 23, 0, 2, 255, 7, 0, 3, 255, 4, 0, 2, 255, 18, 0, 2, 255, 12, 0, 2, 255, 22, 0, 3, 255, 31, 0, 3, 255, 36, 0, 2, 255, 22, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 255, 14, 0, 2, 0, 0, 0, 3, 15, 255, 11, 0, 3, 255, 14, 0, 2, 255, 5, 0, 2, 0, 0, 15, 255, 4, 0, 15, 255, 25, 0, 2, 0, 0, 0, 15, 255, 20, 0, 15, 255, 11, 0, 3, 255, 25, 0, 2, 255, 34, 0,
|
|
||||||
255, 6, 0, 3, 0, 0, 0, 2, 255, 5, 0, 3, 255, 13, 0, 3, 0, 0, 0, 2, 255, 13, 0, 3, 255, 10, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 255, 18, 0, 3, 255, 31, 0, 3, 255, 8, 0, 2, 255, 14, 0, 3, 255, 16, 0, 2, 255, 7, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 7, 0, 2, 255, 12, 0, 3, 255, 10, 0, 2, 255, 7, 0, 2, 255, 14, 0, 2, 255, 31, 0, 2, 255, 20, 0, 2, 3, 255, 21, 0, 2, 15, 0, 2, 15, 255, 5, 0, 3, 255, 18, 0, 3, 0, 0, 0, 2, 0, 0, 0, 3, 255, 8, 0, 2, 255, 14, 0, 3, 0, 2, 0, 2, 255, 12, 0, 2, 255, 5, 0, 3, 255, 9, 0, 15, 0, 0, 2, 255, 18, 0, 3, 255, 68, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 20, 0, 3, 255, 38, 0, 2, 255, 31, 0, 2, 255, 35, 0, 3, 255, 23, 0, 2, 255, 7, 0, 3, 255, 4, 0, 2, 255, 18, 0, 2, 255, 12, 0, 2, 255, 22, 0, 3, 255, 31, 0, 3, 255, 28, 0, 2, 255, 7, 0, 2, 15, 255, 21, 0, 3, 255, 4, 0, 2, 0, 15, 0, 2, 2, 0, 0, 3, 255, 14, 0, 2, 0, 15, 0, 3, 255, 7, 0, 2, 255, 4, 0, 3, 255, 14, 0, 15, 2, 255, 72, 0,
|
|
||||||
255, 23, 0, 2, 255, 14, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 2, 255, 5, 0, 3, 255, 13, 0, 3, 0, 0, 0, 2, 255, 13, 0, 3, 255, 10, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 255, 18, 0, 3, 255, 31, 0, 3, 255, 8, 0, 2, 255, 14, 0, 3, 255, 16, 0, 2, 255, 7, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 7, 0, 2, 255, 12, 0, 3, 255, 10, 0, 2, 0, 0, 0, 15, 0, 15, 0, 2, 15, 255, 13, 0, 2, 255, 12, 0, 2, 0, 0, 2, 255, 15, 0, 2, 255, 21, 0, 3, 255, 31, 0, 3, 255, 18, 0, 3, 2, 255, 15, 0, 2, 255, 14, 0, 3, 255, 16, 0, 2, 255, 5, 0, 3, 255, 31, 0, 3, 255, 68, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 20, 0, 3, 255, 38, 0, 2, 255, 31, 0, 2, 255, 35, 0, 3, 255, 23, 0, 2, 255, 7, 0, 3, 255, 4, 0, 2, 255, 18, 0, 2, 255, 10, 0, 15, 0, 2, 255, 22, 0, 3, 255, 5, 0, 2, 255, 20, 0, 15, 255, 4, 0, 3, 0, 15, 2, 255, 4, 0, 15, 255, 15, 0, 15, 0, 2, 255, 10, 0, 2, 255, 4, 0, 15, 255, 13, 0, 2, 0, 0, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 255, 14, 0, 2, 0, 0, 0, 3, 255, 37, 0,
|
|
||||||
255, 16, 0, 2, 255, 4, 0, 3, 255, 8, 0, 2, 255, 24, 0, 2, 255, 31, 0, 2, 255, 14, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 2, 255, 5, 0, 3, 255, 13, 0, 3, 0, 0, 0, 2, 255, 13, 0, 3, 255, 10, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 255, 18, 0, 3, 255, 31, 0, 3, 255, 8, 0, 2, 255, 14, 0, 3, 255, 7, 0, 2, 0, 2, 0, 0, 2, 0, 0, 0, 2, 255, 7, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 7, 0, 2, 255, 12, 0, 3, 255, 10, 0, 2, 255, 7, 0, 2, 255, 5, 0, 15, 255, 8, 0, 2, 255, 31, 0, 2, 255, 72, 0, 3, 255, 16, 0, 2, 255, 14, 0, 3, 255, 16, 0, 2, 255, 5, 0, 3, 255, 31, 0, 3, 255, 68, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 20, 0, 3, 255, 38, 0, 2, 255, 31, 0, 2, 255, 35, 0, 3, 0, 0, 2, 255, 20, 0, 2, 255, 7, 0, 3, 0, 0, 15, 0, 2, 255, 14, 0, 15, 0, 0, 2, 2, 255, 5, 0, 2, 255, 5, 0, 2, 15, 255, 14, 0, 2, 255, 7, 0, 3, 255, 9, 0, 2, 255, 16, 0, 15, 255, 4, 0, 3, 255, 65, 0,
|
|
||||||
0, 0, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 9, 0, 2, 255, 4, 0, 3, 255, 8, 0, 2, 255, 17, 0, 2, 255, 4, 0, 3, 255, 8, 0, 2, 255, 24, 0, 2, 255, 31, 0, 2, 255, 14, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 2, 255, 5, 0, 3, 255, 13, 0, 3, 0, 0, 0, 2, 255, 13, 0, 3, 255, 10, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 255, 18, 0, 3, 255, 31, 0, 3, 255, 7, 0, 15, 2, 0, 15, 255, 12, 0, 3, 255, 16, 0, 2, 2, 255, 6, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 22, 0, 2, 255, 31, 0, 2, 255, 72, 0, 3, 255, 16, 0, 2, 255, 14, 0, 3, 255, 16, 0, 2, 255, 5, 0, 3, 255, 31, 0, 3, 255, 68, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 20, 0, 3, 255, 38, 0, 2, 255, 31, 0, 2, 255, 5, 0, 15, 2, 0, 15, 255, 14, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 255, 16, 0, 15, 0, 2, 0, 0, 15, 255, 4, 0, 3, 255, 4, 0, 2, 255, 17, 0, 2, 2, 15, 0, 0, 0, 15, 255, 7, 0, 2, 255, 22, 0, 3, 255, 33, 0,
|
|
||||||
255, 11, 0, 3, 255, 23, 0, 3, 255, 7, 0, 3, 255, 15, 0, 3, 255, 7, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 9, 0, 2, 255, 4, 0, 3, 255, 8, 0, 2, 255, 17, 0, 2, 255, 4, 0, 3, 255, 8, 0, 2, 255, 24, 0, 2, 255, 31, 0, 2, 255, 14, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 2, 255, 5, 0, 3, 255, 13, 0, 3, 0, 0, 0, 2, 255, 13, 0, 3, 255, 10, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 14, 0, 15, 255, 5, 0, 3, 0, 0, 0, 2, 255, 22, 0, 2, 0, 0, 2, 15, 3, 255, 18, 0, 3, 255, 31, 0, 3, 255, 8, 0, 2, 255, 14, 0, 3, 255, 24, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 22, 0, 2, 255, 31, 0, 2, 255, 72, 0, 3, 255, 16, 0, 2, 255, 14, 0, 3, 255, 16, 0, 2, 255, 5, 0, 3, 255, 31, 0, 3, 255, 68, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 4, 0, 15, 255, 15, 0, 3, 255, 12, 0, 2, 0, 0, 2, 255, 21, 0, 15, 2, 255, 4, 0, 15, 255, 19, 0, 15, 2, 0, 0, 0, 15, 2, 2, 15, 0, 15, 255, 25, 0, 2, 0, 0, 0, 2, 0, 0, 3, 255, 23, 0, 2, 255, 37, 0,
|
|
||||||
255, 17, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 21, 0, 3, 255, 23, 0, 3, 255, 7, 0, 3, 255, 15, 0, 3, 255, 7, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 9, 0, 2, 255, 4, 0, 3, 255, 8, 0, 2, 255, 17, 0, 2, 255, 4, 0, 3, 255, 8, 0, 2, 255, 24, 0, 2, 255, 31, 0, 2, 255, 14, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 2, 255, 5, 0, 15, 2, 255, 12, 0, 3, 0, 0, 0, 2, 255, 13, 0, 3, 255, 5, 0, 2, 255, 4, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 8, 0, 15, 255, 11, 0, 3, 0, 0, 0, 2, 255, 13, 0, 15, 255, 13, 0, 3, 255, 18, 0, 3, 255, 55, 0, 3, 255, 24, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 22, 0, 2, 255, 31, 0, 2, 255, 72, 0, 3, 255, 16, 0, 2, 255, 14, 0, 3, 255, 16, 0, 2, 255, 5, 0, 3, 255, 31, 0, 3, 255, 41, 0, 2, 255, 20, 0, 15, 255, 5, 0, 2, 15, 255, 19, 0, 3, 255, 5, 0, 2, 0, 0, 0, 15, 2, 2, 255, 19, 0, 3, 255, 4, 0, 2, 15, 0, 2, 0, 2, 255, 28, 0, 2, 255, 31, 0, 2, 255, 33, 0,
|
|
||||||
0, 0, 0, 2, 255, 7, 0, 2, 255, 15, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 13, 0, 3, 255, 9, 0, 2, 255, 21, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 21, 0, 3, 255, 23, 0, 3, 255, 7, 0, 3, 255, 15, 0, 3, 255, 7, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 9, 0, 2, 255, 4, 0, 3, 255, 8, 0, 2, 255, 17, 0, 2, 255, 4, 0, 3, 255, 8, 0, 2, 255, 24, 0, 2, 255, 24, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 0, 0, 0, 2, 0, 15, 255, 4, 0, 15, 255, 20, 0, 3, 0, 15, 0, 2, 2, 255, 4, 0, 3, 255, 13, 0, 3, 0, 0, 0, 2, 255, 6, 0, 2, 255, 17, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 255, 74, 0, 3, 255, 24, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 22, 0, 2, 255, 31, 0, 2, 255, 72, 0, 3, 255, 16, 0, 2, 255, 14, 0, 3, 255, 16, 0, 2, 255, 5, 0, 3, 255, 6, 0, 15, 255, 22, 0, 15, 2, 3, 0, 0, 15, 0, 0, 2, 255, 29, 0, 2, 255, 27, 0, 2, 255, 4, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 20, 0, 3, 255, 40, 0,
|
|
||||||
0, 3, 255, 5, 0, 3, 255, 31, 0, 3, 0, 0, 0, 2, 255, 18, 0, 3, 255, 4, 0, 2, 255, 7, 0, 2, 255, 15, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 13, 0, 3, 255, 9, 0, 2, 255, 21, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 21, 0, 3, 255, 23, 0, 3, 255, 7, 0, 3, 255, 15, 0, 3, 255, 7, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 9, 0, 2, 255, 4, 0, 3, 255, 8, 0, 2, 255, 16, 0, 15, 2, 0, 15, 0, 0, 3, 255, 8, 0, 2, 255, 13, 0, 2, 15, 0, 0, 0, 2, 255, 5, 0, 2, 255, 15, 0, 15, 2, 255, 14, 0, 2, 255, 14, 0, 3, 0, 0, 0, 15, 255, 27, 0, 3, 0, 0, 0, 2, 255, 19, 0, 3, 0, 0, 0, 2, 255, 24, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 255, 74, 0, 3, 255, 24, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 22, 0, 2, 255, 31, 0, 2, 255, 70, 0, 2, 15, 3, 255, 16, 0, 2, 0, 0, 0, 2, 255, 4, 0, 2, 255, 5, 0, 3, 255, 16, 0, 2, 15, 255, 4, 0, 3, 255, 31, 0, 3, 255, 24, 0, 15, 255, 73, 0,
|
|
||||||
255, 14, 0, 3, 0, 0, 2, 0, 0, 0, 3, 255, 11, 0, 3, 255, 15, 0, 2, 0, 0, 0, 3, 255, 11, 0, 3, 255, 5, 0, 3, 255, 31, 0, 3, 0, 0, 0, 2, 255, 18, 0, 3, 255, 4, 0, 2, 255, 7, 0, 2, 255, 15, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 13, 0, 3, 255, 9, 0, 2, 255, 21, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 21, 0, 3, 255, 23, 0, 3, 255, 7, 0, 3, 0, 0, 15, 255, 12, 0, 3, 255, 7, 0, 3, 0, 0, 2, 255, 8, 0, 2, 0, 0, 2, 15, 255, 7, 0, 3, 255, 10, 0, 2, 255, 6, 0, 2, 0, 0, 2, 255, 4, 0, 3, 255, 8, 0, 2, 255, 8, 0, 2, 0, 0, 15, 255, 5, 0, 2, 255, 4, 0, 3, 255, 8, 0, 2, 255, 11, 0, 2, 255, 12, 0, 2, 255, 31, 0, 2, 255, 14, 0, 3, 255, 31, 0, 3, 255, 23, 0, 3, 0, 0, 0, 2, 255, 24, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 255, 74, 0, 3, 255, 24, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 22, 0, 2, 255, 31, 0, 2, 255, 7, 0, 2, 255, 19, 0, 15, 255, 30, 0, 2, 255, 13, 0, 3, 255, 15, 0, 15, 2, 255, 14, 0, 3, 255, 15, 0, 2, 2, 255, 5, 0, 3, 255, 31, 0, 3, 255, 34, 0,
|
|
||||||
255, 7, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 15, 0, 3, 255, 15, 0, 2, 255, 15, 0, 3, 0, 0, 2, 0, 0, 0, 3, 255, 11, 0, 3, 255, 15, 0, 2, 0, 0, 0, 3, 255, 11, 0, 3, 255, 5, 0, 3, 255, 31, 0, 3, 0, 0, 0, 2, 255, 18, 0, 3, 255, 4, 0, 2, 255, 7, 0, 2, 255, 15, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 13, 0, 3, 255, 9, 0, 2, 255, 21, 0, 3, 0, 0, 0, 2, 255, 23, 0, 15, 2, 255, 6, 0, 2, 255, 21, 0, 3, 255, 7, 0, 2, 255, 15, 0, 3, 255, 7, 0, 3, 255, 8, 0, 15, 255, 6, 0, 3, 255, 7, 0, 3, 0, 0, 2, 0, 0, 0, 2, 255, 16, 0, 3, 255, 10, 0, 2, 255, 14, 0, 3, 255, 8, 0, 2, 255, 22, 0, 3, 255, 8, 0, 2, 255, 24, 0, 2, 255, 31, 0, 2, 255, 14, 0, 3, 255, 31, 0, 3, 255, 23, 0, 3, 0, 0, 0, 2, 255, 24, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 255, 74, 0, 3, 255, 24, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 18, 0, 2, 15, 0, 0, 2, 255, 24, 0, 15, 255, 6, 0, 2, 255, 24, 0, 2, 255, 16, 0, 15, 255, 20, 0, 15, 255, 9, 0, 3, 255, 16, 0, 2, 255, 40, 0,
|
|
||||||
0, 2, 255, 19, 0, 2, 255, 11, 0, 2, 255, 5, 0, 2, 255, 18, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 15, 0, 3, 255, 15, 0, 2, 255, 15, 0, 3, 0, 0, 2, 0, 0, 0, 3, 255, 11, 0, 3, 255, 15, 0, 2, 0, 0, 0, 3, 255, 11, 0, 3, 255, 5, 0, 3, 255, 31, 0, 3, 0, 0, 0, 2, 255, 18, 0, 3, 255, 4, 0, 2, 255, 7, 0, 2, 255, 15, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 9, 0, 2, 0, 0, 0, 3, 255, 9, 0, 2, 255, 21, 0, 3, 0, 0, 0, 2, 255, 30, 0, 2, 2, 255, 21, 0, 3, 255, 23, 0, 3, 255, 7, 0, 3, 255, 8, 0, 15, 255, 6, 0, 3, 255, 7, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 14, 0, 3, 255, 8, 0, 2, 255, 31, 0, 2, 255, 24, 0, 2, 255, 31, 0, 2, 255, 14, 0, 3, 255, 31, 0, 3, 255, 23, 0, 3, 0, 0, 0, 2, 255, 24, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 255, 74, 0, 3, 255, 23, 0, 2, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 15, 0, 2, 255, 4, 0, 3, 255, 9, 0, 15, 2, 15, 255, 19, 0, 15, 0, 2, 255, 9, 0, 2, 255, 20, 0, 2, 15, 255, 66, 0,
|
|
||||||
255, 10, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 6, 0, 2, 255, 11, 0, 2, 255, 19, 0, 2, 255, 11, 0, 2, 255, 5, 0, 2, 255, 18, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 15, 0, 3, 255, 15, 0, 2, 255, 15, 0, 3, 0, 0, 2, 0, 0, 0, 3, 255, 11, 0, 3, 255, 15, 0, 2, 0, 0, 0, 3, 255, 11, 0, 3, 255, 5, 0, 3, 255, 31, 0, 3, 0, 0, 0, 2, 255, 18, 0, 3, 255, 4, 0, 2, 255, 7, 0, 2, 255, 15, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 13, 0, 3, 255, 9, 0, 2, 255, 21, 0, 3, 0, 0, 15, 2, 255, 30, 0, 2, 2, 15, 255, 44, 0, 3, 255, 23, 0, 3, 255, 7, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 23, 0, 2, 255, 31, 0, 2, 255, 24, 0, 2, 255, 31, 0, 2, 255, 14, 0, 3, 255, 31, 0, 3, 255, 23, 0, 3, 0, 0, 0, 2, 255, 24, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 255, 44, 0, 15, 0, 0, 15, 255, 26, 0, 3, 0, 0, 2, 0, 2, 255, 18, 0, 15, 3, 0, 15, 255, 4, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 0, 2, 255, 8, 0, 2, 255, 22, 0, 2, 255, 34, 0,
|
|
||||||
255, 4, 0, 3, 255, 12, 0, 3, 255, 8, 0, 2, 255, 9, 0, 3, 255, 5, 0, 3, 255, 15, 0, 2, 255, 15, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 6, 0, 2, 255, 11, 0, 2, 255, 19, 0, 2, 255, 11, 0, 2, 255, 5, 0, 2, 255, 18, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 15, 0, 3, 255, 15, 0, 2, 255, 15, 0, 3, 0, 0, 2, 0, 0, 0, 3, 255, 11, 0, 3, 255, 15, 0, 2, 0, 0, 0, 3, 255, 11, 0, 3, 255, 5, 0, 3, 255, 31, 0, 3, 0, 0, 0, 2, 255, 6, 0, 15, 0, 15, 255, 9, 0, 3, 255, 4, 0, 2, 255, 7, 0, 2, 255, 8, 0, 2, 0, 0, 15, 0, 0, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 18, 0, 2, 255, 4, 0, 2, 255, 25, 0, 2, 255, 31, 0, 2, 255, 45, 0, 3, 255, 23, 0, 3, 255, 7, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 23, 0, 2, 255, 31, 0, 2, 255, 24, 0, 2, 255, 31, 0, 2, 255, 14, 0, 3, 255, 31, 0, 3, 255, 23, 0, 3, 0, 0, 0, 2, 255, 24, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 5, 0, 15, 255, 14, 0, 3, 0, 0, 0, 2, 255, 7, 0, 15, 2, 0, 0, 2, 255, 15, 0, 3, 255, 5, 0, 15, 255, 27, 0, 15, 2, 0, 0, 2, 255, 5, 0, 15, 255, 24, 0, 15, 255, 5, 0, 3, 255, 24, 0, 3, 255, 36, 0,
|
|
||||||
255, 29, 0, 3, 255, 19, 0, 3, 255, 18, 0, 3, 255, 12, 0, 3, 255, 8, 0, 2, 255, 9, 0, 3, 255, 5, 0, 3, 255, 15, 0, 2, 255, 15, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 6, 0, 2, 255, 11, 0, 2, 255, 19, 0, 2, 255, 11, 0, 2, 255, 5, 0, 2, 255, 18, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 15, 0, 3, 255, 15, 0, 2, 255, 15, 0, 3, 0, 0, 2, 15, 0, 0, 3, 255, 11, 0, 3, 255, 14, 0, 15, 2, 2, 0, 2, 3, 255, 11, 0, 3, 255, 5, 0, 3, 255, 15, 0, 2, 15, 255, 14, 0, 3, 0, 0, 0, 2, 255, 18, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 255, 103, 0, 3, 255, 23, 0, 3, 255, 7, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 23, 0, 2, 255, 31, 0, 2, 255, 24, 0, 2, 255, 31, 0, 2, 255, 14, 0, 3, 255, 31, 0, 3, 0, 2, 255, 21, 0, 3, 0, 0, 0, 2, 2, 255, 23, 0, 2, 0, 2, 3, 0, 0, 0, 15, 15, 255, 19, 0, 3, 0, 2, 0, 15, 0, 15, 255, 5, 0, 2, 255, 19, 0, 3, 255, 4, 0, 2, 255, 67, 0,
|
|
||||||
255, 4, 0, 2, 255, 5, 0, 2, 255, 31, 0, 2, 255, 18, 0, 3, 255, 31, 0, 3, 255, 19, 0, 3, 255, 18, 0, 3, 255, 12, 0, 3, 255, 8, 0, 2, 255, 9, 0, 3, 255, 5, 0, 3, 255, 15, 0, 2, 255, 15, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 6, 0, 2, 255, 11, 0, 2, 255, 19, 0, 2, 255, 11, 0, 2, 255, 5, 0, 2, 255, 11, 0, 15, 255, 6, 0, 3, 255, 12, 0, 2, 255, 8, 0, 15, 0, 2, 255, 7, 0, 3, 0, 0, 0, 2, 255, 15, 0, 3, 0, 2, 255, 13, 0, 2, 255, 15, 0, 3, 0, 0, 2, 0, 0, 0, 3, 0, 0, 2, 255, 8, 0, 3, 255, 19, 0, 3, 255, 11, 0, 3, 255, 5, 0, 3, 255, 31, 0, 3, 255, 22, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 255, 103, 0, 3, 255, 23, 0, 3, 255, 7, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 23, 0, 2, 255, 31, 0, 2, 255, 24, 0, 2, 255, 31, 0, 2, 255, 10, 0, 15, 0, 15, 0, 3, 255, 20, 0, 15, 255, 6, 0, 2, 2, 0, 0, 3, 255, 17, 0, 15, 0, 0, 2, 0, 2, 3, 0, 0, 0, 2, 255, 19, 0, 15, 255, 4, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 0, 0, 0, 2, 255, 36, 0,
|
|
||||||
255, 17, 0, 2, 255, 4, 0, 3, 255, 13, 0, 2, 255, 12, 0, 2, 255, 18, 0, 2, 255, 5, 0, 2, 255, 31, 0, 2, 255, 18, 0, 3, 255, 31, 0, 3, 255, 19, 0, 3, 255, 18, 0, 3, 255, 12, 0, 3, 255, 8, 0, 2, 255, 9, 0, 3, 255, 5, 0, 3, 255, 15, 0, 2, 255, 15, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 15, 0, 0, 0, 2, 0, 2, 255, 11, 0, 2, 255, 14, 0, 2, 255, 4, 0, 2, 255, 11, 0, 2, 255, 5, 0, 2, 255, 5, 0, 15, 255, 12, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 22, 0, 3, 255, 11, 0, 3, 255, 19, 0, 3, 255, 11, 0, 3, 255, 5, 0, 3, 255, 31, 0, 3, 255, 22, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 255, 103, 0, 3, 255, 23, 0, 3, 255, 7, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 23, 0, 2, 0, 0, 0, 15, 255, 23, 0, 15, 0, 0, 0, 2, 0, 0, 0, 2, 0, 2, 15, 255, 17, 0, 2, 15, 0, 0, 2, 255, 26, 0, 15, 2, 2, 255, 13, 0, 3, 255, 15, 0, 2, 255, 6, 0, 15, 255, 8, 0, 3, 255, 23, 0, 3, 255, 33, 0,
|
|
||||||
0, 0, 0, 3, 255, 8, 0, 3, 255, 16, 0, 2, 255, 5, 0, 3, 255, 8, 0, 3, 255, 9, 0, 3, 255, 6, 0, 2, 255, 19, 0, 2, 255, 4, 0, 3, 255, 13, 0, 2, 255, 12, 0, 2, 255, 18, 0, 2, 255, 5, 0, 2, 255, 31, 0, 2, 255, 18, 0, 3, 255, 31, 0, 3, 255, 19, 0, 3, 255, 18, 0, 3, 255, 12, 0, 3, 255, 8, 0, 2, 255, 9, 0, 3, 255, 5, 0, 3, 0, 0, 0, 15, 2, 255, 10, 0, 2, 255, 15, 0, 3, 0, 15, 0, 2, 255, 30, 0, 2, 15, 255, 6, 0, 2, 255, 11, 0, 2, 255, 19, 0, 15, 255, 11, 0, 2, 255, 5, 0, 2, 255, 18, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 34, 0, 3, 255, 31, 0, 3, 255, 5, 0, 3, 255, 31, 0, 3, 255, 22, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 255, 103, 0, 3, 255, 23, 0, 3, 255, 6, 0, 2, 3, 0, 0, 2, 255, 18, 0, 15, 2, 3, 255, 9, 0, 2, 2, 255, 15, 0, 15, 0, 2, 255, 5, 0, 15, 255, 23, 0, 2, 255, 5, 0, 15, 0, 2, 255, 8, 0, 15, 255, 15, 0, 2, 255, 5, 0, 2, 255, 25, 0, 2, 255, 40, 0,
|
|
||||||
255, 67, 0, 3, 255, 8, 0, 3, 255, 16, 0, 2, 255, 5, 0, 3, 255, 8, 0, 3, 255, 9, 0, 3, 255, 6, 0, 2, 255, 19, 0, 2, 255, 4, 0, 3, 255, 13, 0, 2, 255, 12, 0, 2, 255, 18, 0, 2, 255, 5, 0, 2, 255, 31, 0, 2, 255, 18, 0, 3, 255, 31, 0, 3, 255, 16, 0, 2, 0, 0, 3, 255, 18, 0, 3, 255, 6, 0, 15, 2, 0, 0, 15, 0, 3, 255, 8, 0, 2, 255, 9, 0, 3, 255, 5, 0, 3, 0, 0, 0, 2, 255, 6, 0, 15, 255, 4, 0, 2, 255, 15, 0, 3, 0, 0, 0, 2, 255, 6, 0, 2, 255, 31, 0, 2, 255, 11, 0, 2, 255, 19, 0, 2, 15, 255, 10, 0, 2, 255, 5, 0, 2, 255, 18, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 34, 0, 3, 255, 31, 0, 3, 255, 5, 0, 3, 255, 31, 0, 3, 255, 22, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 255, 93, 0, 2, 15, 0, 0, 0, 15, 255, 4, 0, 3, 255, 18, 0, 2, 255, 4, 0, 3, 0, 0, 2, 255, 4, 0, 3, 0, 0, 2, 15, 255, 19, 0, 3, 2, 255, 9, 0, 15, 2, 255, 22, 0, 2, 255, 31, 0, 2, 255, 33, 0,
|
|
||||||
0, 0, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 9, 0, 2, 0, 0, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 76, 0, 3, 255, 8, 0, 3, 255, 16, 0, 2, 255, 5, 0, 3, 255, 8, 0, 3, 255, 9, 0, 3, 255, 6, 0, 2, 255, 19, 0, 2, 255, 4, 0, 3, 255, 13, 0, 2, 255, 12, 0, 2, 255, 18, 0, 2, 255, 5, 0, 2, 255, 31, 0, 2, 255, 5, 0, 15, 255, 12, 0, 3, 255, 13, 0, 2, 0, 0, 0, 2, 255, 5, 0, 15, 255, 7, 0, 3, 255, 12, 0, 15, 255, 6, 0, 3, 0, 0, 0, 2, 255, 14, 0, 3, 255, 12, 0, 3, 255, 8, 0, 2, 255, 9, 0, 3, 255, 5, 0, 3, 255, 12, 0, 15, 0, 0, 2, 255, 15, 0, 3, 255, 11, 0, 2, 255, 30, 0, 2, 255, 11, 0, 2, 255, 31, 0, 2, 255, 5, 0, 2, 255, 18, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 34, 0, 3, 255, 31, 0, 3, 255, 5, 0, 3, 255, 31, 0, 3, 255, 22, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 255, 30, 0, 2, 0, 0, 0, 2, 255, 9, 0, 15, 255, 29, 0, 15, 2, 255, 27, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 7, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 36, 0,
|
|
||||||
255, 18, 0, 3, 255, 16, 0, 2, 255, 8, 0, 2, 255, 5, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 9, 0, 2, 0, 0, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 76, 0, 3, 255, 8, 0, 3, 255, 16, 0, 2, 255, 5, 0, 3, 255, 8, 0, 3, 255, 9, 0, 3, 255, 6, 0, 2, 255, 19, 0, 2, 255, 4, 0, 3, 255, 13, 0, 2, 255, 11, 0, 2, 2, 255, 18, 0, 2, 255, 5, 0, 2, 255, 10, 0, 2, 255, 26, 0, 15, 255, 12, 0, 3, 255, 31, 0, 3, 255, 11, 0, 15, 255, 13, 0, 2, 15, 255, 11, 0, 3, 255, 21, 0, 2, 255, 9, 0, 3, 255, 21, 0, 2, 255, 70, 0, 2, 255, 31, 0, 2, 255, 5, 0, 2, 255, 18, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 34, 0, 3, 255, 31, 0, 3, 255, 5, 0, 3, 255, 31, 0, 3, 255, 22, 0, 3, 255, 4, 0, 2, 0, 15, 255, 21, 0, 2, 0, 0, 3, 255, 4, 0, 15, 255, 4, 0, 2, 255, 17, 0, 15, 2, 255, 10, 0, 2, 255, 29, 0, 15, 255, 23, 0, 15, 255, 67, 0,
|
|
||||||
255, 7, 0, 2, 255, 6, 0, 3, 255, 15, 0, 3, 255, 31, 0, 3, 255, 19, 0, 3, 255, 16, 0, 2, 255, 8, 0, 2, 255, 5, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 9, 0, 2, 0, 0, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 76, 0, 3, 255, 8, 0, 3, 255, 16, 0, 2, 255, 5, 0, 3, 255, 8, 0, 3, 255, 9, 0, 3, 255, 6, 0, 2, 255, 12, 0, 15, 255, 4, 0, 15, 0, 2, 255, 4, 0, 3, 255, 13, 0, 2, 255, 5, 0, 2, 255, 5, 0, 2, 15, 255, 18, 0, 2, 0, 0, 0, 15, 0, 2, 15, 255, 29, 0, 2, 2, 255, 13, 0, 2, 255, 4, 0, 3, 255, 27, 0, 15, 0, 0, 0, 3, 255, 38, 0, 3, 255, 21, 0, 2, 255, 9, 0, 3, 255, 21, 0, 2, 255, 70, 0, 2, 255, 31, 0, 2, 255, 5, 0, 2, 255, 18, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 34, 0, 3, 255, 31, 0, 3, 0, 15, 0, 2, 0, 3, 255, 17, 0, 15, 255, 9, 0, 2, 0, 0, 0, 3, 255, 18, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 0, 15, 255, 21, 0, 2, 15, 0, 3, 255, 4, 0, 2, 2, 255, 22, 0, 2, 2, 255, 67, 0,
|
|
||||||
0, 0, 3, 255, 15, 0, 2, 255, 7, 0, 2, 255, 7, 0, 3, 255, 4, 0, 2, 255, 6, 0, 3, 255, 11, 0, 2, 255, 12, 0, 2, 255, 6, 0, 3, 255, 15, 0, 3, 255, 31, 0, 3, 255, 19, 0, 3, 255, 16, 0, 2, 255, 8, 0, 2, 255, 5, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 9, 0, 2, 0, 0, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 51, 0, 15, 255, 24, 0, 3, 255, 6, 0, 2, 0, 3, 0, 15, 2, 0, 0, 15, 255, 10, 0, 2, 255, 5, 0, 3, 255, 8, 0, 15, 255, 4, 0, 2, 255, 4, 0, 3, 255, 6, 0, 2, 255, 9, 0, 15, 2, 0, 0, 2, 255, 5, 0, 2, 255, 4, 0, 3, 255, 13, 0, 2, 255, 31, 0, 2, 255, 5, 0, 2, 255, 14, 0, 2, 255, 35, 0, 3, 255, 31, 0, 3, 255, 38, 0, 3, 255, 21, 0, 2, 255, 9, 0, 3, 255, 21, 0, 2, 255, 70, 0, 2, 255, 31, 0, 2, 255, 5, 0, 2, 255, 18, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 4, 0, 15, 255, 26, 0, 2, 255, 4, 0, 2, 255, 20, 0, 15, 2, 255, 7, 0, 3, 255, 26, 0, 15, 255, 4, 0, 3, 0, 0, 0, 2, 15, 3, 255, 20, 0, 2, 255, 10, 0, 3, 255, 22, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 0, 0, 3, 255, 33, 0,
|
|
||||||
255, 30, 0, 2, 255, 19, 0, 2, 255, 15, 0, 3, 255, 15, 0, 2, 255, 7, 0, 2, 255, 7, 0, 3, 255, 4, 0, 2, 255, 6, 0, 3, 255, 11, 0, 2, 255, 12, 0, 2, 255, 6, 0, 3, 255, 15, 0, 3, 255, 31, 0, 3, 255, 19, 0, 3, 255, 16, 0, 2, 255, 8, 0, 2, 255, 5, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 9, 0, 2, 0, 0, 0, 3, 255, 12, 0, 3, 0, 0, 2, 255, 11, 0, 2, 255, 23, 0, 2, 0, 0, 0, 2, 15, 255, 23, 0, 15, 3, 15, 255, 21, 0, 3, 0, 0, 15, 2, 255, 4, 0, 3, 255, 16, 0, 2, 255, 5, 0, 3, 255, 18, 0, 3, 255, 6, 0, 2, 255, 24, 0, 3, 255, 13, 0, 2, 255, 31, 0, 2, 255, 56, 0, 3, 255, 31, 0, 3, 255, 38, 0, 3, 255, 21, 0, 2, 255, 9, 0, 3, 255, 21, 0, 2, 255, 70, 0, 2, 255, 31, 0, 2, 0, 2, 0, 0, 0, 2, 255, 18, 0, 3, 255, 12, 0, 2, 255, 16, 0, 2, 0, 3, 0, 0, 15, 2, 255, 29, 0, 2, 0, 2, 255, 7, 0, 2, 0, 15, 255, 24, 0, 3, 255, 4, 0, 15, 255, 24, 0, 15, 0, 3, 255, 5, 0, 3, 255, 56, 0,
|
|
||||||
0, 0, 2, 255, 7, 0, 3, 0, 0, 0, 2, 255, 8, 0, 3, 255, 18, 0, 3, 0, 0, 0, 2, 255, 15, 0, 2, 255, 31, 0, 2, 255, 19, 0, 2, 255, 15, 0, 3, 255, 15, 0, 2, 255, 7, 0, 2, 255, 7, 0, 3, 255, 4, 0, 2, 255, 6, 0, 3, 255, 11, 0, 2, 255, 12, 0, 2, 255, 6, 0, 3, 255, 15, 0, 3, 255, 31, 0, 3, 255, 19, 0, 3, 255, 16, 0, 2, 255, 8, 0, 2, 255, 5, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 0, 0, 15, 0, 15, 255, 6, 0, 2, 0, 0, 2, 0, 0, 0, 3, 255, 12, 0, 3, 0, 0, 0, 2, 0, 2, 255, 8, 0, 2, 255, 15, 0, 2, 255, 60, 0, 3, 255, 25, 0, 2, 255, 5, 0, 3, 255, 18, 0, 3, 255, 6, 0, 2, 255, 24, 0, 3, 255, 13, 0, 2, 255, 31, 0, 2, 255, 56, 0, 3, 255, 31, 0, 3, 255, 38, 0, 3, 255, 21, 0, 2, 255, 9, 0, 3, 255, 21, 0, 2, 255, 70, 0, 2, 255, 27, 0, 2, 0, 0, 0, 2, 255, 5, 0, 2, 255, 18, 0, 3, 255, 10, 0, 15, 0, 15, 2, 255, 17, 0, 3, 0, 0, 0, 2, 15, 255, 6, 0, 2, 255, 23, 0, 15, 2, 255, 64, 0,
|
|
||||||
255, 34, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 7, 0, 3, 0, 0, 0, 2, 255, 8, 0, 3, 255, 18, 0, 3, 0, 0, 0, 2, 255, 15, 0, 2, 255, 31, 0, 2, 255, 19, 0, 2, 255, 15, 0, 3, 255, 15, 0, 2, 255, 7, 0, 2, 255, 7, 0, 3, 255, 4, 0, 2, 255, 6, 0, 3, 255, 11, 0, 2, 255, 12, 0, 2, 255, 6, 0, 3, 255, 15, 0, 3, 255, 13, 0, 15, 255, 17, 0, 3, 255, 10, 0, 15, 2, 0, 2, 255, 5, 0, 3, 255, 16, 0, 2, 255, 8, 0, 2, 15, 255, 4, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 9, 0, 2, 0, 0, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 76, 0, 3, 255, 25, 0, 2, 255, 5, 0, 3, 255, 18, 0, 3, 255, 6, 0, 2, 255, 24, 0, 3, 255, 13, 0, 2, 255, 31, 0, 2, 255, 56, 0, 3, 255, 31, 0, 3, 255, 38, 0, 3, 255, 21, 0, 2, 255, 9, 0, 3, 255, 21, 0, 2, 255, 44, 0, 15, 255, 25, 0, 2, 0, 0, 15, 2, 0, 2, 255, 21, 0, 15, 0, 2, 0, 2, 255, 5, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 8, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 33, 0,
|
|
||||||
255, 10, 0, 2, 255, 18, 0, 3, 255, 68, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 7, 0, 3, 0, 0, 0, 2, 255, 8, 0, 3, 255, 18, 0, 3, 0, 0, 0, 2, 255, 15, 0, 2, 255, 31, 0, 2, 255, 19, 0, 2, 255, 15, 0, 3, 255, 8, 0, 15, 255, 6, 0, 2, 255, 7, 0, 2, 255, 7, 0, 3, 255, 4, 0, 2, 255, 4, 0, 2, 0, 3, 255, 11, 0, 2, 255, 12, 0, 2, 0, 2, 255, 4, 0, 15, 255, 15, 0, 3, 255, 14, 0, 2, 255, 5, 0, 15, 255, 10, 0, 3, 255, 19, 0, 3, 255, 16, 0, 2, 255, 22, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 255, 14, 0, 2, 0, 0, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 76, 0, 3, 255, 25, 0, 2, 255, 5, 0, 3, 255, 18, 0, 3, 255, 6, 0, 2, 255, 24, 0, 3, 255, 13, 0, 2, 255, 31, 0, 2, 255, 56, 0, 3, 255, 31, 0, 3, 255, 38, 0, 3, 0, 0, 15, 255, 18, 0, 2, 255, 9, 0, 3, 0, 0, 2, 255, 18, 0, 2, 255, 9, 0, 2, 255, 23, 0, 15, 2, 255, 5, 0, 15, 255, 21, 0, 15, 255, 7, 0, 2, 255, 62, 0
|
|
||||||
};
|
|
||||||
uint16_t animation_couple_rain_delays[] = {60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60};
|
|
||||||
uint16_t animation_couple_rain_offsets[] = {0, 475, 718, 961, 1222, 1476, 1734, 2002, 2276, 2528, 2787, 3050, 3304, 3567, 3824, 4106, 4382, 4650, 4916, 5208, 5459, 5731, 5988, 6243, 6497, 6769, 7004, 7263, 7543, 7790, 8035, 8288, 8522};
|
|
||||||
AnimationData animation_couple_rain = {&animation_couple_rain_colors[0], &animation_couple_rain_data[0], &animation_couple_rain_offsets[0], &animation_couple_rain_delays[0], false, 15, 32, 32, 32};
|
|
||||||
|
|
||||||
|
|
||||||
uint8_t animation_couple_snow_colors[] PROGMEM = {0, 0, 0, 255, 255, 255, 255, 60, 0, 248, 230, 196, 67, 47, 9, 34, 178, 10, 0, 142, 246, 246, 0, 73, 92, 0, 0, 27, 0, 255};
|
|
||||||
uint8_t animation_couple_snow_data[] PROGMEM = {
|
|
||||||
2, 3, 255, 39, 2, 3, 255, 14, 2, 3, 255, 11, 2, 3, 255, 10, 2, 3, 255, 45, 2, 3, 255, 24, 2, 3, 255, 47, 2, 3, 255, 6, 2, 3, 255, 36, 2, 3, 255, 10, 2, 3, 255, 4, 2, 3, 255, 21, 2, 3, 255, 16, 2, 3, 255, 84, 2, 3, 255, 20, 2, 3, 255, 18, 2, 3, 255, 7, 2, 3, 255, 40, 2, 3, 255, 42, 2, 3, 255, 25, 2, 3, 255, 12, 2, 3, 255, 9, 2, 3, 255, 27, 2, 3, 255, 8, 2, 3, 255, 6, 2, 3, 2, 2, 2, 3, 255, 9, 2, 5, 2, 2, 2, 5, 255, 25, 2, 4, 4, 4, 2, 2, 2, 9, 9, 9, 255, 22, 2, 255, 5, 4, 2, 255, 5, 9, 255, 4, 2, 3, 255, 16, 2, 255, 5, 4, 2, 9, 10, 10, 5, 9, 255, 16, 2, 3, 255, 4, 2, 4, 6, 5, 6, 4, 2, 9, 6, 5, 6, 9, 255, 12, 2, 3, 255, 9, 2, 5, 5, 5, 2, 2, 10, 5, 5, 5, 10, 255, 7, 2, 3, 255, 14, 2, 7, 7, 7, 2, 2, 2, 11, 11, 11, 255, 22, 2, 4, 4, 7, 4, 4, 2, 9, 9, 11, 9, 255, 4, 2, 3, 255, 17, 2, 4, 4, 7, 4, 4, 9, 9, 9, 11, 9, 9, 255, 8, 2, 3, 2, 2, 2, 3, 255, 8, 2, 5, 8, 8, 8, 2, 5, 2, 9, 9, 9, 5, 255, 18, 2, 3, 2, 2, 2, 8, 2, 8, 2, 2, 2, 8, 2, 8, 255, 22, 2, 6, 6, 2, 6, 6, 2, 2, 6, 2, 6, 255, 12, 2, 255, 32, 3,
|
|
||||||
0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 53, 0, 2, 255, 31, 0, 3, 255, 11, 0, 2, 255, 27, 0, 2, 0, 0, 0, 3, 255, 22, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 31, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 56, 0,
|
|
||||||
255, 15, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 20, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 53, 0, 2, 255, 31, 0, 3, 255, 11, 0, 2, 255, 27, 0, 2, 0, 0, 0, 3, 255, 22, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 31, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 56, 0,
|
|
||||||
255, 7, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 20, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 53, 0, 2, 255, 31, 0, 3, 255, 11, 0, 2, 255, 27, 0, 2, 0, 0, 0, 3, 255, 22, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 31, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 27, 0, 3, 255, 34, 0,
|
|
||||||
0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 18, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 20, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 53, 0, 2, 255, 31, 0, 3, 255, 11, 0, 2, 255, 27, 0, 2, 0, 0, 0, 3, 255, 22, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 31, 0, 3, 255, 4, 0, 2, 255, 34, 0,
|
|
||||||
0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 18, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 20, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 53, 0, 2, 255, 31, 0, 3, 255, 11, 0, 2, 255, 27, 0, 2, 0, 0, 0, 3, 255, 22, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 39, 0,
|
|
||||||
255, 12, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 18, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 20, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 53, 0, 2, 255, 31, 0, 3, 255, 11, 0, 2, 255, 27, 0, 2, 0, 0, 0, 3, 255, 22, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 35, 0,
|
|
||||||
255, 24, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 16, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 18, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 20, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 53, 0, 2, 255, 31, 0, 3, 255, 11, 0, 2, 255, 27, 0, 2, 0, 0, 0, 3, 255, 22, 0, 2, 255, 35, 0,
|
|
||||||
0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 31, 0, 3, 255, 16, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 18, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 20, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 53, 0, 2, 255, 31, 0, 3, 255, 11, 0, 2, 255, 58, 0,
|
|
||||||
0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 31, 0, 3, 255, 7, 0, 2, 255, 31, 0, 3, 255, 16, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 18, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 20, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 53, 0, 2, 255, 31, 0, 3, 255, 38, 0,
|
|
||||||
255, 5, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 31, 0, 3, 255, 7, 0, 2, 255, 31, 0, 3, 255, 16, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 18, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 20, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 53, 0, 2, 255, 38, 0,
|
|
||||||
255, 11, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 31, 0, 3, 255, 7, 0, 2, 255, 31, 0, 3, 255, 16, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 18, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 20, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 60, 0,
|
|
||||||
255, 11, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 31, 0, 3, 255, 7, 0, 2, 255, 31, 0, 3, 255, 16, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 18, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 20, 0, 3, 255, 6, 0, 3, 255, 32, 0,
|
|
||||||
0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 21, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 31, 0, 3, 255, 7, 0, 2, 255, 31, 0, 3, 255, 16, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 18, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 6, 0, 2, 255, 32, 0,
|
|
||||||
0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 5, 255, 24, 0, 3, 255, 22, 0, 2, 255, 4, 0, 2, 255, 21, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 31, 0, 3, 255, 7, 0, 2, 255, 31, 0, 3, 255, 16, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 18, 0, 3, 255, 35, 0,
|
|
||||||
255, 9, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 31, 0, 3, 255, 22, 0, 2, 255, 4, 0, 2, 255, 21, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 31, 0, 3, 255, 7, 0, 2, 255, 31, 0, 3, 255, 16, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 35, 0,
|
|
||||||
0, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 31, 0, 3, 255, 22, 0, 2, 255, 4, 0, 2, 255, 21, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 31, 0, 3, 255, 7, 0, 2, 255, 31, 0, 3, 255, 16, 0, 2, 255, 31, 0, 3, 255, 40, 0,
|
|
||||||
0, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 31, 0, 3, 255, 22, 0, 2, 255, 4, 0, 2, 255, 21, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 31, 0, 3, 255, 7, 0, 2, 255, 31, 0, 3, 255, 16, 0, 2, 255, 40, 0,
|
|
||||||
255, 23, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 31, 0, 3, 255, 22, 0, 2, 255, 4, 0, 2, 255, 21, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 31, 0, 3, 255, 7, 0, 2, 255, 57, 0,
|
|
||||||
255, 6, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 24, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 31, 0, 3, 255, 22, 0, 2, 255, 4, 0, 2, 255, 21, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 31, 0, 3, 255, 33, 0,
|
|
||||||
255, 6, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 14, 0, 3, 255, 11, 0, 3, 255, 24, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 31, 0, 3, 255, 22, 0, 2, 255, 4, 0, 2, 255, 21, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 33, 0,
|
|
||||||
255, 19, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 14, 0, 3, 255, 11, 0, 3, 255, 24, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 31, 0, 3, 255, 22, 0, 2, 255, 4, 0, 2, 255, 21, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 54, 0,
|
|
||||||
255, 30, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 14, 0, 3, 255, 11, 0, 3, 255, 24, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 31, 0, 3, 255, 22, 0, 2, 255, 4, 0, 2, 255, 21, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 39, 0,
|
|
||||||
255, 9, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 37, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 14, 0, 3, 255, 11, 0, 3, 255, 24, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 31, 0, 3, 255, 22, 0, 2, 255, 4, 0, 2, 255, 21, 0, 2, 255, 4, 0, 3, 255, 34, 0,
|
|
||||||
0, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 50, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 14, 0, 3, 255, 11, 0, 3, 255, 24, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 31, 0, 3, 255, 22, 0, 2, 255, 34, 0,
|
|
||||||
0, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 50, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 14, 0, 3, 255, 11, 0, 3, 255, 24, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 57, 0,
|
|
||||||
255, 6, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 31, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 50, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 14, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 41, 0,
|
|
||||||
255, 6, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 31, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 50, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 5, 255, 8, 0, 3, 255, 11, 0, 3, 255, 24, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 34, 0,
|
|
||||||
255, 22, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 31, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 50, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 14, 0, 3, 255, 11, 0, 3, 255, 24, 0, 2, 255, 34, 0,
|
|
||||||
255, 22, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 22, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 31, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 50, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 14, 0, 3, 255, 39, 0,
|
|
||||||
255, 4, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 27, 0, 2, 0, 0, 0, 3, 255, 22, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 31, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 50, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 39, 0,
|
|
||||||
255, 4, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 31, 0, 3, 255, 11, 0, 2, 255, 27, 0, 2, 0, 0, 0, 3, 255, 22, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 31, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 50, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 37, 0
|
|
||||||
};
|
|
||||||
uint16_t animation_couple_snow_delays[] = {110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110};
|
|
||||||
uint16_t animation_couple_snow_offsets[] = {0, 291, 580, 875, 1162, 1443, 1728, 2023, 2310, 2583, 2864, 3151, 3445, 3746, 4035, 4320, 4609, 4905, 5205, 5502, 5803, 6108, 6417, 6722, 7011, 7295, 7583, 7884, 8189, 8486, 8779, 9068, 9354};
|
|
||||||
AnimationData animation_couple_snow = {&animation_couple_snow_colors[0], &animation_couple_snow_data[0], &animation_couple_snow_offsets[0], &animation_couple_snow_delays[0], false, 10, 32, 32, 32};
|
|
||||||
|
|
||||||
|
|
||||||
uint8_t animation_heart_colors[] PROGMEM = {255, 0, 43, 255, 141, 174, 255, 174, 206, 255, 255, 255, 255, 100, 138, 255, 122, 149};
|
|
||||||
uint8_t animation_heart_data[] PROGMEM = {
|
|
||||||
255,24,1,2,2,1,2,2,255,10,1,2,5,4,2,7,6,2,255,9,1,2,4,3,7,7,6,2,255,10,1,2,2,6,2,2,255,13,1,2,255,38,1,2,2,2,1,1,1,2,2,2,255,6,1,2,3,4,3,2,1,2,7,7,6,2,255,5,1,2,4,5,4,3,2,3,3,7,6,2,255,5,1,2,3,4,255,4,3,7,7,6,2,255,6,1,2,6,6,7,7,7,6,6,2,255,8,1,2,2,6,7,6,2,2,255,11,1,2,6,2,255,14,1,2,255,10,1,
|
|
||||||
255,6,0,2,2,2,0,0,0,2,2,2,255,6,0,2,3,4,3,0,0,0,7,7,6,2,255,5,0,2,4,5,4,3,0,3,3,7,6,2,255,5,0,2,3,4,3,0,3,3,7,7,6,2,255,6,0,2,6,6,7,7,7,6,6,2,255,8,0,2,2,6,7,6,2,2,255,11,0,2,6,2,255,14,0,2,255,6,0,1,1,1,0,0,0,1,1,1,255,6,0,255,5,1,0,255,5,1,255,5,0,1,1,1,2,2,1,2,2,1,1,1,255,5,0,1,1,2,5,4,2,7,6,2,1,1,255,6,0,1,2,4,3,0,0,0,2,1,255,8,0,1,0,2,6,2,0,1,255,11,0,1,2,1,255,14,0,1,255,10,0
|
|
||||||
};
|
|
||||||
uint16_t animation_heart_delays[] = {500,500};
|
|
||||||
uint16_t animation_heart_offsets[] = {0,128,299};
|
|
||||||
AnimationData animation_heart = {&animation_heart_colors[0], &animation_heart_data[0], &animation_heart_offsets[0], &animation_heart_delays[0], false, 6, 2, 16, 16};
|
|
||||||
|
|
||||||
uint8_t animation_weather_icons_colors[] PROGMEM = {255, 255, 255, 216, 216, 216, 45, 79, 255, 165, 153, 1, 100, 124, 251, 255, 236, 0, 255, 157, 0, 217, 212, 144, 163, 159, 109, 129, 129, 129, 67, 67, 67, 255, 0, 0, 189, 0, 0, 36, 42, 242, 5, 10, 176};
|
|
||||||
uint8_t animation_weather_icons_data[] PROGMEM = {
|
|
||||||
255,8,1,2,2,2,255,9,1,2,1,255,7,2,255,5,1,255,11,2,3,3,1,1,255,12,2,3,3,3,1,255,11,2,255,4,3,255,12,2,255,4,3,1,255,10,2,255,4,3,1,1,255,8,2,255,7,3,1,1,255,5,2,255,8,3,255,113,1,
|
|
||||||
255,8,1,2,2,2,255,9,1,2,1,255,7,2,255,5,1,255,11,2,3,3,1,1,255,12,2,3,3,3,1,255,11,2,255,4,3,255,12,2,255,4,3,1,255,10,2,255,4,3,1,1,255,8,2,255,7,3,1,1,255,5,2,255,8,3,255,5,1,4,1,4,1,4,1,4,1,4,255,7,1,4,1,4,1,4,1,4,1,4,255,7,1,4,1,4,1,4,1,4,1,4,255,23,1,4,1,4,1,4,1,4,1,4,255,7,1,4,1,4,1,4,1,4,1,4,255,7,1,4,1,4,1,4,1,4,1,4,255,3,1,
|
|
||||||
255,8,1,2,2,2,255,9,1,2,1,255,7,2,255,5,1,255,11,2,3,3,1,1,255,12,2,3,3,3,1,255,11,2,255,4,3,255,12,2,255,4,3,1,255,10,2,255,4,3,1,1,255,8,2,255,7,3,1,1,255,5,2,255,8,3,255,5,1,4,1,4,1,1,5,1,1,1,5,255,6,1,4,1,4,1,1,5,5,1,1,5,255,6,1,4,1,4,1,1,1,5,1,5,255,13,1,5,5,5,255,7,1,4,1,4,255,4,1,5,5,255,7,1,4,1,4,255,4,1,5,255,8,1,4,1,4,255,4,1,5,255,4,1,
|
|
||||||
255,8,1,2,2,2,255,9,1,2,1,255,7,2,255,5,1,255,11,2,3,3,1,1,255,12,2,3,3,3,1,255,11,2,255,4,3,255,12,2,255,4,3,1,255,10,2,255,4,3,1,1,255,8,2,255,7,3,1,1,255,5,2,255,8,3,255,5,1,4,1,4,1,1,5,255,10,1,4,1,4,1,1,5,5,255,9,1,4,1,4,1,1,1,5,255,15,1,5,5,5,255,7,1,4,1,4,255,5,1,5,255,7,1,4,1,4,1,1,1,5,5,255,8,1,4,1,4,1,1,1,5,255,5,1,
|
|
||||||
255,8,1,2,2,2,255,9,1,2,1,255,7,2,255,5,1,255,11,2,3,3,1,1,255,12,2,3,3,3,1,255,11,2,255,4,3,255,12,2,255,4,3,1,255,10,2,255,4,3,1,1,255,8,2,255,7,3,1,1,255,5,2,255,8,3,255,5,1,4,1,4,1,1,5,255,10,1,4,1,4,1,1,5,5,255,9,1,4,1,4,1,1,1,5,255,15,1,5,255,9,1,4,1,4,1,1,1,5,255,9,1,4,1,4,255,4,1,5,255,8,1,4,1,4,255,4,1,5,255,4,1,
|
|
||||||
255,8,1,2,2,2,255,9,1,2,1,255,7,2,255,5,1,255,11,2,3,3,1,1,255,12,2,3,3,3,1,255,11,2,255,4,3,255,12,2,255,4,3,1,255,10,2,255,4,3,1,1,255,8,2,255,7,3,1,1,255,5,2,255,8,3,255,7,1,4,1,1,1,4,255,11,1,4,1,1,1,4,255,13,1,4,255,15,1,4,255,13,1,4,1,1,1,4,255,11,1,4,1,1,1,4,255,13,1,4,255,7,1,
|
|
||||||
255,8,1,2,2,2,255,9,1,2,1,255,7,2,255,5,1,255,11,2,3,3,1,1,255,12,2,3,3,3,1,255,11,2,255,4,3,255,12,2,255,4,3,1,255,10,2,255,4,3,1,1,255,8,2,255,7,3,1,1,255,5,2,255,8,3,255,35,1,255,12,3,255,19,1,255,14,3,255,20,1,255,10,3,255,3,1,
|
|
||||||
255,8,1,2,2,2,255,9,1,2,1,255,7,2,255,5,1,255,11,2,3,3,1,1,255,12,2,3,3,3,1,255,11,2,255,4,3,255,12,2,255,4,3,1,255,10,2,255,4,3,1,1,255,8,2,255,7,3,1,1,255,5,2,255,8,3,255,23,1,6,1,6,1,4,255,12,1,6,6,6,255,12,1,255,4,6,4,255,12,1,6,6,4,255,12,1,4,1,4,1,4,255,21,1,
|
|
||||||
255,8,1,2,2,2,255,9,1,2,1,255,7,2,255,5,1,255,11,2,3,3,1,1,255,12,2,3,3,3,1,255,11,2,255,4,3,255,12,2,255,4,3,1,255,10,2,255,4,3,1,1,255,8,2,255,7,3,1,1,255,5,2,255,8,3,255,11,1,6,1,6,1,4,1,1,6,1,6,1,4,255,5,1,6,6,6,255,4,1,6,6,6,255,5,1,255,4,6,4,1,1,255,4,6,4,255,5,1,6,6,4,255,4,1,6,6,4,255,5,1,4,1,4,1,4,1,1,4,1,4,1,4,255,26,1,
|
|
||||||
255,8,1,2,2,2,255,9,1,2,1,255,7,2,255,5,1,255,11,2,3,3,1,1,255,12,2,3,3,3,1,255,11,2,255,4,3,255,12,2,255,4,3,1,255,10,2,255,4,3,1,1,255,8,2,255,7,3,1,1,255,5,2,255,8,3,255,4,1,4,1,4,1,4,1,1,6,1,6,1,4,1,1,6,1,6,1,4,255,5,1,6,6,6,255,4,1,6,6,6,255,5,1,255,4,6,4,1,1,255,4,6,4,255,5,1,6,6,4,255,4,1,6,6,4,255,5,1,4,1,4,1,4,1,1,4,1,4,1,4,1,6,1,6,1,4,255,12,1,6,6,6,255,5,1,
|
|
||||||
255,8,1,2,2,2,255,9,1,2,1,255,7,2,255,5,1,255,11,2,3,3,1,1,255,12,2,3,3,3,1,255,11,2,255,4,3,255,12,2,255,4,3,1,255,10,2,255,4,3,1,1,255,8,2,255,7,3,1,1,255,5,2,255,8,3,255,10,1,4,1,1,1,4,1,1,1,6,1,6,1,4,1,1,1,4,1,1,1,4,255,4,1,6,6,6,255,12,1,255,4,6,4,1,1,1,4,1,1,1,4,255,4,1,6,6,4,255,4,1,4,1,1,1,4,1,1,1,4,1,4,1,4,255,19,1,4,1,1,1,4,1,1,
|
|
||||||
255,8,1,2,2,2,255,9,1,2,1,255,7,2,255,5,1,255,11,2,3,3,1,1,255,12,2,3,3,3,1,255,11,2,255,4,3,255,12,2,255,4,3,1,255,10,2,255,4,3,1,1,255,8,2,255,7,3,1,1,255,5,2,255,8,3,255,11,1,4,255,6,1,6,1,6,1,4,255,4,1,4,255,7,1,6,6,6,255,12,1,255,4,6,4,255,12,1,6,6,4,255,5,1,4,255,6,1,4,1,4,1,4,255,4,1,4,255,21,1,
|
|
||||||
255,8,1,2,2,2,255,9,1,2,1,255,7,2,255,5,1,255,11,2,3,3,1,1,255,12,2,3,3,3,1,255,11,2,255,4,3,255,12,2,255,4,3,1,255,10,2,255,4,3,1,1,255,8,2,255,7,3,1,1,255,5,2,255,8,3,255,8,1,4,1,1,4,1,1,4,1,1,1,6,1,6,1,4,1,4,1,1,4,1,1,4,255,4,1,6,6,6,255,12,1,255,4,6,4,1,4,1,1,4,1,1,4,255,4,1,6,6,4,1,1,4,1,1,4,1,1,4,1,1,1,4,1,4,1,4,255,17,1,4,1,1,4,1,1,4,1,1,
|
|
||||||
255,7,1,7,7,255,14,1,7,7,255,8,1,7,7,1,1,255,6,7,1,1,7,7,1,1,255,14,7,1,1,1,255,4,7,255,4,8,255,4,7,255,4,1,7,7,7,255,6,8,7,7,7,255,4,1,7,7,255,8,8,7,7,1,1,255,4,7,255,8,8,255,8,7,255,8,8,255,4,7,1,1,7,7,255,8,8,7,7,255,4,1,7,7,7,255,6,8,7,7,7,255,4,1,255,4,7,255,4,8,255,4,7,1,1,1,255,14,7,1,1,7,7,1,1,255,6,7,1,1,7,7,255,8,1,7,7,255,14,1,7,7,255,7,1,
|
|
||||||
255,88,1,2,2,2,255,9,1,2,1,255,7,2,255,5,1,255,11,2,3,3,1,1,255,12,2,3,3,3,1,255,11,2,255,4,3,255,12,2,255,4,3,1,255,10,2,255,4,3,1,1,255,8,2,255,7,3,1,1,255,5,2,255,8,3,255,33,1,
|
|
||||||
255,32,1,7,1,1,7,7,1,1,7,255,9,1,255,6,7,255,10,1,7,7,8,8,7,7,255,9,1,7,7,255,4,8,7,7,255,8,1,7,7,255,4,8,7,7,255,9,1,7,7,8,8,7,7,1,2,2,2,255,6,1,255,5,7,255,7,2,3,1,1,7,1,1,7,7,1,255,6,2,3,3,3,255,6,1,255,7,2,255,4,3,255,5,1,255,6,2,255,4,3,255,5,1,255,5,2,255,7,3,255,48,1,
|
|
||||||
255,32,1,7,1,1,7,7,1,1,7,255,9,1,255,6,7,255,10,1,7,7,8,8,7,7,255,9,1,7,7,255,4,8,7,255,4,2,255,5,1,7,7,255,4,8,255,7,2,255,4,1,7,7,255,10,2,3,3,1,1,255,12,2,3,3,3,7,255,11,2,255,4,3,255,12,2,255,4,3,1,255,10,2,255,4,3,1,1,255,8,2,255,7,3,1,1,255,5,2,255,8,3,255,33,1,
|
|
||||||
255,34,1,9,9,11,11,255,11,1,9,9,11,11,12,11,255,9,1,9,10,9,255,5,11,255,8,1,9,9,11,11,12,11,11,255,4,2,255,5,1,9,10,255,4,11,255,7,2,1,1,1,9,9,9,255,10,2,3,3,1,1,255,12,2,3,3,3,255,12,2,255,4,3,255,12,2,255,4,3,1,255,10,2,255,4,3,1,1,255,8,2,255,7,3,1,1,255,5,2,255,8,3,255,33,1,
|
|
||||||
255,21,1,255,4,9,11,11,255,9,1,9,9,9,255,5,11,255,7,1,9,10,9,255,5,11,12,11,255,5,1,255,4,9,255,8,11,1,1,1,9,10,9,9,255,10,11,1,1,9,10,9,9,255,4,11,12,255,5,11,1,1,255,4,9,255,9,11,12,1,1,255,4,9,255,9,11,12,1,1,9,9,10,10,255,5,11,12,12,11,11,11,1,1,10,9,9,10,255,10,11,1,1,1,255,4,9,255,8,11,255,5,1,9,9,9,255,5,11,12,11,255,7,1,9,9,9,255,5,11,255,9,1,9,9,10,9,11,11,255,21,1,
|
|
||||||
255,34,1,9,9,11,11,255,11,1,9,9,11,11,12,11,255,9,1,9,10,9,255,5,11,255,8,1,9,9,11,12,12,11,11,11,255,8,1,9,10,255,5,11,12,255,8,1,9,9,9,11,12,12,11,255,4,2,255,6,1,9,9,11,11,11,255,7,2,3,255,4,1,10,9,12,11,255,6,2,3,3,3,255,6,1,255,7,2,255,4,3,255,5,1,255,6,2,255,4,3,255,5,1,255,5,2,255,7,3,255,48,1,
|
|
||||||
255,6,1,2,2,255,13,1,2,1,1,2,255,12,1,2,13,13,2,255,12,1,2,13,13,2,255,12,1,2,13,13,2,255,12,1,2,13,13,2,255,12,1,2,13,13,2,255,12,1,2,13,13,2,255,12,1,2,13,13,2,255,11,1,2,2,13,13,2,2,255,9,1,2,2,13,13,13,14,2,2,255,8,1,2,255,4,13,14,14,2,255,8,1,2,255,4,13,14,14,2,255,8,1,2,2,13,13,14,14,2,2,255,9,1,2,2,14,14,2,2,255,11,1,255,4,2,255,7,1,
|
|
||||||
255,6,1,2,2,255,13,1,2,1,1,2,255,12,1,2,1,1,2,255,12,1,2,1,1,2,255,12,1,2,1,1,2,255,12,1,2,1,1,2,255,12,1,2,1,1,2,255,12,1,2,1,1,2,255,12,1,2,15,15,2,255,11,1,2,2,15,15,2,2,255,9,1,2,2,15,15,15,16,2,2,255,8,1,2,255,4,15,16,16,2,255,8,1,2,255,4,15,16,16,2,255,8,1,2,2,15,15,16,16,2,2,255,9,1,2,2,16,16,2,2,255,11,1,255,4,2,255,7,1,
|
|
||||||
255,20,1,14,2,1,1,14,2,255,8,1,11,12,14,2,14,2,14,2,14,2,255,6,1,11,1,14,2,14,2,255,10,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,13,1,
|
|
||||||
255,20,1,14,2,14,2,255,10,1,11,12,14,2,14,2,14,2,14,2,255,6,1,11,1,14,2,1,1,14,2,255,8,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,13,1,
|
|
||||||
255,20,1,14,2,14,2,255,10,1,11,12,14,2,14,2,14,2,14,2,255,6,1,11,1,14,2,1,1,14,2,255,8,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,13,1,
|
|
||||||
255,20,1,14,2,14,2,255,10,1,11,12,14,2,14,2,14,2,255,8,1,11,1,14,2,1,1,14,2,14,2,255,6,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,13,1,
|
|
||||||
255,20,1,14,2,1,1,14,2,255,8,1,11,12,14,2,14,2,14,2,255,8,1,11,1,14,2,14,2,1,1,14,2,255,6,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,15,1,11,255,13,1
|
|
||||||
};
|
|
||||||
uint16_t animation_weather_icons_delays[] = {0};
|
|
||||||
uint16_t animation_weather_icons_offsets[] = {0,69,210,354,489,621,734,821,925,1061,1216,1359,1479,1627,1772,1841,1954,2060,2166,2308,2421,2551,2681,2763,2845,2927,3009,3093};
|
|
||||||
AnimationData animation_weather_icons = {&animation_weather_icons_colors[0], &animation_weather_icons_data[0], &animation_weather_icons_offsets[0], &animation_weather_icons_delays[0], false, 15, 27, 16, 16};
|
|
||||||
|
|
||||||
uint8_t animation_cake_colors[] PROGMEM = {91, 61, 0, 225, 225, 225, 184, 184, 113, 183, 123, 61, 255, 255, 142, 255, 174, 91, 255, 91, 91, 174, 174, 174, 255, 91, 174, 255, 40, 40, 255, 113, 40, 255, 40, 113, 174, 91, 255, 122, 82, 0, 255, 189, 122, 255, 255, 173};
|
|
||||||
uint8_t animation_cake_data[] PROGMEM = {
|
|
||||||
1,1,1,2,255,7,1,15,255,6,1,2,7,2,1,1,2,1,1,2,7,2,255,5,1,2,8,2,1,2,12,2,1,2,8,2,255,6,1,2,1,1,2,11,2,1,1,2,255,6,1,2,9,2,1,1,2,1,1,2,9,2,255,5,1,2,10,2,1,2,13,2,1,2,10,2,255,5,1,2,9,5,2,5,14,5,2,5,9,2,255,4,1,2,7,10,7,3,7,13,7,3,7,10,7,2,1,1,2,3,4,4,4,3,7,14,7,3,4,4,4,3,2,1,2,255,5,3,4,13,4,255,5,3,2,1,2,4,255,11,3,4,2,1,2,5,255,7,4,6,4,4,6,5,2,1,2,6,255,6,5,4,6,5,4,6,6,2,1,2,5,6,11,7,6,11,7,6,11,7,4,6,5,2,1,1,2,255,11,5,2,255,4,1,255,11,2,255,3,1,
|
|
||||||
255,11,0,2,255,23,0,11,0,0,0,7,0,0,0,11,255,11,0,12,255,200,0,
|
|
||||||
0,0,0,1,255,14,0,1,2,1,255,6,0,12,255,7,0,7,255,220,0,
|
|
||||||
0,0,0,2,255,7,0,1,255,6,0,2,0,2,255,5,0,1,2,1,255,10,0,5,0,0,0,7,255,11,0,7,255,200,0,
|
|
||||||
255,22,0,2,255,14,0,2,7,255,14,0,2,7,255,201,0,
|
|
||||||
255,39,0,2,1,255,12,0,1,2,255,201,0,
|
|
||||||
255,6,0,2,255,15,0,7,255,14,0,1,255,17,0,16,255,149,0,17,255,50,0,
|
|
||||||
255,6,0,1,255,15,0,1,255,15,0,2,5,2,0,0,2,255,11,0,5,255,149,0,6,255,50,0,
|
|
||||||
255,43,0,7,255,7,0,15,0,0,0,7,255,200,0
|
|
||||||
};
|
|
||||||
uint16_t animation_cake_delays[] = {80};
|
|
||||||
uint16_t animation_cake_offsets[] = {0,200,223,244,279,296,309,332,360,375};
|
|
||||||
AnimationData animation_cake = {
|
|
||||||
&animation_cake_colors[0],
|
|
||||||
&animation_cake_data[0],
|
|
||||||
&animation_cake_offsets[0],
|
|
||||||
&animation_cake_delays[0],
|
|
||||||
false, /* individual_frame_times */
|
|
||||||
16, /* color_count */
|
|
||||||
9, /* frames_count */
|
|
||||||
16, 16 /* width, height */
|
|
||||||
};
|
|
||||||
|
|
@ -9,3 +9,14 @@ __attribute__ ((aligned(4))) extern const TProgmemRGBGradientPalette_byte palett
|
|||||||
__attribute__ ((aligned(4))) extern const TProgmemRGBGradientPalette_byte palette_matrix[] FL_PROGMEM = {
|
__attribute__ ((aligned(4))) extern const TProgmemRGBGradientPalette_byte palette_matrix[] FL_PROGMEM = {
|
||||||
0, 0, 0, 0, // black
|
0, 0, 0, 0, // black
|
||||||
255, 0,255, 0 }; // green
|
255, 0,255, 0 }; // green
|
||||||
|
|
||||||
|
// Gradient palette "purplefly_gp", originally from
|
||||||
|
// http://soliton.vm.bytemark.co.uk/pub/cpt-city/rc/tn/purplefly.png.index.html
|
||||||
|
// converted for FastLED with gammas (2.6, 2.2, 2.5)
|
||||||
|
// Size: 16 bytes of program space.
|
||||||
|
|
||||||
|
__attribute__ ((aligned(4))) extern const TProgmemRGBGradientPalette_byte palette_purplefly_gp[] FL_PROGMEM = {
|
||||||
|
0, 0, 0, 0,
|
||||||
|
63, 239, 0,122,
|
||||||
|
191, 252,255, 78,
|
||||||
|
255, 0, 0, 0};
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
#include "effect_animation.h"
|
|
||||||
#include "functions.h"
|
|
||||||
|
|
||||||
AnimationEffect::AnimationEffect(AnimationData* anim, CRGB* bg, int x, int y) {
|
|
||||||
this->animation_data = anim;
|
|
||||||
this->bg_color = bg;
|
|
||||||
this->xOffset = x;
|
|
||||||
this->yOffset = y;
|
|
||||||
}
|
|
||||||
|
|
||||||
void AnimationEffect::start() {
|
|
||||||
this->animation = new Animation(this->animation_data);
|
|
||||||
this->animation->setBgColor(this->bg_color);
|
|
||||||
this->animation->setOffsets(this->xOffset, this->yOffset);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AnimationEffect::stop() {
|
|
||||||
delete this->animation;
|
|
||||||
}
|
|
||||||
|
|
||||||
void AnimationEffect::loop() {
|
|
||||||
this->animation->drawFrame(this->window);
|
|
||||||
this->animation->advance();
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
#include "Effect.h"
|
|
||||||
#include "effect_big_clock.h"
|
|
||||||
#include "fonts.h"
|
|
||||||
#include "ntp.h"
|
|
||||||
|
|
||||||
void BigClockEffect::drawNumber(uint8_t number, int x, int y, CRGB color) {
|
|
||||||
char buffer[7];
|
|
||||||
sprintf(buffer, "%02d", number);
|
|
||||||
drawText(buffer, x, y, color);
|
|
||||||
}
|
|
||||||
|
|
||||||
void BigClockEffect::drawText(char *text, int x, int y, CRGB color) {
|
|
||||||
for (uint8_t i = 0; i < strlen(text); i++) {
|
|
||||||
window->drawChar(&font_numbers4x7, text[i], x + i * 4, y, &color);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void BigClockEffect::loop() {
|
|
||||||
window->clear();
|
|
||||||
drawNumber(ntpClient.getHours(), 0, 0, color_h);
|
|
||||||
drawNumber(ntpClient.getMinutes(), 8, 0, color_m);
|
|
||||||
drawNumber(ntpClient.getSeconds(), 8, 8, color_colon);
|
|
||||||
}
|
|
@ -1,42 +0,0 @@
|
|||||||
#include "effect_clock.h"
|
|
||||||
#include <FastLED.h>
|
|
||||||
#include "functions.h"
|
|
||||||
#include "fonts.h"
|
|
||||||
#include "ntp.h"
|
|
||||||
|
|
||||||
void ClockEffect::loop() {
|
|
||||||
loop(false, CRGB(0xFFFFFF), CRGB(0x000000));
|
|
||||||
}
|
|
||||||
|
|
||||||
void ClockEffect::loop(boolean invert, CRGB fg_color, CRGB bg_color) {
|
|
||||||
if (!invert) {
|
|
||||||
window->clear(&bg_color);
|
|
||||||
} else {
|
|
||||||
// Manually clear the needed parts
|
|
||||||
for(int i=0; i<window->width; i++) window->setPixel(i, 0, &bg_color);
|
|
||||||
for(int y=0; y<6; y++) {
|
|
||||||
window->setPixel(3, y, &bg_color);
|
|
||||||
if (y!=2 && y!=4) {
|
|
||||||
window->setPixel(7, y, &bg_color);
|
|
||||||
}
|
|
||||||
window->setPixel(8, y, &bg_color);
|
|
||||||
window->setPixel(12, y, &bg_color);
|
|
||||||
}
|
|
||||||
fg_color = bg_color;
|
|
||||||
}
|
|
||||||
if (ntpClient.isTimeSet()==false && (ntpClient.getSeconds() & 1)==0) {
|
|
||||||
window->clear(&bg_color);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
int h = ntpClient.getHours();
|
|
||||||
//void drawChar(Font f, uint8_t x, uint8_t y, const char c, CRGB* color, bool mask=false);
|
|
||||||
window->drawChar(&font_numbers3x5, 0, 1, '0' + (h / 10), &fg_color, invert);
|
|
||||||
window->drawChar(&font_numbers3x5, 4, 1, '0' + (h % 10), &fg_color, invert);
|
|
||||||
int m = ntpClient.getMinutes();
|
|
||||||
window->drawChar(&font_numbers3x5, 9, 1, '0' + (m / 10), &fg_color, invert);
|
|
||||||
window->drawChar(&font_numbers3x5, 13, 1, '0' + (m % 10), &fg_color, invert);
|
|
||||||
if (ntpClient.getSeconds() & 1) {
|
|
||||||
window->setPixel(7, 2, &fg_color);
|
|
||||||
window->setPixel(7, 4, &fg_color);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
#include "effect_confetti.h"
|
|
||||||
#include "config.h"
|
|
||||||
#include "functions.h"
|
|
||||||
#include "prototypes.h"
|
|
||||||
|
|
||||||
void ConfettiEffect::loop() {
|
|
||||||
window->fadeToBlackBy(3);
|
|
||||||
for (int i=0; i<EFFECT_CONFETTI_PIXELS_PER_LOOP; i++) {
|
|
||||||
CRGB color(CHSV(baseHue + random8(64), 200, 255));
|
|
||||||
window->addPixelColor(random16(LED_COUNT), &color);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean ConfettiEffect::can_be_shown_with_clock() { return true; };
|
|
@ -1,47 +0,0 @@
|
|||||||
#include "effect_cycle.h"
|
|
||||||
|
|
||||||
void CycleEffect::changeEffect() {
|
|
||||||
int new_id;
|
|
||||||
if (EFFECT_CYCLE_RANDOM) {
|
|
||||||
do {
|
|
||||||
new_id = random8(cycle_effects->size());
|
|
||||||
} while (new_id == effect_id);
|
|
||||||
} else {
|
|
||||||
new_id = (effect_id + 1) % cycle_effects->size();
|
|
||||||
}
|
|
||||||
LOG("CycleEffect * Changing effect from #"); LOG(effect_id); LOG(" to #"); LOGln(new_id);
|
|
||||||
if (effect) effect->stop();
|
|
||||||
effect = cycle_effects->get(new_id);
|
|
||||||
effect->start();
|
|
||||||
effect_id = new_id;
|
|
||||||
effectSince = millis();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CycleEffect::start() {
|
|
||||||
if (!effect) changeEffect();
|
|
||||||
else effect->start();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CycleEffect::stop() {
|
|
||||||
effect_id = -1;
|
|
||||||
if (effect) effect->stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean CycleEffect::can_be_shown_with_clock() {
|
|
||||||
return effect->can_be_shown_with_clock();
|
|
||||||
};
|
|
||||||
boolean CycleEffect::clock_as_mask() {
|
|
||||||
return effect->clock_as_mask();
|
|
||||||
};
|
|
||||||
|
|
||||||
void CycleEffect::loop() {
|
|
||||||
if (!effect) changeEffect(); // If this is the first run, we have to select an effect first!
|
|
||||||
effect->loop();
|
|
||||||
// Don't use EVERY_N_SECONDS(config_effect_cycle_time) here because that function isn't relly made
|
|
||||||
// to be used with changing values.
|
|
||||||
EVERY_N_SECONDS(1) {
|
|
||||||
if (effectSince + EFFECT_CYCLE_TIME*1000 < millis()) {
|
|
||||||
changeEffect();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
#include "effect_dynamic.h"
|
|
||||||
#include "functions.h"
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
SingleDynamicEffect::SingleDynamicEffect() {
|
|
||||||
init();
|
|
||||||
}
|
|
||||||
|
|
||||||
void SingleDynamicEffect::init() {
|
|
||||||
for (int i=0; i<tile_count; i++) tiles[i] = CHSV(baseHue + random8(64), 180, 255);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SingleDynamicEffect::loop() {
|
|
||||||
EVERY_N_MILLISECONDS( EFFECT_SINGLE_DYNAMIC_LOOP_TIME ) {
|
|
||||||
tiles[random8(tile_count)] = CHSV(baseHue + random8(64), 180, 255);
|
|
||||||
}
|
|
||||||
this->draw();
|
|
||||||
}
|
|
||||||
|
|
||||||
void SingleDynamicEffect::draw() {
|
|
||||||
for (int x=0; x<window->width; x++) for (int y=0; y<window->height; y++) {
|
|
||||||
int index = y/2 * window->width/2 + x/2;
|
|
||||||
window->setPixel(x, y, &tiles[index]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean SingleDynamicEffect::can_be_shown_with_clock() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MultiDynamicEffect::loop() {
|
|
||||||
EVERY_N_MILLISECONDS( EFFECT_MULTI_DYNAMIC_LOOP_TIME ) {
|
|
||||||
for (int i=0; i<tile_count; i++) tiles[i] = CHSV(baseHue + random8(64), 180, 255);
|
|
||||||
}
|
|
||||||
this->draw();
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
#include "effect_firework.h"
|
|
||||||
#include "my_fastled.h"
|
|
||||||
#include "functions.h"
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
void FireworkEffect::loop() {
|
|
||||||
blur(EFFECT_FIREWORK_BLUR);
|
|
||||||
fadeToBlackBy(leds, LED_COUNT, EFFECT_FIREWORK_FADEOUT_SPEED);
|
|
||||||
|
|
||||||
if (random8(EFFECT_FIREWORK_SHOT_CHANCE)==0) {
|
|
||||||
leds[random16(LED_COUNT)] = CHSV(random8(), 255, 255);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,64 +0,0 @@
|
|||||||
#include "effect_matrix.h"
|
|
||||||
#include "my_color_palettes.h"
|
|
||||||
#include "functions.h"
|
|
||||||
|
|
||||||
MatrixEffectColumn::MatrixEffectColumn() {
|
|
||||||
}
|
|
||||||
|
|
||||||
MatrixEffectColumn::MatrixEffectColumn(Window* win, int xPos) : MatrixEffectColumn() {
|
|
||||||
window = win;
|
|
||||||
x = xPos;
|
|
||||||
start();
|
|
||||||
y = random8(0, window->height);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MatrixEffectColumn::start() {
|
|
||||||
y=-1;
|
|
||||||
length = random8(EFFECT_MATRIX_LENGTH_MIN, EFFECT_MATRIX_LENGTH_MAX);
|
|
||||||
running = true;
|
|
||||||
speed = random8(EFFECT_MATRIX_SPEED_MIN, EFFECT_MATRIX_SPEED_MAX);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MatrixEffectColumn::advance() {
|
|
||||||
y++;
|
|
||||||
if (y-length > window->height) running = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MatrixEffectColumn::draw() {
|
|
||||||
for(int i=0; i<length; i++) {
|
|
||||||
CRGB color;
|
|
||||||
if (i==0) {
|
|
||||||
color = CRGB(255, 255, 255);
|
|
||||||
} else {
|
|
||||||
color = ColorFromPalette((CRGBPalette16)palette_matrix, 255 * (length - i) / length);
|
|
||||||
}
|
|
||||||
window->setPixel(x, y-i, &color);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void MatrixEffectColumn::loop() {
|
|
||||||
if (!running) {
|
|
||||||
if (random8() < 20) {
|
|
||||||
// Start the column again.
|
|
||||||
start();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (millis() - last_move > speed) {
|
|
||||||
advance();
|
|
||||||
last_move = millis();
|
|
||||||
}
|
|
||||||
|
|
||||||
draw();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean MatrixEffect::can_be_shown_with_clock() { return true; };
|
|
||||||
|
|
||||||
MatrixEffect::MatrixEffect() {
|
|
||||||
for (int i=0; i<LED_WIDTH; i++) columns[i] = MatrixEffectColumn(window, i);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MatrixEffect::loop() {
|
|
||||||
window->clear();
|
|
||||||
for (int i=0; i<window->width; i++) columns[i].loop();
|
|
||||||
}
|
|
@ -1,60 +0,0 @@
|
|||||||
#include "effect_snake.h"
|
|
||||||
#include "functions.h"
|
|
||||||
|
|
||||||
SnakeEffect::SnakeEffect() {
|
|
||||||
this->coords = {0, 0};
|
|
||||||
this->window = new Window(0, 0, LED_WIDTH, LED_HEIGHT-6);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SnakeEffect::loop() {
|
|
||||||
if (run++ % EFFECT_SNAKE_SLOWDOWN == 0) { // Change the coordinates only on every n-th run.
|
|
||||||
if (random8(EFFECT_SNAKE_DIRECTION_CHANGE)==0 || is_turn_needed()) turn_random();
|
|
||||||
|
|
||||||
this->coords = update_position(this->coords, this->direction);
|
|
||||||
}
|
|
||||||
|
|
||||||
window->fadeToBlackBy(2);
|
|
||||||
CRGB color(CHSV(hue, 200, 255));
|
|
||||||
window->setPixel(this->coords.x, this->coords.y, &color);
|
|
||||||
hue++;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SnakeEffect::turn_random() {
|
|
||||||
if ((random8() & 1) == 0) {
|
|
||||||
turn_right() || turn_left();
|
|
||||||
} else {
|
|
||||||
turn_left() || turn_right();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SnakeEffect::turn_left() {
|
|
||||||
if (!is_direction_okay(this->direction - 1)) return false;
|
|
||||||
this->direction--;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SnakeEffect::turn_right() {
|
|
||||||
if (!is_direction_okay(this->direction + 1)) return false;
|
|
||||||
this->direction++;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SnakeEffect::is_turn_needed() {
|
|
||||||
return !is_direction_okay(this->direction);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SnakeEffect::is_direction_okay(uint8_t dir) {
|
|
||||||
Coords c = update_position(this->coords, dir);
|
|
||||||
return c.x<window->width && c.y<window->height;
|
|
||||||
}
|
|
||||||
|
|
||||||
Coords SnakeEffect::update_position(Coords original, uint8_t direction) {
|
|
||||||
direction = direction % 4;
|
|
||||||
if (direction == 0) original.y--;
|
|
||||||
else if (direction == 1) original.x++;
|
|
||||||
else if (direction == 2) original.y++;
|
|
||||||
else if (direction == 3) original.x--;
|
|
||||||
return original;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean SnakeEffect::can_be_shown_with_clock() { return true; }
|
|
@ -1,12 +0,0 @@
|
|||||||
#include "effect_twirl.h"
|
|
||||||
#include "functions.h"
|
|
||||||
|
|
||||||
void TwirlEffect::loop() {
|
|
||||||
for (int x=0; x<window->width; x++) for (int y=0; y<window->height; y++) {
|
|
||||||
uint8_t angle = (x==center_x && y==center_y) ? 0 : atan2(y - center_y, x - center_x) / M_PI * 128 + 128 + angleOffset;
|
|
||||||
uint8_t brightness = sqrt16((center_x - x) * (center_x - x) + (center_y - y) * (center_y - y)) & 0xFF;
|
|
||||||
CRGB color(CHSV(angle, (brightness<<5) & 0xFF, 255));
|
|
||||||
window->setPixel(x, y, &color);
|
|
||||||
}
|
|
||||||
angleOffset += 1;
|
|
||||||
}
|
|
199
src/effects.cpp
@ -1,80 +1,137 @@
|
|||||||
#include "effects.h"
|
#include "effects.h"
|
||||||
#include "animations.h"
|
#include "config.h"
|
||||||
#include "my_fastled.h"
|
#include "my_fastled.h"
|
||||||
#include "EffectEntry.h"
|
#include "effects/bell.h"
|
||||||
#include "effect_bell.h"
|
#include "effects/sinematrix3.h"
|
||||||
#include "effect_sinematrix3.h"
|
#include "effects/big_clock.h"
|
||||||
#include "effect_big_clock.h"
|
#include "effects/clock.h"
|
||||||
#include "effect_clock.h"
|
#include "effects/static.h"
|
||||||
#include "effect_static.h"
|
#include "effects/animation.h"
|
||||||
#include "effect_animation.h"
|
#include "effects/dynamic.h"
|
||||||
#include "effect_dynamic.h"
|
#include "effects/matrix.h"
|
||||||
#include "effect_matrix.h"
|
#include "effects/twirl.h"
|
||||||
#include "effect_twirl.h"
|
#include "effects/cycle.h"
|
||||||
#include "effect_cycle.h"
|
#include "effects/snake.h"
|
||||||
#include "effect_confetti.h"
|
#include "effects/fire.h"
|
||||||
#include "effect_snake.h"
|
#include "effects/firework.h"
|
||||||
#include "effect_fire.h"
|
#include "effects/gol.h"
|
||||||
#include "effect_firework.h"
|
#include "effects/pixelclock.h"
|
||||||
#include "effect_gol.h"
|
#include "effects/dvd.h"
|
||||||
|
#include "effects/analogclock.h"
|
||||||
SimpleList<EffectEntry>* effects;
|
#include "effects/sines.h"
|
||||||
SimpleList<Effect*>* cycle_effects;
|
#include "effects/marquee.h"
|
||||||
|
#include "effects/blur2d.h"
|
||||||
ClockEffect effect_clock;
|
#include "effects/tv_static.h"
|
||||||
Sinematrix3Effect effect_sinematrix3;
|
#include "effects/lightspeed.h"
|
||||||
BigClockEffect effect_big_clock;
|
#include "effects/diamond.h"
|
||||||
//ClockEffect effect_clock; <-- generated as global variable in effects.h
|
#include "effects/tpm2_net.h"
|
||||||
BellEffect effect_bell;
|
#include "SimpleEffect.h"
|
||||||
StaticEffect effect_off(CRGB(0x000000));
|
#include "effects/night_clock.h"
|
||||||
AnimationEffect effect_anim_koopa(&animation_koopa, new CRGB(0x000000), 0, 0);
|
|
||||||
AnimationEffect effect_anim_couple_rain(&animation_couple_rain, new CRGB(0x000000), -8, -16);
|
|
||||||
AnimationEffect effect_anim_heart(&animation_heart, new CRGB(0x000000), 0, 0);
|
|
||||||
AnimationEffect effect_anim_cake(&animation_cake, new CRGB(0x000000), 0, 0);
|
|
||||||
SingleDynamicEffect effect_single_dynamic;
|
|
||||||
MultiDynamicEffect effect_multi_dynamic;
|
|
||||||
MatrixEffect effect_matrix;
|
|
||||||
CycleEffect effect_cycle;
|
|
||||||
TwirlEffect effect_twirl;
|
|
||||||
ConfettiEffect effect_confetti;
|
|
||||||
SnakeEffect effect_snake;
|
|
||||||
FireEffect effect_fire;
|
|
||||||
FireworkEffect effect_firework;
|
|
||||||
GolEffect effect_gol;
|
|
||||||
|
|
||||||
Effect* current_effect;
|
Effect* current_effect;
|
||||||
|
|
||||||
void setup_effects() {
|
ClockEffect effect_clock;
|
||||||
effects = new SimpleList<EffectEntry>();
|
TimerEffect effect_timer;
|
||||||
cycle_effects = new SimpleList<Effect*>();
|
|
||||||
|
|
||||||
effects->add((EffectEntry){"sinematrix3", (Effect *)&effect_sinematrix3});
|
// We're using 0 instead of false to get a better visual difference between true and false.
|
||||||
effects->add((EffectEntry){"big_clock", (Effect *)&effect_big_clock});
|
EffectEntry effects[] = {
|
||||||
effects->add((EffectEntry){"clock", (Effect *)&effect_clock});
|
/* 0 */ {"sinematrix3", true, [](){ return new Sinematrix3Effect(); }},
|
||||||
effects->add((EffectEntry){"bell", (Effect *)&effect_bell});
|
/* 1 */ {"big_clock", true, [](){ return new BigClockEffect(); }},
|
||||||
effects->add((EffectEntry){"off", (Effect *)&effect_off});
|
/* 2 */ {"clock", 0, [](){ return new ClockEffect(); }},
|
||||||
effects->add((EffectEntry){"koopa", (Effect *)&effect_anim_koopa});
|
/* 3 */ {"bell", 0, [](){ return AnimationEffect::Blinker("/bell.pia", 300, 0xFFFF00); }},
|
||||||
effects->add((EffectEntry){"couple_rain", (Effect *)&effect_anim_couple_rain});
|
/* 4 */ {"off", 0, [](){ return new StaticEffect(0x000000); }},
|
||||||
effects->add((EffectEntry){"single_dynamic", (Effect *)&effect_single_dynamic});
|
/* 5 */ {"single_dynamic", true, [](){ return new SingleDynamicEffect(); }},
|
||||||
effects->add((EffectEntry){"multi_dynamic", (Effect *)&effect_multi_dynamic});
|
/* 6 */ {"multi_dynamic", true, [](){ return new MultiDynamicEffect(); }},
|
||||||
effects->add((EffectEntry){"matrix", (Effect *)&effect_matrix});
|
/* 7 */ {"big_dynamic", true, [](){ return new BigDynamicEffect(); }},
|
||||||
effects->add((EffectEntry){"cycle", (Effect *)&effect_cycle});
|
/* 8 */ {"matrix", true, [](){ return new MatrixEffect(); }},
|
||||||
effects->add((EffectEntry){"twirl", (Effect *)&effect_twirl});
|
/* 9 */ {"random_matrix", true, [](){ return new RandomMatrixEffect(); }},
|
||||||
effects->add((EffectEntry){"heart", (Effect*)&effect_anim_heart});
|
/* 10 */ {"rainbow_matrix", true, [](){ return new RainbowMatrixEffect(); }},
|
||||||
effects->add((EffectEntry){"confetti", (Effect *)&effect_confetti});
|
/* 11 */ {"cycle", 0, [](){ return new CycleEffect(); }},
|
||||||
effects->add((EffectEntry){"snake", (Effect *)&effect_snake});
|
/* 12 */ {"twirl", true, [](){ return new TwirlEffect(); }},
|
||||||
effects->add((EffectEntry){"fire", (Effect *)&effect_fire});
|
/* 13 */ SIMPLE_EFFECT("confetti", true, SE_CYCLE_COLORS | SE_FADEOUT, {return random8()>252?1:0;}),
|
||||||
effects->add((EffectEntry){"firework", (Effect *)&effect_firework});
|
/* 14 */ SIMPLE_EFFECT("rainbow_confetti", true, SE_RANDOM_PIXEL_COLORS | SE_FADEOUT, {return random8()>252?1:0;}),
|
||||||
effects->add((EffectEntry){"gol", (Effect *)&effect_gol});
|
/* 15 */ {"snake", true, [](){ return new SnakeEffect(); }},
|
||||||
effects->add((EffectEntry){"cake", (Effect *)&effect_anim_cake});
|
/* 16 */ {"firework", true, [](){ return new FireworkEffect(); }},
|
||||||
|
/* 17 */ {"gol", true, [](){ return new GolEffect(); }},
|
||||||
|
/* 18 */ {"pixel_clock", 0, [](){ return new PixelClockEffect(); }},
|
||||||
|
/* 19 */ {"dvd", true, [](){ return new DvdEffect(); }},
|
||||||
|
/* 20 */ {"analog_clock", 0, [](){ return new AnalogClockEffect(); }},
|
||||||
|
/* 21 */ {"sines", true, [](){ return new SinesEffect(); }},
|
||||||
|
/* 22 */ {"blur2d", true, [](){ return new Blur2DEffect(); }},
|
||||||
|
/* 23 */ {"marquee", 0, [](){ return new MarqueeEffect(); }},
|
||||||
|
/* 24 */ {"night_clock", 0, [](){ return new NightClockEffect(); }},
|
||||||
|
/* 25 */ {"tv_static", 0, [](){ return new TvStaticEffect(); }},
|
||||||
|
/* 26 */ {"sinematrix3_rainbow", true, [](){ return new Sinematrix3Effect(SINEMATRIX_COLOR_RAINBOW); }},
|
||||||
|
/* 27 */ {"sinematrix3_purplefly", true, [](){ return new Sinematrix3Effect(SINEMATRIX_COLOR_PURPLEFLY); }},
|
||||||
|
/* 28 */ {"lightspeed", true, [](){ return new LightspeedEffect(); }},
|
||||||
|
/* 29 */ {"koopa", 0, [](){ return new AnimationEffect("/koopa.pia"); }},
|
||||||
|
/* 30 */ {"cake", 0, [](){ return new AnimationEffect("/cake.pia"); }},
|
||||||
|
/* 31 */ {"child", 0, [](){ return AnimationEffect::Blinker("/child.pia", 300, 0xFFFF00); }},
|
||||||
|
/* 32 */ {"diamond", true, [](){ return new DiamondEffect(); }},
|
||||||
|
/* 33 */ {"tpm2.net", 0, [](){ return new Tpm2NetEffect(); }},
|
||||||
|
/* 34 */ SIMPLE_EFFECT("slow_blinking", true, SE_CYCLE_COLORS, {return sin(t + (x+1)*(y+1)*i);} ),
|
||||||
|
/* 35 */ SIMPLE_EFFECT("upwave", true, SE_CYCLE_COLORS, {return (cos(t+y/2));} ),
|
||||||
|
/* 36 */ SIMPLE_EFFECT("centerwave", true, SE_CYCLE_COLORS, {return sin(t*2 - sqrt((x-4)*(x-4) + (y-7)*(y-7)));} ),
|
||||||
|
/* 37 */ SIMPLE_EFFECT("sineline", true, SE_RANDOM_STATIC_COLOR, {return sin(x/2)-sin(x-t)-y+6;} ),
|
||||||
|
/* 38 */ SIMPLE_EFFECT("barbershop", true, SE_RANDOM_STATIC_COLOR, {return 1*cos(0.8*i-t*5);} ),
|
||||||
|
/* 39 */ SIMPLE_EFFECT("zigzag", true, SE_CYCLE_COLORS, { return cos(cos(x+y)-y*cos(t/8+x/16));} ),
|
||||||
|
};
|
||||||
|
const uint8_t effects_size = 40;
|
||||||
|
|
||||||
cycle_effects->add(&effect_sinematrix3);
|
|
||||||
cycle_effects->add(&effect_multi_dynamic);
|
|
||||||
cycle_effects->add(&effect_matrix);
|
|
||||||
cycle_effects->add(&effect_confetti);
|
|
||||||
cycle_effects->add(&effect_single_dynamic);
|
|
||||||
cycle_effects->add(&effect_snake);
|
|
||||||
cycle_effects->add(&effect_gol);
|
|
||||||
|
|
||||||
current_effect = &effect_cycle;
|
Effect* select_effect(const char* name) {
|
||||||
|
for(int i=0; i<effects_size; i++) {
|
||||||
|
if (strcmp(effects[i].name, name)==0) {
|
||||||
|
return effects[i].create();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
Effect* select_effect(uint8_t id) {
|
||||||
|
if (id < effects_size) {
|
||||||
|
return effects[id].create();
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool change_current_effect(String payload) {
|
||||||
|
int pos = payload.indexOf(",");
|
||||||
|
String options = "";
|
||||||
|
if (pos != -1) {
|
||||||
|
LOGln("Effects * Effect comes with options.");
|
||||||
|
options = payload.substring(pos+1);
|
||||||
|
payload.remove(pos);
|
||||||
|
LOGln("Effects * Cleaned effect name: %s", payload.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
Effect* new_effect = select_effect( payload.c_str() );
|
||||||
|
if (new_effect == NULL) {
|
||||||
|
LOGln("Effects * Could not find effect with name %s", payload.c_str());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
LOGln("Effects * Switching to effect %s", payload.c_str());
|
||||||
|
delete current_effect;
|
||||||
|
current_effect = new_effect;
|
||||||
|
|
||||||
|
if (options.length() > 0) {
|
||||||
|
LOGln("Effects * Parsing options: %s", options.c_str());
|
||||||
|
options += ",";
|
||||||
|
int p_colon;
|
||||||
|
while ((p_colon = options.indexOf(",")) >= 0) {
|
||||||
|
int p_equal = options.indexOf("=");
|
||||||
|
if (p_equal >= 0 && p_equal < p_colon) {
|
||||||
|
String key = options.substring(0, p_equal);
|
||||||
|
String value = options.substring(p_equal + 1, p_colon);
|
||||||
|
LOGln("Effects * Applying option: %s = %s", key.c_str(), value.c_str());
|
||||||
|
current_effect->apply_option(key, value);
|
||||||
|
}
|
||||||
|
options.remove(0, p_colon + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setup_effects() {
|
||||||
|
current_effect = new CycleEffect();
|
||||||
}
|
}
|
||||||
|
33
src/effects/analogclock.cpp
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
#include "effects/analogclock.h"
|
||||||
|
#include "my_fastled.h"
|
||||||
|
#include "ntp.h"
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
void AnalogClockEffect::loop(uint16_t ms) {
|
||||||
|
window->clear();
|
||||||
|
CRGB white(0xFFFFFF);
|
||||||
|
CRGB red(0xFF0000);
|
||||||
|
window->circle(8, 8, 7, &white);
|
||||||
|
|
||||||
|
time_t now;
|
||||||
|
tm timeinfo;
|
||||||
|
time(&now);
|
||||||
|
localtime_r(&now, &timeinfo);
|
||||||
|
uint16_t seconds = timeinfo.tm_sec * 1000 + (millis()%1000);
|
||||||
|
uint16_t angle = seconds * 0x10000 / 60000;
|
||||||
|
window->lineWithAngle(8, 8, angle, 12, &red);
|
||||||
|
//window->line(0<<8, 0<<8, 7<<8, 7<<8, &white);
|
||||||
|
//window->line(15<<8, 0<<8, 8<<8, 7<<8, &red);
|
||||||
|
//window->line(0<<8, 15<<8, 7<<8, 8<<8, &blue);
|
||||||
|
//window->line(15<<8, 15<<8, 8<<8, 8<<8, &green);
|
||||||
|
|
||||||
|
/*for (uint8_t i=0; i<=12; i++) {
|
||||||
|
window->lineWithAngle(8, 8, 255/12*i, 5, 2, &white);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t minutes = ntpClient.getMinutes();
|
||||||
|
uint8_t hours = ntpClient.getHours();
|
||||||
|
|
||||||
|
window->lineWithAngle(8, 8, 255/60*minutes, 6, &white);
|
||||||
|
window->lineWithAngle(8, 8, 255/12*(hours % 12), 4, &white);*/
|
||||||
|
}
|
53
src/effects/animation.cpp
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
#include "effects/animation.h"
|
||||||
|
#include "functions.h"
|
||||||
|
|
||||||
|
AnimationEffect::AnimationEffect(const char* name, uint32_t bg, int x, int y) {
|
||||||
|
this->name = name;
|
||||||
|
this->xOffset = x;
|
||||||
|
this->yOffset = y;
|
||||||
|
|
||||||
|
this->animation = new Animation(name, window);
|
||||||
|
this->animation->setBgColor(bg);
|
||||||
|
this->animation->setOffsets(this->xOffset, this->yOffset);
|
||||||
|
|
||||||
|
_last_blink_at = millis();
|
||||||
|
}
|
||||||
|
|
||||||
|
AnimationEffect* AnimationEffect::setFgColor(uint32_t c) {
|
||||||
|
animation->setFgColor(c);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
AnimationEffect* AnimationEffect::setBlinkFrequency(uint16_t ms) {
|
||||||
|
_blink_freq = ms;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
AnimationEffect::~AnimationEffect() {
|
||||||
|
delete this->animation;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AnimationEffect::loop(uint16_t ms) {
|
||||||
|
if (_blink_freq > 0) {
|
||||||
|
unsigned long mil = millis();
|
||||||
|
if (mil < _last_blink_at || _last_blink_at + _blink_freq <= mil) {
|
||||||
|
this->animation->invert();
|
||||||
|
_last_blink_at = mil;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this->animation->drawFrame();
|
||||||
|
this->animation->advance();
|
||||||
|
}
|
||||||
|
|
||||||
|
String AnimationEffect::get_name() {
|
||||||
|
String s = "animation/";
|
||||||
|
s += this->name;
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
AnimationEffect* AnimationEffect::Blinker(const char* name, uint16_t interval, uint32_t color, uint32_t background_color) {
|
||||||
|
AnimationEffect* anim = new AnimationEffect(name, background_color);
|
||||||
|
anim->setFgColor(color);
|
||||||
|
anim->setBlinkFrequency(interval);
|
||||||
|
return anim;
|
||||||
|
}
|
@ -1,9 +1,9 @@
|
|||||||
#include "Effect.h"
|
#include "Effect.h"
|
||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
#include "effect_bell.h"
|
#include "effects/bell.h"
|
||||||
#include "sprites.h"
|
#include "sprites.h"
|
||||||
|
|
||||||
void BellEffect::loop() {
|
void BellEffect::loop(uint16_t ms) {
|
||||||
Serial.println("This is Bell.loop()");
|
Serial.println("This is Bell.loop()");
|
||||||
for (int y = 0; y < 16; y++) {
|
for (int y = 0; y < 16; y++) {
|
||||||
for (int x = 0; x < 2; x++) {
|
for (int x = 0; x < 2; x++) {
|