浏览代码

fix idle effect

tuanchris 5 月之前
父节点
当前提交
8cb57f9e87
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      modules/core/pattern_manager.py

+ 5 - 0
modules/core/pattern_manager.py

@@ -292,6 +292,11 @@ async def run_theta_rho_file(file_path, is_playlist=False):
             
         connection_manager.check_idle()
         
+        # Set LED back to idle when pattern completes normally (not stopped early)
+        if state.led_controller and not state.stop_requested:
+            effect_idle(state.led_controller)
+            logger.debug("LED effect set to idle after pattern completion")
+        
         # Only clear state if not part of a playlist
         if not is_playlist:
             state.current_playing_file = None