diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ESP32-VirtualMatrixPanel-I2S-DMA.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/ESP32-VirtualMatrixPanel-I2S-DMA.h b/src/ESP32-VirtualMatrixPanel-I2S-DMA.h index e30f44a..1bdc2e2 100644 --- a/src/ESP32-VirtualMatrixPanel-I2S-DMA.h +++ b/src/ESP32-VirtualMatrixPanel-I2S-DMA.h @@ -49,7 +49,8 @@ enum PANEL_SCAN_RATE NORMAL_TWO_SCAN, NORMAL_ONE_SIXTEEN, // treated as the same FOUR_SCAN_32PX_HIGH, - FOUR_SCAN_16PX_HIGH + FOUR_SCAN_16PX_HIGH, + FOUR_SCAN_64PX_HIGH }; // Chaining approach... From the perspective of the DISPLAY / LED side of the chain of panels. @@ -354,12 +355,19 @@ inline VirtualCoords VirtualMatrixPanel::getCoords(int16_t virt_x, int16_t virt_ break; } // end switch + /* START: Pixel remapping AGAIN to convert TWO parallel scanline output that the * the underlying hardware library is designed for (because * there's only 2 x RGB pins... and convert this to 1/4 or something - */ - if (panel_scan_rate == FOUR_SCAN_32PX_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); } + } + else if (panel_scan_rate == FOUR_SCAN_32PX_HIGH) { /* 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 |
