color_blend_state extended from 0-255 to 0-1023 to allow slower / smoother effects.
This commit is contained in:
@ -20,4 +20,6 @@
|
||||
|
||||
#define SPEEDUP 1
|
||||
|
||||
#define MAX_MILLIAMPS 1000
|
||||
|
||||
//#define TEST_MODE
|
@ -16,19 +16,19 @@ class Corner {
|
||||
CRGB source_color;
|
||||
CRGB target_color;
|
||||
bool effect_running = false;
|
||||
uint8_t color_blend_state = 255;
|
||||
uint16_t color_blend_state = 1023;
|
||||
uint16_t effect_id;
|
||||
uint8_t effect_speed;
|
||||
uint16_t effect_speed;
|
||||
//bool loop();
|
||||
void draw();
|
||||
void blend_to(CRGB color, uint16_t effect_id=0, uint8_t effect_speed=0);
|
||||
void add_led(uint16_t led_id);
|
||||
void merge_leds(Corner* c);
|
||||
void step();
|
||||
void infect(uint8_t short_level, uint8_t long_level);
|
||||
void infect(uint16_t short_level, uint16_t long_level);
|
||||
bool is_finished();
|
||||
void set_color(CRGB color);
|
||||
bool reached_level(uint8_t level);
|
||||
bool reached_level(uint16_t level);
|
||||
|
||||
private:
|
||||
void _infect(std::vector<Corner*>* neighbours);
|
||||
|
@ -16,7 +16,7 @@ class Node {
|
||||
|
||||
void blend_to(CRGB color, uint16_t effect_id=0, uint8_t effect_speed=0);
|
||||
void set_color(CRGB color);
|
||||
void infect(uint8_t level);
|
||||
void infect(uint16_t level);
|
||||
void step();
|
||||
void draw();
|
||||
};
|
@ -16,5 +16,8 @@ extern CRGB leds[LED_COUNT];
|
||||
|
||||
enum AnimationMode {
|
||||
AM_CORNERS,
|
||||
AM_NODES
|
||||
AM_FIRST_CORNER,
|
||||
AM_NODES,
|
||||
AM_FIRST_NODE,
|
||||
AM_FLASH
|
||||
};
|
Reference in New Issue
Block a user