Skip to content

Commit

Permalink
fixed 565 buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalkbrenner committed Jan 20, 2024
1 parent 3ed6573 commit f378621
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/ZeDMDComm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,12 @@ void ZeDMDComm::QueueCommand(char command, uint16_t* data, int size,

for (uint16_t y = 0; y < height; y += m_zoneHeight) {
for (uint16_t x = 0; x < width; x += m_zoneWidth) {
for (uint8_t z = 0; z < m_zoneHeight; z++) {
for (uint8_t w = 0; w < m_zoneWidth; w++) {
zone[(z * m_zoneWidth) + (w * 2)] =
data[((y + z) * width + x) + w] >> 8;
zone[(z * m_zoneWidth) + (w * 2)] =
data[((y + z) * width + x) + w] & 0xFF;
for (uint8_t zy = 0; zy < m_zoneHeight; zy++) {
for (uint8_t zx = 0; zx < m_zoneWidth; zx++) {
zone[(zy * m_zoneWidth + zx) * 2] =
data[((y + zy) * width) + x + zx] >> 8;
zone[(zy * m_zoneWidth + zx) * 2 + 1] =
data[((y + zy) * width) + x + zx] & 0xFF;
}
}

Expand Down

0 comments on commit f378621

Please sign in to comment.