From 7f42ed2d32a7172613de64e91405c2ea098c24a8 Mon Sep 17 00:00:00 2001 From: cschwinne Date: Mon, 25 Sep 2017 19:32:20 +0200 Subject: [PATCH] Fixed bug that caused Fade and Breath effects to reset brightness to 0 --- wled00/WS2812FX.cpp | 4 ++-- wled00/wled00.ino | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wled00/WS2812FX.cpp b/wled00/WS2812FX.cpp index 93773dfc..5e688df2 100644 --- a/wled00/WS2812FX.cpp +++ b/wled00/WS2812FX.cpp @@ -365,7 +365,7 @@ void WS2812FX::mode_breath(void) { setPixelColor(i, _color); // set all LEDs to selected color } int b = map(breath_brightness, 0, 255, 0, _brightness); // keep brightness below brightness set by user - setBrightness(b); // set new brightness to leds + NeoPixelBrightnessBus::SetBrightness(b); // set new brightness to leds show(); _mode_color = breath_brightness; // we use _mode_color to store the brightness @@ -385,7 +385,7 @@ void WS2812FX::mode_fade(void) { int b = _counter_mode_step - 127; b = 255 - (abs(b) * 2); b = map(b, 0, 255, minval(25, _brightness), _brightness); - setBrightness(b); + NeoPixelBrightnessBus::SetBrightness(b); show(); _counter_mode_step = (_counter_mode_step + 1) % 256; diff --git a/wled00/wled00.ino b/wled00/wled00.ino index 6aa68683..ae38daba 100644 --- a/wled00/wled00.ino +++ b/wled00/wled00.ino @@ -20,7 +20,7 @@ #include "CallbackFunction.h" //version in format yymmddb (b = daily build) -#define VERSION 1709183 +#define VERSION 1709251 //to toggle usb serial debug (un)comment following line //#define DEBUG