gcode: Pass the pseudo-tty fd via the start_args system

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2020-08-04 15:47:25 -04:00
parent b66dd1a60f
commit 0d930bf871
2 changed files with 8 additions and 9 deletions

View file

@ -70,9 +70,9 @@ class GCodeCommand:
class GCodeParser:
error = homing.CommandError
RETRY_TIME = 0.100
def __init__(self, printer, fd):
def __init__(self, printer):
self.printer = printer
self.fd = fd
self.fd = printer.get_start_args().get("gcode_fd")
printer.register_event_handler("klippy:ready", self._handle_ready)
printer.register_event_handler("klippy:shutdown", self._handle_shutdown)
printer.register_event_handler("klippy:disconnect",