aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormrfaptastic <12006953+mrfaptastic@users.noreply.github.com>2022-01-09 17:04:02 +0000
committerGitHub <noreply@github.com>2022-01-09 17:04:02 +0000
commit185cb2289332a56bbbdbf06fb9e3c7683e15652a (patch)
tree26f651c6ee7f7cd95655e3c25ac4e0784a9763de
parent04b319dd860883452b9faaab6ad12736980a3ef7 (diff)
parenta42dcb458bcff3ed8667710690ad8c7ef30cc4b6 (diff)
Merge pull request #234 from solhuebner/patch-1
VirtualMatrixPanel NO_GFX fix
-rw-r--r--ESP32-VirtualMatrixPanel-I2S-DMA.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/ESP32-VirtualMatrixPanel-I2S-DMA.h b/ESP32-VirtualMatrixPanel-I2S-DMA.h
index f4f1834..7228232 100644
--- a/ESP32-VirtualMatrixPanel-I2S-DMA.h
+++ b/ESP32-VirtualMatrixPanel-I2S-DMA.h
@@ -133,7 +133,7 @@ inline VirtualCoords VirtualMatrixPanel::getCoords(int16_t &x, int16_t &y) {
//Serial.println("Called Base.");
coords.x = coords.y = -1; // By defalt use an invalid co-ordinates that will be rejected by updateMatrixDMABuffer
- if ( x < 0 || x >= width() || y < 0 || y >= height() ) { // Co-ordinates go from 0 to X-1 remember! width() and height() are out of range!
+ if ( x < 0 || x >= virtualResX || y < 0 || y >= virtualResY ) { // Co-ordinates go from 0 to X-1 remember! otherwise they are out of range!
//Serial.printf("VirtualMatrixPanel::getCoords(): Invalid virtual display coordinate. x,y: %d, %d\r\n", x, y);
return coords;
}
@@ -246,9 +246,11 @@ inline void VirtualMatrixPanel::drawPixelRGB888(int16_t x, int16_t y, uint8_t r,
inline void VirtualMatrixPanel::setRotate(bool rotate) {
_rotate=rotate;
-
+
+#ifndef NO_GFX
// We don't support rotation by degrees.
if (rotate) { setRotation(1); } else { setRotation(0); }
+#endif
}
inline void VirtualMatrixPanel::setPhysicalPanelScanRate(PANEL_SCAN_RATE rate) {