Merge branch 'master' of https://git.schle.nz/fabian/pitrix
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
2019-10-15 20:06:38 +02:00
12 changed files with 103 additions and 37 deletions

View File

@ -6,10 +6,12 @@ class BigClockEffect : public Effect {
private:
CRGB _color_font = CRGB(0xAAAAAA);
CRGB _color_seconds_light = CRGB(0xFFFF00);
CRGB _color_seconds_dark = CRGB(0xFF0000);
CRGB _color_seconds_dark = CRGB(0xAA0000);
CRGB _color_seconds_moving_light = CRGB(0x666600);
CRGB _color_seconds_moving_dark = CRGB(0x660000);
void _draw_seconds();
void _draw_border_pixel(uint8_t second, uint8_t part, CRGB* color);
void _draw_border_pixel(accum88 pos, CRGB* color);
public:
void loop(uint16_t ms);

View File

@ -4,6 +4,12 @@
#include "functions.h"
#include "Effect.h"
enum SinematrixColorScheme {
SINEMATRIX_COLOR_PASTEL_RAINBOW,
SINEMATRIX_COLOR_RAINBOW,
SINEMATRIX_COLOR_PURPLEFLY,
};
class Sinematrix3Effect : public Effect {
private:
double pangle = 0;
@ -25,12 +31,14 @@ private:
double fx = 1.0 / (LED_WIDTH / PI);
double fy = 1.0 / (LED_HEIGHT / PI);
Matrix rotate;
SinematrixColorScheme _color_scheme;
CRGB _get_color(int value);
public:
Sinematrix3Effect(SinematrixColorScheme s = SINEMATRIX_COLOR_PASTEL_RAINBOW): _color_scheme(s) {};
boolean supports_window = true;
boolean can_be_shown_with_clock();
boolean clock_as_mask();
void loop(uint16_t ms);
String get_name() override { return "sinematrix3"; }
};

View File

@ -6,3 +6,4 @@
extern const TProgmemRGBGradientPalette_byte palette_fire[] FL_PROGMEM;
extern const TProgmemRGBGradientPalette_byte palette_matrix[] FL_PROGMEM;
extern const TProgmemRGBGradientPalette_byte palette_purplefly_gp[] FL_PROGMEM;

View File

@ -32,6 +32,10 @@ struct Settings {
uint16_t random_count = 32;
} matrix;
struct /* big_clock */ {
uint16_t spacing = 5;
} big_clock;
struct /* confetti */ {
uint16_t pixels_per_loop = 2;
} confetti;
@ -75,7 +79,7 @@ struct Settings {
uint16_t direction_change = 5;
uint16_t slowdown = 2;
} snake;
struct /* tv_static */ {
uint16_t black_bar_speed = 3500;
} tv_static;