Kaynağa Gözat

move up homing

tuanchris 2 ay önce
ebeveyn
işleme
ee9c6b51ea
1 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  1. 3 3
      modules/core/pattern_manager.py

+ 3 - 3
modules/core/pattern_manager.py

@@ -877,11 +877,11 @@ async def run_theta_rho_files(file_paths, pause_time=0, clear_pattern=None, run_
                     logger.info("Execution stopped")
                     logger.info("Execution stopped")
                     return
                     return
 
 
-                # Check if we need to auto-home before this pattern
-                # Auto-home happens right after the clear pattern, before the actual pattern
                 current_is_clear = is_clear_pattern(file_path)
                 current_is_clear = is_clear_pattern(file_path)
 
 
-                if not current_is_clear and state.auto_home_enabled:
+                # Check if we need to auto-home before this clear pattern
+                # Auto-home happens after pause, before the clear pattern runs
+                if current_is_clear and state.auto_home_enabled:
                     # Check if we've reached the pattern threshold
                     # Check if we've reached the pattern threshold
                     if state.patterns_since_last_home >= state.auto_home_after_patterns:
                     if state.patterns_since_last_home >= state.auto_home_after_patterns:
                         logger.info(f"Auto-homing triggered after {state.patterns_since_last_home} patterns")
                         logger.info(f"Auto-homing triggered after {state.patterns_since_last_home} patterns")