Closed janLo closed 6 years ago
🎉 Very good. 🥇 I never thought about this.
Merged in 4d1c1f22b989775cc711a818f6c97c9059ccb1da .
@janLo unfortunately, this changes lead to stack traces as shown in puuu/MQTT433gateway#23, because the flash needs to be read 32bit aligned on esp8266.
So we need to use printf_P()
, but for some reason the linker can not find it. So i did my own implementation in 717e138359b64325afcf20e3f0c96c07c191409a . Furthermore, 32f7dac5a06ad4cec8a1490d0aeff2abddbc810b introduce ESPiLight::setErrorOutput(Print &output)
to redirect the pilight error messages to any Print
class.
This places the pilight log message string literals into PROGMEM. With that they don't take up space in RAM. Testing with test_parse.ino gave the following results for "free heap": before: 26152 byte after: 32936 byte diff: 6784 byte
That is 71.5% free compared to the 56.8% of the 46032 byte free Heap without pilight.