feat: add variable to toggle the rainbow effect on or off
This commit is contained in:
parent
03a012650f
commit
e4bdcf71dc
2 changed files with 8 additions and 0 deletions
|
|
@ -81,6 +81,8 @@ public:
|
|||
void set_brightness(uint8_t brightness) {
|
||||
this->brightness = brightness;
|
||||
}
|
||||
bool get_effect_active() { return this->effect_active; }
|
||||
void set_effect_active(bool x) { this->effect_active = x; }
|
||||
void set_on_color(Color on_color) {
|
||||
this->on_color = on_color;
|
||||
}
|
||||
|
|
@ -144,6 +146,7 @@ protected:
|
|||
std::vector<uint16_t> *previous_segments;
|
||||
|
||||
uint32_t current_position{0};
|
||||
bool effect_active{true};
|
||||
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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue