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 committed 2020-08-20 21:03:22 -04:00
1 parent cd7c1b8e68
commit 4c5e93d51d
15 files changed
+219 -194

No files matched your search

+2 -2
View File
@@ -73,7 +73,7 @@ gcode:
[gcode_macro TEST_expression]
gcode:
{% if printer.gcode.gcode_position.x != 0.0 %}
{% if printer.gcode_move.gcode_position.x != 0.0 %}
M112
{% else %}
{ action_respond_info("TEST_expression") }
@@ -108,7 +108,7 @@ gcode:
[gcode_macro TEST_in]
gcode:
{% if "abc" in printer or "gcode" not in printer %}
{% if "abc" in printer or "toolhead" not in printer %}
M112
{% endif %}