From 692078352e51166194b916115dce9ba8a80d41fd Mon Sep 17 00:00:00 2001 From: Lukaswnd Date: Thu, 18 Jan 2024 12:24:18 +0100 Subject: Fix VirtualMatrixPanel with NO_GFX fix Compile error, 'rotate' in void VirtualMatrixPanel::setRotation is not defined, when using NO_GFX add int16_t width() and int16_t height(), when using NO_GFX Otherwise you cant get the dimensions of the virtual panel --- src/ESP32-VirtualMatrixPanel-I2S-DMA.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/ESP32-VirtualMatrixPanel-I2S-DMA.h b/src/ESP32-VirtualMatrixPanel-I2S-DMA.h index 2738599..a6b9d15 100644 --- a/src/ESP32-VirtualMatrixPanel-I2S-DMA.h +++ b/src/ESP32-VirtualMatrixPanel-I2S-DMA.h @@ -124,6 +124,11 @@ public: void drawPixel(int16_t x, int16_t y, CRGB color); #endif +#ifdef NO_GFX + inline int16_t width() const { return _virtualResX; } + inline int16_t height() const { return _virtualResY; } +#endif + uint16_t color444(uint8_t r, uint8_t g, uint8_t b) { return display->color444(r, g, b); @@ -479,6 +484,9 @@ inline void VirtualMatrixPanel::setRotation(uint8_t rotate) // Change the _width and _height variables used by the underlying adafruit gfx library. // Actual pixel rotation / mapping is done in the getCoords function. +#ifdef NO_GFX + int8_t rotation; +#endif rotation = (rotate & 3); switch (rotation) { case 0: // nothing -- cgit v1.3.1