Sfoglia il codice sorgente

Fix move_to_center/perimeter not working after pattern stop

When a pattern was stopped, state.stop_requested remained True. The
motion control thread checks this flag and aborts commands immediately,
causing manual move commands (center/perimeter) to return 200 OK but
never actually send G-code to the controller.

Fix: Clear stop_requested at the start of move_polar() so manual
movement commands always execute regardless of previous stop state.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
tuanchris 2 settimane fa
parent
commit
0cf2ed321c
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4 0
      modules/core/pattern_manager.py

+ 4 - 0
modules/core/pattern_manager.py

@@ -1299,6 +1299,10 @@ async def move_polar(theta, rho, speed=None):
         rho (float): Target rho coordinate
         speed (int, optional): Speed override. If None, uses state.speed
     """
+    # Clear stop_requested to ensure manual moves work after pattern stop
+    # Without this, moves would silently abort if stop_requested was left True
+    state.stop_requested = False
+
     # Ensure motion control thread is running
     if not motion_controller.running:
         motion_controller.start()