aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-11-24 21:10:51 -0500
committerKevin O'Connor <kevin@koconnor.net>2019-12-10 14:23:10 -0500
commitab2d302b7edfe22c7bf40392e1a29fb4dcbb154d (patch)
treebab97d759f94026ae14ef93873c1f74585c17c30
parentd1f4f188101651f9b41b8b2bd4b9f088a1e3514a (diff)
downloadkutter-ab2d302b7edfe22c7bf40392e1a29fb4dcbb154d.tar.gz
kutter-ab2d302b7edfe22c7bf40392e1a29fb4dcbb154d.tar.xz
kutter-ab2d302b7edfe22c7bf40392e1a29fb4dcbb154d.zip
gcode: Remove support for the M206 command
The M206 command isn't particularly standardized and isn't issued by default from 3rd party software in their standard configurations. Encourage users to use the more powerful SET_GCODE_OFFSET command. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--docs/Config_Changes.md5
-rw-r--r--docs/G-Codes.md2
-rw-r--r--klippy/gcode.py10
3 files changed, 6 insertions, 11 deletions
diff --git a/docs/Config_Changes.md b/docs/Config_Changes.md
index a6f5661f..0e479ce9 100644
--- a/docs/Config_Changes.md
+++ b/docs/Config_Changes.md
@@ -6,6 +6,11 @@ All dates in this document are approximate.
# Changes
+20191210: Support for the M206 command has been removed. Replace with
+calls to SET_GCODE_OFFSET. If support for M206 is needed, add a
+[gcode_macro M206] config section that calls SET_GCODE_OFFSET. (For
+example "SET_GCODE_OFFSET Z=-{params.Z}".)
+
20191202: Support for the undocumented "S" parameter of the "G4"
command has been removed. Replace any occurrences of S with the
standard "P" parameter (the delay specified in milliseconds).
diff --git a/docs/G-Codes.md b/docs/G-Codes.md
index ad5481b1..029c9ae0 100644
--- a/docs/G-Codes.md
+++ b/docs/G-Codes.md
@@ -83,8 +83,6 @@ config section is enabled:
The following standard G-Code commands are currently available, but
using them is not recommended:
-- Offset axes: `M206 [X<offset>] [Y<offset>] [Z<offset>]` (Use
- SET_GCODE_OFFSET instead.)
- Get Endstop Status: `M119` (Use QUERY_ENDSTOPS instead.)
# Extended G-Code Commands
diff --git a/klippy/gcode.py b/klippy/gcode.py
index cd2fcd9e..93e97ec7 100644
--- a/klippy/gcode.py
+++ b/klippy/gcode.py
@@ -476,7 +476,7 @@ class GCodeParser:
all_handlers = [
'G1', 'G4', 'G28', 'M400',
'G20', 'M82', 'M83', 'G90', 'G91', 'G92', 'M114', 'M220', 'M221',
- 'SET_GCODE_OFFSET', 'M206', 'SAVE_GCODE_STATE', 'RESTORE_GCODE_STATE',
+ 'SET_GCODE_OFFSET', 'SAVE_GCODE_STATE', 'RESTORE_GCODE_STATE',
'M105', 'M104', 'M109', 'M140', 'M190',
'M112', 'M115', 'IGNORE', 'GET_POSITION',
'RESTART', 'FIRMWARE_RESTART', 'ECHO', 'STATUS', 'HELP']
@@ -599,14 +599,6 @@ class GCodeParser:
for pos, delta in enumerate(move_delta):
self.last_position[pos] += delta
self.move_with_transform(self.last_position, speed)
- def cmd_M206(self, params):
- # Offset axes
- offsets = { self.axis2pos[a]: -self.get_float(a, params)
- for a in 'XYZ' if a in params }
- for pos, offset in offsets.items():
- delta = offset - self.homing_position[pos]
- self.base_position[pos] += delta
- self.homing_position[pos] = offset
cmd_SAVE_GCODE_STATE_help = "Save G-Code coordinate state"
def cmd_SAVE_GCODE_STATE(self, params):
state_name = self.get_str('NAME', params, 'default')