From ff4e054ef8e62795fa9263de5ca12e18458deb7e Mon Sep 17 00:00:00 2001 From: "alexei.dolgolyov" Date: Thu, 19 Feb 2026 14:39:37 +0300 Subject: [PATCH] Show edge test colors on LED device when overlay is active Lights up device LEDs with calibration edge colors (top=red, right=green, bottom=blue, left=yellow) when the overlay is started, and clears them when the overlay is stopped. Skips if the target is currently processing. Co-Authored-By: Claude Opus 4.6 --- .../core/processing/processor_manager.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/server/src/wled_controller/core/processing/processor_manager.py b/server/src/wled_controller/core/processing/processor_manager.py index b1716f4..b6c7b8e 100644 --- a/server/src/wled_controller/core/processing/processor_manager.py +++ b/server/src/wled_controller/core/processing/processor_manager.py @@ -453,16 +453,38 @@ class ProcessorManager: # ===== OVERLAY VISUALIZATION (delegates to processor) ===== + # Default edge colors for overlay LED test (same as frontend EDGE_TEST_COLORS) + _OVERLAY_EDGE_COLORS = { + "top": [255, 0, 0], + "right": [0, 255, 0], + "bottom": [0, 100, 255], + "left": [255, 255, 0], + } + async def start_overlay(self, target_id: str, target_name: str = None) -> None: proc = self._get_processor(target_id) if not proc.supports_overlay(): raise ValueError(f"Target {target_id} does not support overlays") await proc.start_overlay(target_name) + # Light up device LEDs with edge test colors while overlay is visible + if isinstance(proc, WledTargetProcessor) and not proc.is_running: + try: + await self.set_test_mode(proc.device_id, self._OVERLAY_EDGE_COLORS) + except Exception as e: + logger.warning(f"Failed to set edge test for overlay on {proc.device_id}: {e}") + async def stop_overlay(self, target_id: str) -> None: proc = self._get_processor(target_id) await proc.stop_overlay() + # Clear device LEDs when overlay is dismissed + if isinstance(proc, WledTargetProcessor) and not proc.is_running: + try: + await self.set_test_mode(proc.device_id, {}) + except Exception as e: + logger.warning(f"Failed to clear edge test after overlay on {proc.device_id}: {e}") + def is_overlay_active(self, target_id: str) -> bool: return self._get_processor(target_id).is_overlay_active()