Преглед на файлове

Add G92 Y0 after unlock if Y homing fails

Sets current Y position as zero to allow patterns to continue

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
tuanchris преди 1 месец
родител
ревизия
8d4e723261
променени са 1 файла, в които са добавени 5 реда и са изтрити 0 реда
  1. 5 0
      modules/connection/connection_manager.py

+ 5 - 0
modules/connection/connection_manager.py

@@ -648,6 +648,11 @@ def home(timeout=90):
                     # Unlock machine to clear any alarm state
                     state.conn.send("$X\n")
                     time.sleep(0.5)
+                    # Set current Y position as zero if Y didn't home
+                    if not state.homed_y:
+                        state.conn.send("G92 Y0\n")
+                        logger.info("Set current Y position as zero (G92 Y0)")
+                        time.sleep(0.2)
 
                 # Wait for idle state after $H
                 logger.info("Waiting for device to reach idle state after $H...")