浏览代码

fix wiat until idle timeout

Silas Gruen 10 月之前
父节点
当前提交
9b80f298be
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      robot-control/src/api/grbl_handler.py

+ 2 - 3
robot-control/src/api/grbl_handler.py

@@ -63,9 +63,8 @@ class GRBLHandler:
         finally:
         finally:
             self.controller_active.clear()
             self.controller_active.clear()
 
 
-    async def wait_until_idle(self, timeout_s=None):
+    async def wait_until_idle(self, timeout_s):
         """Wait until GRBL reports idle status"""
         """Wait until GRBL reports idle status"""
-        timeout_s = timeout_s or 50
         if self.debug:
         if self.debug:
             return
             return
             
             
@@ -87,7 +86,7 @@ class GRBLHandler:
                 
                 
             await asyncio.sleep(0.2)  # Async delay to prevent flooding
             await asyncio.sleep(0.2)  # Async delay to prevent flooding
 
 
-    async def send_and_wait_gcode(self, commands: List[str], timeout_s=None):
+    async def send_and_wait_gcode(self, commands: List[str], timeout_s=60):
         """Send GCODE commands and wait until machine is idle"""
         """Send GCODE commands and wait until machine is idle"""
         await self.send_gcode(commands)
         await self.send_gcode(commands)
         await self.wait_until_idle(timeout_s)
         await self.wait_until_idle(timeout_s)