diff options
| author | mrcodetastic <12006953+mrcodetastic@users.noreply.github.com> | 2025-02-08 15:10:44 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-08 15:10:44 +0000 |
| commit | e369f0ddb8db6d573a4664ebeeee70615e6eb218 (patch) | |
| tree | 63ee0ec2f1be3aabd0a5e52eed0113d6986b34b0 | |
| parent | d02c44312f993e06a21dd64de93552e5262de07d (diff) | |
| parent | 4fa43b7fbcf553d985ad7c2b7eb0769d8f90cb8b (diff) | |
Merge pull request #746 from j-g00da/40px_four_scan_panels_support
40px four-scan panels support
| -rw-r--r-- | src/ESP32-VirtualMatrixPanel-I2S-DMA.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ESP32-VirtualMatrixPanel-I2S-DMA.h b/src/ESP32-VirtualMatrixPanel-I2S-DMA.h index 18a6364..f6df7ab 100644 --- a/src/ESP32-VirtualMatrixPanel-I2S-DMA.h +++ b/src/ESP32-VirtualMatrixPanel-I2S-DMA.h @@ -56,7 +56,8 @@ enum PANEL_SCAN_RATE NORMAL_ONE_SIXTEEN, // treated as the same FOUR_SCAN_32PX_HIGH, FOUR_SCAN_16PX_HIGH, - FOUR_SCAN_64PX_HIGH + FOUR_SCAN_64PX_HIGH, + FOUR_SCAN_40PX_HIGH }; // Chaining approach... From the perspective of the DISPLAY / LED side of the chain of panels. @@ -413,6 +414,13 @@ inline VirtualCoords VirtualMatrixPanel::getCoords(int16_t virt_x, int16_t virt_ coords.x += (coords.x / panelResX) * panelResX; coords.y = (coords.y >> 3) * 4 + (coords.y & 0b00000011); break; + case FOUR_SCAN_40PX_HIGH: + if ((coords.y / 10) % 2 == 0) + coords.x += ((coords.x / panelResX) + 1) * panelResX; + else + coords.x += (coords.x / panelResX) * panelResX; + coords.y = (coords.y / 20) * 10 + (coords.y % 10); + break; default: break; } |
