Aircoookie / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi!
https://kno.wled.ge
MIT License
15.04k stars 3.25k forks source link

Esp8266 oappend fix #4222

Closed willmmiles closed 4 weeks ago

willmmiles commented 4 weeks ago

The oappend shim logic introduced in #4152 also has issues with SET_F(), as it casts away the helper type needed for print() to identify PROGMEM strings. Improve the shim logic to safely handle this case in two different ways:

  1. Detect PROGMEM addresses and re-apply the helper type, allowing the correct overload of print() to be called;
  2. Ask the platform to forgive us if we make a mistake, and handle it gracefully (if very slowly).

Fixes #4219.

blazoncek commented 4 weeks ago

@dosipod can you test this as well? IMO it is good.

dosipod commented 4 weeks ago

We tested both nodemcuv2_160 and esp8266_2m_160 .In both AR worked as expected and no more error or crash .

softhack007 commented 4 weeks ago

Good to merge 👍