diff --git a/components/wordclock/wordclock.cpp b/components/wordclock/wordclock.cpp index 68a23d8..57b932c 100644 --- a/components/wordclock/wordclock.cpp +++ b/components/wordclock/wordclock.cpp @@ -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( diff --git a/components/wordclock/wordclock.h b/components/wordclock/wordclock.h index 54af2ef..4973d6e 100644 --- a/components/wordclock/wordclock.h +++ b/components/wordclock/wordclock.h @@ -167,7 +167,7 @@ protected: const int32_t dy = -abs(y2 - y1), sy = y1 < y2 ? 1 : -1; int32_t err = dx + dy; while (true) { - effect_color = this->get_next_color(x1 + y1, Color(0)); + effect_color = this->get_next_color(x1 + y1, Color(0)) * this->brightness; if (to_effect) { color_to_draw = base_color.gradient(effect_color, transition_progress); } else {