effect_lightspeed: New effect.
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
32
include/effect_lightspeed.h
Normal file
32
include/effect_lightspeed.h
Normal file
@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#include "Effect.h"
|
||||
#include "my_fastled.h"
|
||||
|
||||
class LightspeedEffectStar {
|
||||
private:
|
||||
uint16_t _angle;
|
||||
accum88 _start;
|
||||
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"; }
|
||||
};
|
||||
|
@ -74,6 +74,10 @@ struct Settings {
|
||||
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;
|
||||
|
Reference in New Issue
Block a user