Got rid of (most of) all of the warnings.
This commit is contained in:
parent
711d028e90
commit
0d3896ca0d
@ -4,7 +4,7 @@
|
|||||||
#include "Effect.h"
|
#include "Effect.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char* name;
|
const char* name;
|
||||||
Effect* effect;
|
Effect* effect;
|
||||||
} EffectEntry;
|
} EffectEntry;
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ class AnimationEffect : public Effect {
|
|||||||
int frame = 0;
|
int frame = 0;
|
||||||
CRGB background_color;
|
CRGB background_color;
|
||||||
int xOffset, yOffset;
|
int xOffset, yOffset;
|
||||||
long frameSince = 0;
|
unsigned long frameSince = 0;
|
||||||
public:
|
public:
|
||||||
AnimationEffect(AnimationData *anim);
|
AnimationEffect(AnimationData *anim);
|
||||||
AnimationEffect(AnimationData *anim, CRGB background_color);
|
AnimationEffect(AnimationData *anim, CRGB background_color);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
class CycleEffect : public Effect {
|
class CycleEffect : public Effect {
|
||||||
private:
|
private:
|
||||||
Effect* effect;
|
Effect* effect;
|
||||||
long effectSince = 0;
|
unsigned long effectSince = 0;
|
||||||
public:
|
public:
|
||||||
void changeEffect();
|
void changeEffect();
|
||||||
|
|
||||||
|
@ -11,9 +11,9 @@ class MatrixEffectColumn {
|
|||||||
int x, y;
|
int x, y;
|
||||||
int length;
|
int length;
|
||||||
Window* window;
|
Window* window;
|
||||||
int speed;
|
uint16_t speed;
|
||||||
boolean running;
|
boolean running;
|
||||||
long last_move = 0;
|
unsigned long last_move = 0;
|
||||||
public:
|
public:
|
||||||
MatrixEffectColumn();
|
MatrixEffectColumn();
|
||||||
MatrixEffectColumn(Window* win, int xPos);
|
MatrixEffectColumn(Window* win, int xPos);
|
||||||
|
@ -8,7 +8,7 @@ void BellEffect::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++) {
|
||||||
for (int z = 0; z < 8; z++) {
|
for (int z = 0; z < 8; z++) {
|
||||||
leds[XYsafe(x * 8 + z, y)] = sprite_bell[y * 2 + x] >> (7 - z) & 1 ^ invert ? color_on : color_off;
|
leds[XYsafe(x * 8 + z, y)] = (sprite_bell[y * 2 + x] >> (7 - z) & 1) ^ invert ? color_on : color_off;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ void BigClockEffect::drawNumber(uint8_t number, int x, int y, CRGB color) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void BigClockEffect::drawText(char *text, int x, int y, CRGB color) {
|
void BigClockEffect::drawText(char *text, int x, int y, CRGB color) {
|
||||||
for (int i = 0; i < strlen(text); i++) {
|
for (uint8_t i = 0; i < strlen(text); i++) {
|
||||||
drawSprite(font_char(numbers4x7, text[i]), x + i * 4, y, color);
|
drawSprite(font_char(numbers4x7, text[i]), x + i * 4, y, color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#include <FastLED.h>
|
|
||||||
#include "my_fastled.h"
|
#include "my_fastled.h"
|
||||||
|
|
||||||
CRGB leds[LED_COUNT];
|
CRGB leds[LED_COUNT];
|
||||||
|
@ -20,7 +20,7 @@ void drawDigit(Window window, unsigned char* font, int w, int h, int x, int y, i
|
|||||||
}
|
}
|
||||||
|
|
||||||
void drawText(Window window, char *font, int w, int h, char *text, int x, int y, CRGB color) {
|
void drawText(Window window, char *font, int w, int h, char *text, int x, int y, CRGB color) {
|
||||||
for (int i = 0; i < strlen(text); i++) {
|
for (uint16_t i = 0; i < strlen(text); i++) {
|
||||||
drawChar(window, font5x7, 5, 7, x+i*(w+1), y, text[i], color);
|
drawChar(window, font5x7, 5, 7, x+i*(w+1), y, text[i], color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user