mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-07 23:17:37 -06:00
gcode: Move definition of CommandError and Coord from homing.py to gcode.py
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
c8434ec54b
commit
ea85d419de
6 changed files with 24 additions and 28 deletions
|
@ -1,13 +1,17 @@
|
|||
# Parse gcode commands
|
||||
#
|
||||
# Copyright (C) 2016-2020 Kevin O'Connor <kevin@koconnor.net>
|
||||
# Copyright (C) 2016-2021 Kevin O'Connor <kevin@koconnor.net>
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import os, re, logging, collections, shlex
|
||||
import homing
|
||||
|
||||
class CommandError(Exception):
|
||||
pass
|
||||
|
||||
Coord = collections.namedtuple('Coord', ('x', 'y', 'z', 'e'))
|
||||
|
||||
class GCodeCommand:
|
||||
error = homing.CommandError
|
||||
error = CommandError
|
||||
def __init__(self, gcode, command, commandline, params, need_ack):
|
||||
self._command = command
|
||||
self._commandline = commandline
|
||||
|
@ -68,7 +72,8 @@ class GCodeCommand:
|
|||
|
||||
# Parse and dispatch G-Code commands
|
||||
class GCodeDispatch:
|
||||
error = homing.CommandError
|
||||
error = CommandError
|
||||
Coord = Coord
|
||||
def __init__(self, printer):
|
||||
self.printer = printer
|
||||
self.is_fileinput = not not printer.get_start_args().get("debuginput")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue