diff options
| author | Lukaswnd <lukas.windeln@rwth-aachen.de> | 2024-01-18 12:24:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-18 12:24:18 +0100 |
| commit | 692078352e51166194b916115dce9ba8a80d41fd (patch) | |
| tree | e8242b13fa21cba5024afda3331e0c37594c46fd /src | |
| parent | 987ca1c87df5bd68f2330d83f21833a59ca6cf61 (diff) | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/ESP32-VirtualMatrixPanel-I2S-DMA.h | 8 |
1 files changed, 8 insertions, 0 deletions
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 |
