diff options
| author | yv <yv@parkouka.by> | 2023-04-17 17:00:52 +0300 |
|---|---|---|
| committer | yv <yv@parkouka.by> | 2023-04-17 17:00:52 +0300 |
| commit | f6fb33d651d9e55dcbf8851899959b7382c718bb (patch) | |
| tree | 6a29e7fba958a341c8463ee22a0874b9f6cafb00 /src | |
| parent | ab24a61aba573d412005ee53b354f0b6e0b4fccc (diff) | |
Support for 1/16 64px high outdoor panels driven by ICN2037BP chip (https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-DMA/issues/345#issuecomment-1510401192)
Diffstat (limited to 'src')
| -rw-r--r-- | src/ESP32-VirtualMatrixPanel-I2S-DMA.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/ESP32-VirtualMatrixPanel-I2S-DMA.h b/src/ESP32-VirtualMatrixPanel-I2S-DMA.h index 1bdc2e2..ebac204 100644 --- a/src/ESP32-VirtualMatrixPanel-I2S-DMA.h +++ b/src/ESP32-VirtualMatrixPanel-I2S-DMA.h @@ -362,13 +362,16 @@ inline VirtualCoords VirtualMatrixPanel::getCoords(int16_t virt_x, int16_t virt_ * there's only 2 x RGB pins... and convert this to 1/4 or something */ - if (panel_scan_rate == FOUR_SCAN_64PX_HIGH) - { - // https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-DMA/issues/345#issuecomment-1510401192 - if ((virt_y & 8) != ((virt_y & 16) >> 1)) { virt_y = (virt_y & 0b11000) ^ 0b11000 + (virt_y & 0b11100111); } - } - else if (panel_scan_rate == FOUR_SCAN_32PX_HIGH) + if ((panel_scan_rate == FOUR_SCAN_32PX_HIGH) || (panel_scan_rate == FOUR_SCAN_64PX_HIGH)) { + + if (panel_scan_rate == FOUR_SCAN_64PX_HIGH) + { + // https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-DMA/issues/345#issuecomment-1510401192 + if ((virt_y & 8) != ((virt_y & 16) >> 1)) { virt_y = (virt_y & 0b11000) ^ 0b11000 + (virt_y & 0b11100111); } + } + + /* Convert Real World 'VirtualMatrixPanel' co-ordinates (i.e. Real World pixel you're looking at on the panel or chain of panels, per the chaining configuration) to a 1/8 panels double 'stretched' and 'squished' coordinates which is what needs to be sent from the |
