diff --git a/wled00/FX.h b/wled00/FX.h index 04eabe70..19175985 100644 --- a/wled00/FX.h +++ b/wled00/FX.h @@ -945,9 +945,9 @@ class WS2812FX { // 96 bytes milliampsPerLed, cctBlending, getActiveSegmentsNum(void) const, - getFirstSelectedSegId(void) __attribute__((pure)), + __attribute__((pure)) getFirstSelectedSegId(void), getLastActiveSegmentId(void) const, - getActiveSegsLightCapabilities(bool selectedOnly = false) __attribute__((pure)), + __attribute__((pure)) getActiveSegsLightCapabilities(bool selectedOnly = false), setPixelSegment(uint8_t n); inline uint8_t getBrightness(void) const { return _brightness; } diff --git a/wled00/bus_manager.cpp b/wled00/bus_manager.cpp index cb3d8fac..82e2c015 100644 --- a/wled00/bus_manager.cpp +++ b/wled00/bus_manager.cpp @@ -527,6 +527,7 @@ BusHub75Matrix::BusHub75Matrix(BusConfig &bc) : Bus(bc.type, bc.start, bc.autoWh _valid = false; fourScanPanel = nullptr; + _len = 0; mxconfig.double_buff = false; // Use our own memory-optimised buffer rather than the driver's own double-buffer @@ -744,6 +745,11 @@ BusHub75Matrix::BusHub75Matrix(BusConfig &bc) : Bus(bc.type, bc.start, bc.autoWh // OK, now we can create our matrix object display = new MatrixPanel_I2S_DMA(mxconfig); + if (display == nullptr) { + USER_PRINTLN("****** MatrixPanel_I2S_DMA !KABOOM! driver allocation failed ***********"); + USER_PRINT(F("heap usage: ")); USER_PRINTLN(lastHeap - ESP.getFreeHeap()); + return; + } this->_len = (display->width() * display->height()); diff --git a/wled00/wled00.ino b/wled00/wled00.ino index b19441a2..6f1f22d5 100644 --- a/wled00/wled00.ino +++ b/wled00/wled00.ino @@ -74,7 +74,10 @@ void loop() { //WLEDMM show loops per second loopCounter++; if (millis() - lastMillis >= 10000) { - //USER_PRINTF("%lu lps\n",loopCounter/10); + long delta = millis() - lastMillis; + if (delta > 0) { + //USER_PRINTF("%lu lps\n",(loopCounter*1000U) / delta); + } lastMillis = millis(); loopCounter = 0; }