diff options
| author | board707 <50185434+board707@users.noreply.github.com> | 2024-06-18 00:59:44 +0300 |
|---|---|---|
| committer | board707 <50185434+board707@users.noreply.github.com> | 2024-06-18 00:59:44 +0300 |
| commit | 459516b6db9c803360e32c0bd02ecd03b1a4a9a5 (patch) | |
| tree | 431dc7161cea65212203577ded5cc46f6f9a065f /src | |
| parent | 228e742702ea5ca3b74c01bdbd79f94c4b421594 (diff) | |
Fix incorrect virtual Y coordinate for second and next rows of panels
Diffstat (limited to 'src')
| -rw-r--r-- | src/ESP32-VirtualMatrixPanel-I2S-DMA.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ESP32-VirtualMatrixPanel-I2S-DMA.h b/src/ESP32-VirtualMatrixPanel-I2S-DMA.h index 83f39da..cf92a87 100644 --- a/src/ESP32-VirtualMatrixPanel-I2S-DMA.h +++ b/src/ESP32-VirtualMatrixPanel-I2S-DMA.h @@ -389,7 +389,7 @@ inline VirtualCoords VirtualMatrixPanel::getCoords(int16_t virt_x, int16_t virt_ as if the panel is 2 * W and 0.5 * H ! */ - if ((virt_y & 8) == 0) + if ((coords.y & 8) == 0) { coords.x += ((coords.x / panelResX) + 1) * panelResX; // 1st, 3rd 'block' of 8 rows of pixels, offset by panel width in DMA buffer } @@ -405,7 +405,7 @@ inline VirtualCoords VirtualMatrixPanel::getCoords(int16_t virt_x, int16_t virt_ } else if (panel_scan_rate == FOUR_SCAN_16PX_HIGH) { - if ((virt_y & 4) == 0) + if ((coords.y & 4) == 0) { coords.x += ((coords.x / panelResX) + 1) * panelResX; // 1st, 3rd 'block' of 8 rows of pixels, offset by panel width in DMA buffer } |
