feat(effect): add attributes, getters, and setters for effect-speed and -width
This commit is contained in:
parent
47f31301dd
commit
c54ff63f89
3 changed files with 47 additions and 1 deletions
|
|
@ -83,6 +83,13 @@ public:
|
|||
}
|
||||
bool get_effect_active() { return this->effect_active; }
|
||||
void set_effect_active(bool x) { this->effect_active = x; }
|
||||
|
||||
bool get_effect_width() { return this->effect_width; }
|
||||
void set_effect_width(bool x) { this->effect_width = x; }
|
||||
|
||||
bool get_effect_speed() { return this->effect_speed; }
|
||||
void set_effect_speed(bool x) { this->effect_speed = x; }
|
||||
|
||||
void set_on_color(Color on_color) {
|
||||
this->on_color = on_color;
|
||||
}
|
||||
|
|
@ -147,11 +154,12 @@ protected:
|
|||
|
||||
uint32_t current_position{0};
|
||||
bool effect_active{true};
|
||||
uint32_t effect_speed{12};
|
||||
uint16_t effect_width{50};
|
||||
Color get_next_color_base_(uint32_t position, uint32_t speed, uint16_t width, const Color ¤t_color);
|
||||
Color get_next_color(uint32_t position, const Color ¤t_color);
|
||||
|
||||
|
||||
|
||||
// Utils
|
||||
int8_t find_hour(uint8_t target_value);
|
||||
int8_t find_minute(uint8_t target_value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue