Merge pull request #15947 from cctweaker/patch-1

Update LedMatrix.cpp
This commit is contained in:
Theo Arends 2022-07-08 12:23:47 +02:00 committed by GitHub
commit f5912af74a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -330,7 +330,22 @@ void LedMatrix::refresh()
}
else // ORIENTATION_TURN_RIGHT || ORIENTATION_TURN_LEFT
{
// not implemented yet
col = addr % modulesPerRow;
pixelRow = (addr / modulesPerRow) * 8 + ledRow;
bufPos = pixelRow * modulesPerRow + col;
if (moduleOrientation == ORIENTATION_TURN_RIGHT)
{
// ORIENTATION_TURN_RIGHT
deviceDataBuff[addr] = buffer[bufPos];
deviceRow = ledRow;
}
else
{
// ORIENTATION_TURN_LEFT
deviceDataBuff[maxDevices - 1 - addr] = revereBitorder(buffer[bufPos]);
deviceRow = 7 - ledRow; // upside down
}
}
}
setRow_allDevices(deviceRow, deviceDataBuff);