diff --git a/src/Display.cpp b/src/Display.cpp index a97896a..9a87e26 100644 --- a/src/Display.cpp +++ b/src/Display.cpp @@ -4,6 +4,9 @@ #include #include #include "MD_RobotEyes.h" +extern "C" { +#include "user_interface.h" +} #define DISPLAY_CLK_PIN D5 #define DISPLAY_DATA_PIN D7 @@ -181,6 +184,7 @@ void Display::loop() { } void Display::reInitializeDisplay() { + uint32_t free = system_get_free_heap_size(); #define REINIT_AFTER_ms 5000 #define AVOID_REINIT_BEFORE_AND_AFTER_FULLMINUTE_FOR_s 3 @@ -190,7 +194,7 @@ void Display::reInitializeDisplay() { && currentTime->getSeconds() < 60 - AVOID_REINIT_BEFORE_AND_AFTER_FULLMINUTE_FOR_s && currentTime->getSeconds() > AVOID_REINIT_BEFORE_AND_AFTER_FULLMINUTE_FOR_s) { P.begin(); - Serial.println("reinit display"); + Serial.print("reinit display, free="); Serial.println(free); last_reinit_ts = millis(); } }