aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authormrfaptastic <12006953+mrfaptastic@users.noreply.github.com>2021-10-10 22:03:49 +0100
committermrfaptastic <12006953+mrfaptastic@users.noreply.github.com>2021-10-10 22:03:49 +0100
commit32f86bb87061e8d16feadcc50e2dd8c53221ef3a (patch)
tree23ff57c6cc313161d57b7848fd8769be59591650 /examples
parent35b556d57f72cf5a7465d4c5944a0c92f57b91f8 (diff)
Update OneEighthScanMatrixPanel.h
Diffstat (limited to 'examples')
-rw-r--r--examples/One_Eighth_1_8_ScanPanel/OneEighthScanMatrixPanel.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/examples/One_Eighth_1_8_ScanPanel/OneEighthScanMatrixPanel.h b/examples/One_Eighth_1_8_ScanPanel/OneEighthScanMatrixPanel.h
index 4577d22..1e6ecbe 100644
--- a/examples/One_Eighth_1_8_ScanPanel/OneEighthScanMatrixPanel.h
+++ b/examples/One_Eighth_1_8_ScanPanel/OneEighthScanMatrixPanel.h
@@ -154,8 +154,16 @@ inline VirtualCoords OneEighthMatrixPanel::getCoords(int16_t x, int16_t y) {
// Double the length of the x-coord if required
if ( (coords.y /8) % 2 == 0) { // returns true/1 for the 1st and 3rd 8-pixel 1/4th of a 32px high panel
coords.x += (panelResX*col);
+
+ coords.y -= 8; // half the row-coord, to match the PHYSICAL DMA configuration.
}
- coords.y /= 2; // half the row-coord, to match the PHYSICAL DMA configuration.
+ else
+ {
+ // Or should it be here?
+ // coords.y -= 8; // half the row-coord, to match the PHYSICAL DMA configuration.
+ }
+
+
/*
* END: 1/8 Scan Panel Pixel Re-Mapping
@@ -163,19 +171,14 @@ inline VirtualCoords OneEighthMatrixPanel::getCoords(int16_t x, int16_t y) {
*/
// Reverse co-ordinates if panel chain from ESP starts from the TOP RIGHT
+ /*
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 * vmodule_rows * vmodule_cols - 1) - coords.x;
coords.y = (panelResY-1) - coords.y;
- }
+ }
+ */
return coords;
@@ -213,4 +216,4 @@ inline void OneEighthMatrixPanel::drawIcon (int *ico, int16_t x, int16_t y, int1
}
-#endif
+#endif \ No newline at end of file