kopia lustrzana https://github.com/Aircoookie/WLED
Better oappend shim on ESP8266
Detect IRAM pointers if we can't be sure.pull/4222/head
rodzic
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 {
|
||||
|
|
Ładowanie…
Reference in New Issue