Remove analog flicker (#678)

* remove analog LED flicker

run SetRgbwPwm from main loop and with GetPixelColor(0) to get all effects using fade_out() working.

* correct unintended bitwise AND to logical AND

* Update analogLastShow

* new Arduino Core WaveForm library included

* new Arduino Core only for 8266

* correct formating + define for MQTT_KEEP_ALIVE

* fix for ESP32

* reduce scope of variable "done"

* call analogWrite only if Color or Bri did change

* Remove duplicate wifi sleep code

Co-authored-by: Aircoookie <cschwinne@gmail.com>
This commit is contained in:
Def3nder
2020-02-22 17:20:34 +01:00
committed by GitHub
parent 447594b5ea
commit e621fdec0c
10 changed files with 464 additions and 37 deletions

View File

@@ -93,6 +93,18 @@
#include <IRutils.h>
#endif
// remove flicker because PWM signal of RGB channels can become out of phase
#if defined(WLED_USE_ANALOG_LEDS) && defined(ESP8266)
#include "src/dependencies/arduino/core_esp8266_waveform.h"
#endif
// enable additional debug output
#ifdef WLED_DEBUG
#ifndef ESP8266
#include <rom/rtc.h>
#endif
#endif
//version code in format yymmddb (b = daily build)
#define VERSION 2002192
@@ -526,6 +538,10 @@ void loop() {
handleOverlays();
yield();
#ifdef WLED_USE_ANALOG_LEDS
strip.setRgbwPwm();
#endif
if (doReboot) reset();
if (!realtimeMode) //block stuff if WARLS/Adalight is enabled