Fix calibration side test not applying LED offset rotation

The test mode pixel array was built from segment positions but never
rotated by the configured offset, causing LEDs to light up on the
wrong side. Apply the same offset rotation used in the normal
rendering pipeline.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-18 21:22:00 +03:00
parent 4a1b4f7674
commit 6e973965b1

View File

@@ -506,6 +506,12 @@ class ProcessorManager:
pixels[i] = color pixels[i] = color
break break
# Apply offset rotation (same as Phase 2 in PixelMapper.map_border_to_leds)
total_leds = ds.calibration.get_total_leds()
offset = ds.calibration.offset % total_leds if total_leds > 0 else 0
if offset > 0:
pixels = pixels[-offset:] + pixels[:-offset]
try: try:
active_client = self._find_active_led_client(device_id) active_client = self._find_active_led_client(device_id)
if active_client: if active_client: