hzeller / rpi-rgb-led-matrix

Controlling up to three chains of 64x64, 32x32, 16x32 or similar RGB LED displays using Raspberry Pi GPIO
GNU General Public License v2.0
3.59k stars 1.15k forks source link

Vmapper:Z requires physical re-mapping and rewiring of panels when switching from odd to even number in height #1663

Closed marcmerlin closed 1 day ago

marcmerlin commented 1 month ago

You can currently wire things so that they work whether you have odd or even, but if you try to add a panel, everything gets flipped around https://github.com/hzeller/rpi-rgb-led-matrix/pull/1014 still works, but is fairly suboptimal

marcmerlin commented 1 month ago

This is with --led-chain=4 PXL_20240611_154150807

and with --led-chain=5, everything is reversed and all the panels need to be re-wired for the new order. PXL_20240611_154215361

As per my upcoming PR, the problem and solution

+    // because the panel you plug into ends up being the "bottom" panel and coordinates
+    // start from the top panel, and you typically don't wire the bottom panel (first in
+    // the chain) upside down, whether each panel gets swapped depends on this.
+    // Without this, if you wire for 4 panels high and add a 5h panel, without this
+    // code everything would get reversed and you'd have to re-layout all the panels
+    bool is_height_even_panels = ( matrix_width / panel_width) % 2;
marcmerlin commented 1 month ago

this is now fixed in https://github.com/hzeller/rpi-rgb-led-matrix/pull/1664