This commit is contained in:
@ -1,34 +1,34 @@
|
||||
/**
|
||||
Animations are structured in AnimationData as follows:
|
||||
Animations are structured in AnimationData as follows:
|
||||
|
||||
.colors contains .color_count*3 uint8_t values for R, G and B.
|
||||
.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.
|
||||
.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].
|
||||
.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.
|
||||
.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.
|
||||
**/
|
||||
.w and .h contain the dimensions of the image.
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
#include <Arduino.h>
|
||||
@ -36,35 +36,35 @@
|
||||
#include "my_fastled.h"
|
||||
|
||||
class Animation {
|
||||
protected:
|
||||
AnimationData* data;
|
||||
unsigned long currentFrameSince;
|
||||
uint8_t currentFrame = 0;
|
||||
uint8_t* animation_data;
|
||||
CRGB* colors;
|
||||
CRGB* fgColor;
|
||||
CRGB* bgColor = new CRGB(0x000000);
|
||||
int8_t xOffset = 0;
|
||||
int8_t yOffset = 0;
|
||||
uint8_t startFrame;
|
||||
uint8_t endFrame;
|
||||
protected:
|
||||
AnimationData* data;
|
||||
unsigned long currentFrameSince;
|
||||
uint8_t currentFrame = 0;
|
||||
uint8_t* animation_data;
|
||||
CRGB* colors;
|
||||
CRGB* fgColor;
|
||||
CRGB* bgColor = new CRGB(0x000000);
|
||||
int8_t xOffset = 0;
|
||||
int8_t yOffset = 0;
|
||||
uint8_t startFrame;
|
||||
uint8_t endFrame;
|
||||
|
||||
virtual CRGB* getColor(uint8_t color_index);
|
||||
void drawFrame(uint8_t frame_index);
|
||||
void drawPixel(int index, CRGB* color);
|
||||
uint16_t getFrameDelay(int frame);
|
||||
public:
|
||||
Animation(AnimationData* d);
|
||||
void setFgColor(CRGB*);
|
||||
void setBgColor(CRGB* bg_color);
|
||||
bool invert();
|
||||
void setOffsets(int8_t x, int8_t y);
|
||||
void setStartFrame(uint8_t sf);
|
||||
void setEndFrame(uint8_t ef);
|
||||
void setFrameRange(uint8_t sf, uint8_t ef);
|
||||
void setSingleFrame(uint8_t frame);
|
||||
virtual ~Animation();
|
||||
void draw();
|
||||
void drawFrame();
|
||||
virtual bool advance();
|
||||
virtual CRGB* getColor(uint8_t color_index);
|
||||
void drawFrame(uint8_t frame_index);
|
||||
void drawPixel(int index, CRGB* color);
|
||||
uint16_t getFrameDelay(int frame);
|
||||
public:
|
||||
Animation(AnimationData* d);
|
||||
void setFgColor(CRGB*);
|
||||
void setBgColor(CRGB* bg_color);
|
||||
bool invert();
|
||||
void setOffsets(int8_t x, int8_t y);
|
||||
void setStartFrame(uint8_t sf);
|
||||
void setEndFrame(uint8_t ef);
|
||||
void setFrameRange(uint8_t sf, uint8_t ef);
|
||||
void setSingleFrame(uint8_t frame);
|
||||
virtual ~Animation();
|
||||
void draw();
|
||||
void drawFrame();
|
||||
virtual bool advance();
|
||||
};
|
||||
|
@ -6,15 +6,15 @@
|
||||
#include <Arduino.h>
|
||||
|
||||
class Effect {
|
||||
protected:
|
||||
protected:
|
||||
Window window = {0, 0, LED_WIDTH, LED_HEIGHT}; // Use a full screen window per default.
|
||||
public:
|
||||
public:
|
||||
virtual void loop() = 0;
|
||||
boolean supports_window = false;
|
||||
virtual boolean can_be_shown_with_clock() { return false; };
|
||||
virtual boolean clock_as_mask() { return false; };
|
||||
void setWindow(Window win) {
|
||||
window = win;
|
||||
window = win;
|
||||
};
|
||||
virtual void start() {}
|
||||
virtual void stop() {}
|
||||
|
@ -4,8 +4,8 @@
|
||||
#include "Effect.h"
|
||||
|
||||
typedef struct {
|
||||
const char* name;
|
||||
Effect* effect;
|
||||
const char* name;
|
||||
Effect* effect;
|
||||
} EffectEntry;
|
||||
|
||||
#endif
|
||||
|
@ -1,34 +1,34 @@
|
||||
/**
|
||||
Animations are structured in AnimationData as follows:
|
||||
Animations are structured in AnimationData as follows:
|
||||
|
||||
.colors contains .color_count*3 uint8_t values for R, G and B.
|
||||
.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.
|
||||
.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].
|
||||
.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.
|
||||
.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.
|
||||
**/
|
||||
.w and .h contain the dimensions of the image.
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
#include <Arduino.h>
|
||||
|
@ -63,24 +63,24 @@
|
||||
#define EFFECT_FIREWORK_SHOT_CHANCE 200
|
||||
#define EFFECT_FIREWORK_BLUR 200
|
||||
#define EFFECT_FIREWORK_FADEOUT_SPEED 5
|
||||
|
||||
|
||||
|
||||
// Stop editing here
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef MQTT_ENABLE
|
||||
#include "my_mqtt.h"
|
||||
#define LOG(x) mqtt_log(x); Serial.print(x);
|
||||
#define LOGln(x) mqtt_log_ln(x); Serial.println(x);
|
||||
#else
|
||||
#define LOG(x) Serial.print(x);
|
||||
#define LOGln(x) Serial.println(x);
|
||||
#endif
|
||||
#ifdef MQTT_ENABLE
|
||||
#include "my_mqtt.h"
|
||||
#define LOG(x) mqtt_log(x); Serial.print(x);
|
||||
#define LOGln(x) mqtt_log_ln(x); Serial.println(x);
|
||||
#else
|
||||
#define LOG(x) Serial.print(x);
|
||||
#define LOGln(x) Serial.println(x);
|
||||
#endif
|
||||
#else
|
||||
#define LOG(x) do {} while(0);
|
||||
#define LOGln(x) do {} while(0);
|
||||
#define LOG(x) do {} while(0);
|
||||
#define LOGln(x) do {} while(0);
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_USABLE
|
||||
#error "CONFIG_USABLE isn't set!"
|
||||
#error "CONFIG_USABLE isn't set!"
|
||||
#endif
|
||||
|
@ -6,13 +6,13 @@
|
||||
#include "Animation.h"
|
||||
|
||||
class AnimationEffect : public Effect {
|
||||
private:
|
||||
private:
|
||||
Animation *animation;
|
||||
AnimationData *animation_data;
|
||||
CRGB *bg_color;
|
||||
uint16_t xOffset;
|
||||
uint16_t yOffset;
|
||||
public:
|
||||
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);
|
||||
|
@ -5,11 +5,11 @@
|
||||
#include "functions.h"
|
||||
|
||||
class BellEffect : public Effect {
|
||||
private:
|
||||
private:
|
||||
CRGB color_on = CRGB(0xFFFF00);
|
||||
CRGB color_off = CRGB(0x000000);
|
||||
boolean invert = false;
|
||||
public:
|
||||
public:
|
||||
void loop();
|
||||
};
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include "Effect.h"
|
||||
|
||||
class BigClockEffect : public Effect {
|
||||
private:
|
||||
private:
|
||||
CRGB color_h = CRGB(0xFF0000);
|
||||
CRGB color_m = CRGB(0x00FF00);
|
||||
CRGB color_colon = CRGB(0xFFFF00);
|
||||
@ -17,7 +17,7 @@ class BigClockEffect : public Effect {
|
||||
|
||||
void drawSprite(const unsigned char* sprite, int xOffset, int yOffset, CRGB color);
|
||||
|
||||
public:
|
||||
public:
|
||||
void loop();
|
||||
};
|
||||
|
||||
|
@ -6,10 +6,10 @@
|
||||
#include <FastLED.h>
|
||||
|
||||
class ClockEffect : public Effect {
|
||||
private:
|
||||
private:
|
||||
Window window = {0, LED_HEIGHT - 6, LED_WIDTH, 6};
|
||||
|
||||
public:
|
||||
public:
|
||||
void loop();
|
||||
void loop(boolean invert, CRGB fg_color, CRGB bg_color);
|
||||
};
|
||||
|
@ -5,11 +5,11 @@
|
||||
#include "effects.h"
|
||||
|
||||
class CycleEffect : public Effect {
|
||||
private:
|
||||
private:
|
||||
Effect* effect;
|
||||
uint16_t effect_id = -1;
|
||||
unsigned long effectSince = 0;
|
||||
public:
|
||||
public:
|
||||
void changeEffect();
|
||||
void start();
|
||||
void stop();
|
||||
|
@ -3,13 +3,13 @@
|
||||
#include "config.h"
|
||||
|
||||
class SingleDynamicEffect : public Effect {
|
||||
protected:
|
||||
protected:
|
||||
static const int factor = 2;
|
||||
static const int tile_count = LED_WIDTH/factor * LED_HEIGHT/factor;
|
||||
CRGB tiles[tile_count];
|
||||
CRGB old_tiles[tile_count];
|
||||
uint8_t blend = 0;
|
||||
public:
|
||||
public:
|
||||
SingleDynamicEffect();
|
||||
void init();
|
||||
boolean can_be_shown_with_clock();
|
||||
@ -18,6 +18,6 @@ class SingleDynamicEffect : public Effect {
|
||||
};
|
||||
|
||||
class MultiDynamicEffect : public SingleDynamicEffect {
|
||||
public:
|
||||
public:
|
||||
void loop();
|
||||
};
|
||||
|
@ -3,17 +3,17 @@
|
||||
#include "my_fastled.h"
|
||||
|
||||
class FireEffect : public Effect {
|
||||
private:
|
||||
uint8_t* data;
|
||||
uint8_t spark_temp();
|
||||
void cooldown();
|
||||
void spark();
|
||||
void propagate();
|
||||
void draw();
|
||||
static CRGBPalette16 palette;
|
||||
|
||||
public:
|
||||
void start();
|
||||
void stop();
|
||||
void loop();
|
||||
private:
|
||||
uint8_t* data;
|
||||
uint8_t spark_temp();
|
||||
void cooldown();
|
||||
void spark();
|
||||
void propagate();
|
||||
void draw();
|
||||
static CRGBPalette16 palette;
|
||||
|
||||
public:
|
||||
void start();
|
||||
void stop();
|
||||
void loop();
|
||||
};
|
||||
|
@ -8,14 +8,14 @@
|
||||
#include "my_color_palettes.h"
|
||||
|
||||
class MatrixEffectColumn {
|
||||
private:
|
||||
private:
|
||||
int x, y;
|
||||
int length;
|
||||
Window* window;
|
||||
uint16_t speed;
|
||||
boolean running;
|
||||
unsigned long last_move = 0;
|
||||
public:
|
||||
public:
|
||||
MatrixEffectColumn();
|
||||
MatrixEffectColumn(Window* win, int xPos);
|
||||
|
||||
@ -29,9 +29,9 @@ class MatrixEffectColumn {
|
||||
};
|
||||
|
||||
class MatrixEffect : public Effect {
|
||||
private:
|
||||
private:
|
||||
MatrixEffectColumn columns[LED_WIDTH];
|
||||
public:
|
||||
public:
|
||||
boolean can_be_shown_with_clock();
|
||||
MatrixEffect();
|
||||
void loop();
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "Effect.h"
|
||||
|
||||
class Sinematrix3Effect : public Effect {
|
||||
private:
|
||||
private:
|
||||
double pangle = 0;
|
||||
double angle = 0;
|
||||
double sx = 0;
|
||||
@ -27,7 +27,7 @@ class Sinematrix3Effect : public Effect {
|
||||
double fy = 1.0 / (LED_HEIGHT / PI);
|
||||
Matrix rotate;
|
||||
|
||||
public:
|
||||
public:
|
||||
boolean supports_window = true;
|
||||
boolean can_be_shown_with_clock();
|
||||
boolean clock_as_mask();
|
||||
|
@ -5,9 +5,9 @@
|
||||
#include "my_fastled.h"
|
||||
|
||||
class StaticEffect : public Effect {
|
||||
private:
|
||||
private:
|
||||
CRGB color;
|
||||
public:
|
||||
public:
|
||||
StaticEffect(CRGB col);
|
||||
boolean supports_window = true;
|
||||
void loop();
|
||||
|
@ -5,11 +5,11 @@
|
||||
#include <Arduino.h>
|
||||
|
||||
class TwirlEffect : public Effect {
|
||||
private:
|
||||
private:
|
||||
uint8_t angleOffset = 0;
|
||||
double center_x = 8;
|
||||
double center_y = 8;
|
||||
public:
|
||||
public:
|
||||
void loop();
|
||||
};
|
||||
|
||||
|
@ -28,22 +28,22 @@ void blur_row(uint8_t row_index, fract8 blur_amount);
|
||||
void blur_column(uint8_t column_index, fract8 blur_amount);
|
||||
|
||||
inline double sines(double x, double y) {
|
||||
return ((cos(x) * sin(y)) * 0.5) + 0.5;
|
||||
return ((cos(x) * sin(y)) * 0.5) + 0.5;
|
||||
}
|
||||
|
||||
inline double basefield(double x, double y) {
|
||||
return (cos(x) * sin(y) * cos(sqrt((x*x) + (y*y))));
|
||||
return (cos(x) * sin(y) * cos(sqrt((x*x) + (y*y))));
|
||||
}
|
||||
|
||||
inline double addmod(double x, double mod, double delta) {
|
||||
x = x + delta;
|
||||
while( x >= mod ) x -= mod;
|
||||
while( x < 0.0 ) x += mod;
|
||||
return x;
|
||||
x = x + delta;
|
||||
while( x >= mod ) x -= mod;
|
||||
while( x < 0.0 ) x += mod;
|
||||
return x;
|
||||
}
|
||||
|
||||
inline double addmodpi(double x, double delta) {
|
||||
return addmod(x, 2*PI, delta);
|
||||
return addmod(x, 2*PI, delta);
|
||||
}
|
||||
|
||||
|
||||
|
@ -4,34 +4,34 @@
|
||||
#include <Arduino.h>
|
||||
|
||||
typedef struct {
|
||||
uint8_t *colors;
|
||||
uint8_t *data;
|
||||
uint16_t *offsets;
|
||||
uint16_t *delays;
|
||||
boolean individual_delays;
|
||||
int color_count;
|
||||
int frame_count;
|
||||
int w;
|
||||
int h;
|
||||
uint8_t *colors;
|
||||
uint8_t *data;
|
||||
uint16_t *offsets;
|
||||
uint16_t *delays;
|
||||
boolean individual_delays;
|
||||
int color_count;
|
||||
int frame_count;
|
||||
int w;
|
||||
int h;
|
||||
} AnimationData;
|
||||
|
||||
typedef struct {
|
||||
uint8_t x;
|
||||
uint8_t y;
|
||||
uint8_t w;
|
||||
uint8_t h;
|
||||
uint8_t x;
|
||||
uint8_t y;
|
||||
uint8_t w;
|
||||
uint8_t h;
|
||||
} Window;
|
||||
|
||||
typedef struct Vector {
|
||||
double x1;
|
||||
double x2;
|
||||
double x1;
|
||||
double x2;
|
||||
} Vector;
|
||||
|
||||
typedef struct Matrix {
|
||||
double a11;
|
||||
double a12;
|
||||
double a21;
|
||||
double a22;
|
||||
double a11;
|
||||
double a12;
|
||||
double a21;
|
||||
double a22;
|
||||
} Matrix;
|
||||
|
||||
typedef struct {
|
||||
|
@ -1,18 +1,18 @@
|
||||
static unsigned char sprite_bell[] = {
|
||||
0b00000001, 0b10000000,
|
||||
0b00000010, 0b01000000,
|
||||
0b00001111, 0b11110000,
|
||||
0b00010000, 0b00001000,
|
||||
0b00100000, 0b00100100,
|
||||
0b00100000, 0b00110100,
|
||||
0b00100000, 0b00110100,
|
||||
0b00100000, 0b00110100,
|
||||
0b00100000, 0b00110100,
|
||||
0b00100000, 0b00110100,
|
||||
0b00100000, 0b00000100,
|
||||
0b01000000, 0b11111010,
|
||||
0b01000000, 0b00000010,
|
||||
0b00111111, 0b11111100,
|
||||
0b00000100, 0b00100000,
|
||||
0b00000011, 0b11000000
|
||||
0b00000001, 0b10000000,
|
||||
0b00000010, 0b01000000,
|
||||
0b00001111, 0b11110000,
|
||||
0b00010000, 0b00001000,
|
||||
0b00100000, 0b00100100,
|
||||
0b00100000, 0b00110100,
|
||||
0b00100000, 0b00110100,
|
||||
0b00100000, 0b00110100,
|
||||
0b00100000, 0b00110100,
|
||||
0b00100000, 0b00110100,
|
||||
0b00100000, 0b00000100,
|
||||
0b01000000, 0b11111010,
|
||||
0b01000000, 0b00000010,
|
||||
0b00111111, 0b11111100,
|
||||
0b00000100, 0b00100000,
|
||||
0b00000011, 0b11000000
|
||||
};
|
||||
|
232
include/text.h
232
include/text.h
@ -4,128 +4,128 @@
|
||||
#include "functions.h"
|
||||
|
||||
const unsigned char font5x7[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,// (space)
|
||||
0x00, 0x00, 0x5F, 0x00, 0x00,// !
|
||||
0x00, 0x07, 0x00, 0x07, 0x00,// "
|
||||
0x14, 0x7F, 0x14, 0x7F, 0x14,// #
|
||||
0x24, 0x2A, 0x7F, 0x2A, 0x12,// $
|
||||
0x23, 0x13, 0x08, 0x64, 0x62,// %
|
||||
0x36, 0x49, 0x55, 0x22, 0x50,// &
|
||||
0x00, 0x05, 0x03, 0x00, 0x00,// '
|
||||
0x00, 0x1C, 0x22, 0x41, 0x00,// (
|
||||
0x00, 0x41, 0x22, 0x1C, 0x00,// )
|
||||
0x08, 0x2A, 0x1C, 0x2A, 0x08,// *
|
||||
0x08, 0x08, 0x3E, 0x08, 0x08,// +
|
||||
0x00, 0x50, 0x30, 0x00, 0x00,// ,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08,// -
|
||||
0x00, 0x60, 0x60, 0x00, 0x00,// .
|
||||
0x20, 0x10, 0x08, 0x04, 0x02,// /
|
||||
0x3E, 0x51, 0x49, 0x45, 0x3E,// 0
|
||||
0x00, 0x42, 0x7F, 0x40, 0x00,// 1
|
||||
0x42, 0x61, 0x51, 0x49, 0x46,// 2
|
||||
0x21, 0x41, 0x45, 0x4B, 0x31,// 3
|
||||
0x18, 0x14, 0x12, 0x7F, 0x10,// 4
|
||||
0x27, 0x45, 0x45, 0x45, 0x39,// 5
|
||||
0x3C, 0x4A, 0x49, 0x49, 0x30,// 6
|
||||
0x01, 0x71, 0x09, 0x05, 0x03,// 7
|
||||
0x36, 0x49, 0x49, 0x49, 0x36,// 8
|
||||
0x06, 0x49, 0x49, 0x29, 0x1E,// 9
|
||||
0x00, 0x36, 0x36, 0x00, 0x00,// :
|
||||
0x00, 0x56, 0x36, 0x00, 0x00,// ;
|
||||
0x00, 0x08, 0x14, 0x22, 0x41,// <
|
||||
0x14, 0x14, 0x14, 0x14, 0x14,// =
|
||||
0x41, 0x22, 0x14, 0x08, 0x00,// >
|
||||
0x02, 0x01, 0x51, 0x09, 0x06,// ?
|
||||
0x32, 0x49, 0x79, 0x41, 0x3E,// @
|
||||
0x7E, 0x11, 0x11, 0x11, 0x7E,// A
|
||||
0x7F, 0x49, 0x49, 0x49, 0x36,// B
|
||||
0x3E, 0x41, 0x41, 0x41, 0x22,// C
|
||||
0x7F, 0x41, 0x41, 0x22, 0x1C,// D
|
||||
0x7F, 0x49, 0x49, 0x49, 0x41,// E
|
||||
0x7F, 0x09, 0x09, 0x01, 0x01,// F
|
||||
0x3E, 0x41, 0x41, 0x51, 0x32,// G
|
||||
0x7F, 0x08, 0x08, 0x08, 0x7F,// H
|
||||
0x00, 0x41, 0x7F, 0x41, 0x00,// I
|
||||
0x20, 0x40, 0x41, 0x3F, 0x01,// J
|
||||
0x7F, 0x08, 0x14, 0x22, 0x41,// K
|
||||
0x7F, 0x40, 0x40, 0x40, 0x40,// L
|
||||
0x7F, 0x02, 0x04, 0x02, 0x7F,// M
|
||||
0x7F, 0x04, 0x08, 0x10, 0x7F,// N
|
||||
0x3E, 0x41, 0x41, 0x41, 0x3E,// O
|
||||
0x7F, 0x09, 0x09, 0x09, 0x06,// P
|
||||
0x3E, 0x41, 0x51, 0x21, 0x5E,// Q
|
||||
0x7F, 0x09, 0x19, 0x29, 0x46,// R
|
||||
0x46, 0x49, 0x49, 0x49, 0x31,// S
|
||||
0x01, 0x01, 0x7F, 0x01, 0x01,// T
|
||||
0x3F, 0x40, 0x40, 0x40, 0x3F,// U
|
||||
0x1F, 0x20, 0x40, 0x20, 0x1F,// V
|
||||
0x7F, 0x20, 0x18, 0x20, 0x7F,// W
|
||||
0x63, 0x14, 0x08, 0x14, 0x63,// X
|
||||
0x03, 0x04, 0x78, 0x04, 0x03,// Y
|
||||
0x61, 0x51, 0x49, 0x45, 0x43,// Z
|
||||
0x00, 0x00, 0x7F, 0x41, 0x41,// [
|
||||
0x02, 0x04, 0x08, 0x10, 0x20,// "\"
|
||||
0x41, 0x41, 0x7F, 0x00, 0x00,// ]
|
||||
0x04, 0x02, 0x01, 0x02, 0x04,// ^
|
||||
0x40, 0x40, 0x40, 0x40, 0x40,// _
|
||||
0x00, 0x01, 0x02, 0x04, 0x00,// `
|
||||
0x20, 0x54, 0x54, 0x54, 0x78,// a
|
||||
0x7F, 0x48, 0x44, 0x44, 0x38,// b
|
||||
0x38, 0x44, 0x44, 0x44, 0x20,// c
|
||||
0x38, 0x44, 0x44, 0x48, 0x7F,// d
|
||||
0x38, 0x54, 0x54, 0x54, 0x18,// e
|
||||
0x08, 0x7E, 0x09, 0x01, 0x02,// f
|
||||
0x08, 0x14, 0x54, 0x54, 0x3C,// g
|
||||
0x7F, 0x08, 0x04, 0x04, 0x78,// h
|
||||
0x00, 0x44, 0x7D, 0x40, 0x00,// i
|
||||
0x20, 0x40, 0x44, 0x3D, 0x00,// j
|
||||
0x00, 0x7F, 0x10, 0x28, 0x44,// k
|
||||
0x00, 0x41, 0x7F, 0x40, 0x00,// l
|
||||
0x7C, 0x04, 0x18, 0x04, 0x78,// m
|
||||
0x7C, 0x08, 0x04, 0x04, 0x78,// n
|
||||
0x38, 0x44, 0x44, 0x44, 0x38,// o
|
||||
0x7C, 0x14, 0x14, 0x14, 0x08,// p
|
||||
0x08, 0x14, 0x14, 0x18, 0x7C,// q
|
||||
0x7C, 0x08, 0x04, 0x04, 0x08,// r
|
||||
0x48, 0x54, 0x54, 0x54, 0x20,// s
|
||||
0x04, 0x3F, 0x44, 0x40, 0x20,// t
|
||||
0x3C, 0x40, 0x40, 0x20, 0x7C,// u
|
||||
0x1C, 0x20, 0x40, 0x20, 0x1C,// v
|
||||
0x3C, 0x40, 0x30, 0x40, 0x3C,// w
|
||||
0x44, 0x28, 0x10, 0x28, 0x44,// x
|
||||
0x0C, 0x50, 0x50, 0x50, 0x3C,// y
|
||||
0x44, 0x64, 0x54, 0x4C, 0x44,// z
|
||||
0x00, 0x08, 0x36, 0x41, 0x00,// {
|
||||
0x00, 0x00, 0x7F, 0x00, 0x00,// |
|
||||
0x00, 0x41, 0x36, 0x08, 0x00,// }
|
||||
0x08, 0x08, 0x2A, 0x1C, 0x08,// ->
|
||||
0x08, 0x1C, 0x2A, 0x08, 0x08 // <-
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,// (space)
|
||||
0x00, 0x00, 0x5F, 0x00, 0x00,// !
|
||||
0x00, 0x07, 0x00, 0x07, 0x00,// "
|
||||
0x14, 0x7F, 0x14, 0x7F, 0x14,// #
|
||||
0x24, 0x2A, 0x7F, 0x2A, 0x12,// $
|
||||
0x23, 0x13, 0x08, 0x64, 0x62,// %
|
||||
0x36, 0x49, 0x55, 0x22, 0x50,// &
|
||||
0x00, 0x05, 0x03, 0x00, 0x00,// '
|
||||
0x00, 0x1C, 0x22, 0x41, 0x00,// (
|
||||
0x00, 0x41, 0x22, 0x1C, 0x00,// )
|
||||
0x08, 0x2A, 0x1C, 0x2A, 0x08,// *
|
||||
0x08, 0x08, 0x3E, 0x08, 0x08,// +
|
||||
0x00, 0x50, 0x30, 0x00, 0x00,// ,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08,// -
|
||||
0x00, 0x60, 0x60, 0x00, 0x00,// .
|
||||
0x20, 0x10, 0x08, 0x04, 0x02,// /
|
||||
0x3E, 0x51, 0x49, 0x45, 0x3E,// 0
|
||||
0x00, 0x42, 0x7F, 0x40, 0x00,// 1
|
||||
0x42, 0x61, 0x51, 0x49, 0x46,// 2
|
||||
0x21, 0x41, 0x45, 0x4B, 0x31,// 3
|
||||
0x18, 0x14, 0x12, 0x7F, 0x10,// 4
|
||||
0x27, 0x45, 0x45, 0x45, 0x39,// 5
|
||||
0x3C, 0x4A, 0x49, 0x49, 0x30,// 6
|
||||
0x01, 0x71, 0x09, 0x05, 0x03,// 7
|
||||
0x36, 0x49, 0x49, 0x49, 0x36,// 8
|
||||
0x06, 0x49, 0x49, 0x29, 0x1E,// 9
|
||||
0x00, 0x36, 0x36, 0x00, 0x00,// :
|
||||
0x00, 0x56, 0x36, 0x00, 0x00,// ;
|
||||
0x00, 0x08, 0x14, 0x22, 0x41,// <
|
||||
0x14, 0x14, 0x14, 0x14, 0x14,// =
|
||||
0x41, 0x22, 0x14, 0x08, 0x00,// >
|
||||
0x02, 0x01, 0x51, 0x09, 0x06,// ?
|
||||
0x32, 0x49, 0x79, 0x41, 0x3E,// @
|
||||
0x7E, 0x11, 0x11, 0x11, 0x7E,// A
|
||||
0x7F, 0x49, 0x49, 0x49, 0x36,// B
|
||||
0x3E, 0x41, 0x41, 0x41, 0x22,// C
|
||||
0x7F, 0x41, 0x41, 0x22, 0x1C,// D
|
||||
0x7F, 0x49, 0x49, 0x49, 0x41,// E
|
||||
0x7F, 0x09, 0x09, 0x01, 0x01,// F
|
||||
0x3E, 0x41, 0x41, 0x51, 0x32,// G
|
||||
0x7F, 0x08, 0x08, 0x08, 0x7F,// H
|
||||
0x00, 0x41, 0x7F, 0x41, 0x00,// I
|
||||
0x20, 0x40, 0x41, 0x3F, 0x01,// J
|
||||
0x7F, 0x08, 0x14, 0x22, 0x41,// K
|
||||
0x7F, 0x40, 0x40, 0x40, 0x40,// L
|
||||
0x7F, 0x02, 0x04, 0x02, 0x7F,// M
|
||||
0x7F, 0x04, 0x08, 0x10, 0x7F,// N
|
||||
0x3E, 0x41, 0x41, 0x41, 0x3E,// O
|
||||
0x7F, 0x09, 0x09, 0x09, 0x06,// P
|
||||
0x3E, 0x41, 0x51, 0x21, 0x5E,// Q
|
||||
0x7F, 0x09, 0x19, 0x29, 0x46,// R
|
||||
0x46, 0x49, 0x49, 0x49, 0x31,// S
|
||||
0x01, 0x01, 0x7F, 0x01, 0x01,// T
|
||||
0x3F, 0x40, 0x40, 0x40, 0x3F,// U
|
||||
0x1F, 0x20, 0x40, 0x20, 0x1F,// V
|
||||
0x7F, 0x20, 0x18, 0x20, 0x7F,// W
|
||||
0x63, 0x14, 0x08, 0x14, 0x63,// X
|
||||
0x03, 0x04, 0x78, 0x04, 0x03,// Y
|
||||
0x61, 0x51, 0x49, 0x45, 0x43,// Z
|
||||
0x00, 0x00, 0x7F, 0x41, 0x41,// [
|
||||
0x02, 0x04, 0x08, 0x10, 0x20,// "\"
|
||||
0x41, 0x41, 0x7F, 0x00, 0x00,// ]
|
||||
0x04, 0x02, 0x01, 0x02, 0x04,// ^
|
||||
0x40, 0x40, 0x40, 0x40, 0x40,// _
|
||||
0x00, 0x01, 0x02, 0x04, 0x00,// `
|
||||
0x20, 0x54, 0x54, 0x54, 0x78,// a
|
||||
0x7F, 0x48, 0x44, 0x44, 0x38,// b
|
||||
0x38, 0x44, 0x44, 0x44, 0x20,// c
|
||||
0x38, 0x44, 0x44, 0x48, 0x7F,// d
|
||||
0x38, 0x54, 0x54, 0x54, 0x18,// e
|
||||
0x08, 0x7E, 0x09, 0x01, 0x02,// f
|
||||
0x08, 0x14, 0x54, 0x54, 0x3C,// g
|
||||
0x7F, 0x08, 0x04, 0x04, 0x78,// h
|
||||
0x00, 0x44, 0x7D, 0x40, 0x00,// i
|
||||
0x20, 0x40, 0x44, 0x3D, 0x00,// j
|
||||
0x00, 0x7F, 0x10, 0x28, 0x44,// k
|
||||
0x00, 0x41, 0x7F, 0x40, 0x00,// l
|
||||
0x7C, 0x04, 0x18, 0x04, 0x78,// m
|
||||
0x7C, 0x08, 0x04, 0x04, 0x78,// n
|
||||
0x38, 0x44, 0x44, 0x44, 0x38,// o
|
||||
0x7C, 0x14, 0x14, 0x14, 0x08,// p
|
||||
0x08, 0x14, 0x14, 0x18, 0x7C,// q
|
||||
0x7C, 0x08, 0x04, 0x04, 0x08,// r
|
||||
0x48, 0x54, 0x54, 0x54, 0x20,// s
|
||||
0x04, 0x3F, 0x44, 0x40, 0x20,// t
|
||||
0x3C, 0x40, 0x40, 0x20, 0x7C,// u
|
||||
0x1C, 0x20, 0x40, 0x20, 0x1C,// v
|
||||
0x3C, 0x40, 0x30, 0x40, 0x3C,// w
|
||||
0x44, 0x28, 0x10, 0x28, 0x44,// x
|
||||
0x0C, 0x50, 0x50, 0x50, 0x3C,// y
|
||||
0x44, 0x64, 0x54, 0x4C, 0x44,// z
|
||||
0x00, 0x08, 0x36, 0x41, 0x00,// {
|
||||
0x00, 0x00, 0x7F, 0x00, 0x00,// |
|
||||
0x00, 0x41, 0x36, 0x08, 0x00,// }
|
||||
0x08, 0x08, 0x2A, 0x1C, 0x08,// ->
|
||||
0x08, 0x1C, 0x2A, 0x08, 0x08 // <-
|
||||
};
|
||||
|
||||
const unsigned char numbers4x7[] = {
|
||||
0x3E, 0x51, 0x45, 0x3E,// 0
|
||||
0x00, 0x42, 0x7F, 0x40,// 1
|
||||
0x42, 0x61, 0x49, 0x46,// 2
|
||||
0x21, 0x45, 0x4B, 0x31,// 3
|
||||
0x18, 0x14, 0x7F, 0x10,// 4
|
||||
0x27, 0x45, 0x45, 0x39,// 5
|
||||
0x3C, 0x4A, 0x49, 0x30,// 6
|
||||
0x01, 0x71, 0x09, 0x05,// 7
|
||||
0x36, 0x49, 0x49, 0x36,// 8
|
||||
0x06, 0x49, 0x29, 0x1E // 9
|
||||
0x3E, 0x51, 0x45, 0x3E,// 0
|
||||
0x00, 0x42, 0x7F, 0x40,// 1
|
||||
0x42, 0x61, 0x49, 0x46,// 2
|
||||
0x21, 0x45, 0x4B, 0x31,// 3
|
||||
0x18, 0x14, 0x7F, 0x10,// 4
|
||||
0x27, 0x45, 0x45, 0x39,// 5
|
||||
0x3C, 0x4A, 0x49, 0x30,// 6
|
||||
0x01, 0x71, 0x09, 0x05,// 7
|
||||
0x36, 0x49, 0x49, 0x36,// 8
|
||||
0x06, 0x49, 0x29, 0x1E // 9
|
||||
};
|
||||
|
||||
const unsigned char numbers3x5[] = {
|
||||
B01110, B10001, B01110, // 0
|
||||
B01000, B11111, B00000, // 1
|
||||
B01001, B10011, B01101, // 2
|
||||
B10001, B10101, B01010, // 3
|
||||
B11100, B00100, B11111, // 4
|
||||
B11101, B10101, B10111, // 5
|
||||
B01110, B10101, B10110, // 6
|
||||
B10000, B10011, B11100, // 7
|
||||
B11111, B10101, B11111, // 8
|
||||
B11101, B10101, B11111, // 9
|
||||
B01110, B10001, B01110, // 0
|
||||
B01000, B11111, B00000, // 1
|
||||
B01001, B10011, B01101, // 2
|
||||
B10001, B10101, B01010, // 3
|
||||
B11100, B00100, B11111, // 4
|
||||
B11101, B10101, B10111, // 5
|
||||
B01110, B10101, B10110, // 6
|
||||
B10000, B10011, B11100, // 7
|
||||
B11111, B10101, B11111, // 8
|
||||
B11101, B10101, B11111, // 9
|
||||
};
|
||||
|
||||
void drawTextSprite(Window window, const unsigned char* sprite, int w, int h, int xPos, int yPos, CRGB color, boolean invert);
|
||||
|
Reference in New Issue
Block a user