From ad2cb3c9767125e682fa4a494f47e357bbb0fb3f Mon Sep 17 00:00:00 2001 From: mrfaptastic <12006953+mrfaptastic@users.noreply.github.com> Date: Sun, 10 Oct 2021 19:52:32 +0100 Subject: [PATCH] Update OneEighthScanMatrixPanel.h --- .../One_Eighth_1_8_ScanPanel/OneEighthScanMatrixPanel.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/One_Eighth_1_8_ScanPanel/OneEighthScanMatrixPanel.h b/examples/One_Eighth_1_8_ScanPanel/OneEighthScanMatrixPanel.h index 5fc8bd7..2ef257a 100644 --- a/examples/One_Eighth_1_8_ScanPanel/OneEighthScanMatrixPanel.h +++ b/examples/One_Eighth_1_8_ScanPanel/OneEighthScanMatrixPanel.h @@ -163,13 +163,18 @@ inline VirtualCoords OneEighthMatrixPanel::getCoords(int16_t x, int16_t y) { */ // Reverse co-ordinates if panel chain from ESP starts from the TOP RIGHT - // TODO: Remove use of underyling _cfg configuration values! if (_chain_top_down) { + /* + // TODO: Remove use of underyling _cfg configuration values! const HUB75_I2S_CFG _cfg = this->display->getCfg(); coords.x = (_cfg.mx_width * _cfg.chain_length - 1) - coords.x; coords.y = (_cfg.mx_height-1) - coords.y; - + */ + + coords.x = (panelResX * rows * cols - 1) - coords.x; + coords.y = (panelResY-1) - coords.y; + } return coords;