fix: brightness attribute now correctly controls the brightness, even with active effect.
This commit is contained in:
parent
e4bdcf71dc
commit
4962f344e3
2 changed files with 7 additions and 7 deletions
|
|
@ -115,10 +115,10 @@ Color Wordclock::get_next_color_base_(uint32_t position, uint32_t speed, uint16_
|
|||
|
||||
Color Wordclock::get_next_color(uint32_t position, const Color ¤t_color) {
|
||||
if (this->effect_active) {
|
||||
uint32_t speed_ = 3;
|
||||
uint16_t width_ = 100; // Original width_ = 50
|
||||
return get_next_color_base_(position, speed_, width_, current_color);
|
||||
}
|
||||
uint32_t speed_ = 3;
|
||||
uint16_t width_ = 100; // Original width_ = 50
|
||||
return get_next_color_base_(position, speed_, width_, current_color);
|
||||
}
|
||||
else {
|
||||
return Color(this->on_color);
|
||||
}
|
||||
|
|
@ -149,8 +149,8 @@ int8_t Wordclock::find_minute(uint8_t target_value) {
|
|||
}
|
||||
|
||||
void Wordclock::setup_transitions(uint32_t milliseconds) {
|
||||
this->on_transformer->setup(0, this->brightness, milliseconds);
|
||||
this->off_transformer->setup(this->brightness, 0, milliseconds);
|
||||
this->on_transformer->setup(0, 255, milliseconds);
|
||||
this->off_transformer->setup(255, 0, milliseconds);
|
||||
}
|
||||
|
||||
Wordclock::Wordclock(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue