Improved ESP32 flickering some more

This commit is contained in:
cschwinne 2018-01-16 20:20:11 +01:00
parent bf2fe43c0e
commit f3e03fc435
2 changed files with 3 additions and 4 deletions

View File

@ -2032,10 +2032,9 @@ void WS2812FX::setBrightness(uint8_t b)
void WS2812FX::show() void WS2812FX::show()
{ {
#ifdef ARDUINO_ARCH_ESP32 #ifdef ARDUINO_ARCH_ESP32
portDISABLE_INTERRUPTS();
delay(1); delay(1);
portDISABLE_INTERRUPTS(); //this is a workaround to prevent flickering (see https://github.com/adafruit/Adafruit_NeoPixel/issues/139)
NeoPixelBrightnessBus::Show(); NeoPixelBrightnessBus::Show();
delay(1);
portENABLE_INTERRUPTS(); portENABLE_INTERRUPTS();
#else #else
NeoPixelBrightnessBus::Show(); NeoPixelBrightnessBus::Show();

View File

@ -29,7 +29,7 @@
#include "WS2812FX.h" #include "WS2812FX.h"
//version in format yymmddb (b = daily build) //version in format yymmddb (b = daily build)
#define VERSION 1801162 #define VERSION 1801164
const String versionName = "WLED 0.5dev"; const String versionName = "WLED 0.5dev";
//AP and OTA default passwords (change them!) //AP and OTA default passwords (change them!)
@ -326,7 +326,7 @@ void loop() {
#ifdef USEOVERLAYS #ifdef USEOVERLAYS
handleOverlays(); handleOverlays();
#endif #endif
strip.service(); if (bri_t) strip.service(); //do not update strip if off, prevents flicker on ESP32
} }
//DEBUG //DEBUG