mirror of
https://github.com/wled/WLED.git
synced 2025-07-19 00:36:36 +00:00
Better oappend shim on ESP8266
Detect IRAM pointers if we can't be sure.
This commit is contained in:
parent
6d1126b8aa
commit
2a094883ad
@ -324,6 +324,10 @@ class Usermod {
|
||||
protected:
|
||||
// Shim for oappend(), which used to exist in utils.cpp
|
||||
template<typename T> static inline void oappend(const T& t) { oappend_shim->print(t); };
|
||||
#ifdef ESP8266
|
||||
// Handle print(PSTR()) without crashing by detecting PROGMEM strings
|
||||
static void oappend(const char* c) { if ((intptr_t) c >= 0x40000000) oappend_shim->print(FPSTR(c)); else oappend_shim->print(c); };
|
||||
#endif
|
||||
};
|
||||
|
||||
class UsermodManager {
|
||||
|
Loading…
x
Reference in New Issue
Block a user