mirror of
https://github.com/wled/WLED.git
synced 2025-07-21 09:46:32 +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:
|
protected:
|
||||||
// Shim for oappend(), which used to exist in utils.cpp
|
// Shim for oappend(), which used to exist in utils.cpp
|
||||||
template<typename T> static inline void oappend(const T& t) { oappend_shim->print(t); };
|
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 {
|
class UsermodManager {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user