From 6180fe6e07a6e5defb04ff7a78f6f76ee4918923 Mon Sep 17 00:00:00 2001 From: mrfaptastic <12006953+mrfaptastic@users.noreply.github.com> Date: Wed, 7 Apr 2021 09:11:14 +0100 Subject: [PATCH] Update ESP32-VirtualMatrixPanel-I2S-DMA.h Third time lucky. --- ESP32-VirtualMatrixPanel-I2S-DMA.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ESP32-VirtualMatrixPanel-I2S-DMA.h b/ESP32-VirtualMatrixPanel-I2S-DMA.h index 4ea8a86..7830c6c 100644 --- a/ESP32-VirtualMatrixPanel-I2S-DMA.h +++ b/ESP32-VirtualMatrixPanel-I2S-DMA.h @@ -107,7 +107,7 @@ inline VirtualCoords VirtualMatrixPanel::getCoords(int16_t x, int16_t y) { coords.x = coords.y = 0; - if (x < 0 || x > module_cols*panelResX || y < 0 || y > module_rows*panelResY ) { + if (x < 0 || x > width() || y < 0 || y > height() ) { //Serial.printf("VirtualMatrixPanel::getCoords(): Invalid virtual display coordinate. x,y: %d, %d\r\n", x, y); return coords; }