gcode: Split G0/G1 command handling to new gcode_move class

Split up the main GCodeParser class into GCodeDispatch and GCodeMove
classes.  The GCodeMove class is now available using the "gcode_move"
printer object name.  This split simplifies the gcode.py code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2020-08-05 11:43:45 -04:00
parent cd7c1b8e68
commit 4c5e93d51d
15 changed files with 219 additions and 194 deletions

View File

@@ -24,7 +24,6 @@ class VirtualSD:
self.work_timer = None
# Register commands
self.gcode = printer.lookup_object('gcode')
self.gcode.register_command('M21', None)
for cmd in ['M20', 'M21', 'M23', 'M24', 'M25', 'M26', 'M27']:
self.gcode.register_command(cmd, getattr(self, 'cmd_' + cmd))
for cmd in ['M28', 'M29', 'M30']: