I have a setup with 4 devices.
When applying TFLR transformation, both external devices are swapped (good),
but both internal devices are not swapped.
For example if I display "MAX!", after transformation I get "!AXM" instead of "!XAM"
Analysis
in file MD_MAX72xx_pix.cpp, in method MD_MAX72XX::transform()
case TFLR: // Transform Flip Left to Right (use the whole field)
// first reverse the device buffers end for end
for (uint8_t buf = 0; buf < (endDev - startDev )/2; buf++)
The number of devices should be (endDev - startDev + 1) a nd not (endDev - startDev)
ex: startDev=0 and endDev = 3, there are 4 devices. and (endDev - startDev +1) /2 = 2 swaps should be performed.
Formula is still valid for odd number of devices.
Subject of the issue
I have a setup with 4 devices. When applying TFLR transformation, both external devices are swapped (good), but both internal devices are not swapped. For example if I display "MAX!", after transformation I get "!AXM" instead of "!XAM"
Analysis
in file
MD_MAX72xx_pix.cpp
, in methodMD_MAX72XX::transform()
The number of devices should be
(endDev - startDev + 1)
a nd not(endDev - startDev)
ex: startDev=0 and endDev = 3, there are 4 devices. and (endDev - startDev +1) /2 = 2 swaps should be performed. Formula is still valid for odd number of devices.Code Demonstrating the Issue