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>
This commit is contained in:
parent
d1f4f18810
commit
ab2d302b7e
|
@ -6,6 +6,11 @@ All dates in this document are approximate.
|
||||||
|
|
||||||
# Changes
|
# 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"
|
20191202: Support for the undocumented "S" parameter of the "G4"
|
||||||
command has been removed. Replace any occurrences of S with the
|
command has been removed. Replace any occurrences of S with the
|
||||||
standard "P" parameter (the delay specified in milliseconds).
|
standard "P" parameter (the delay specified in milliseconds).
|
||||||
|
|
|
@ -83,8 +83,6 @@ config section is enabled:
|
||||||
|
|
||||||
The following standard G-Code commands are currently available, but
|
The following standard G-Code commands are currently available, but
|
||||||
using them is not recommended:
|
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.)
|
- Get Endstop Status: `M119` (Use QUERY_ENDSTOPS instead.)
|
||||||
|
|
||||||
# Extended G-Code Commands
|
# Extended G-Code Commands
|
||||||
|
|
|
@ -476,7 +476,7 @@ class GCodeParser:
|
||||||
all_handlers = [
|
all_handlers = [
|
||||||
'G1', 'G4', 'G28', 'M400',
|
'G1', 'G4', 'G28', 'M400',
|
||||||
'G20', 'M82', 'M83', 'G90', 'G91', 'G92', 'M114', 'M220', 'M221',
|
'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',
|
'M105', 'M104', 'M109', 'M140', 'M190',
|
||||||
'M112', 'M115', 'IGNORE', 'GET_POSITION',
|
'M112', 'M115', 'IGNORE', 'GET_POSITION',
|
||||||
'RESTART', 'FIRMWARE_RESTART', 'ECHO', 'STATUS', 'HELP']
|
'RESTART', 'FIRMWARE_RESTART', 'ECHO', 'STATUS', 'HELP']
|
||||||
|
@ -599,14 +599,6 @@ class GCodeParser:
|
||||||
for pos, delta in enumerate(move_delta):
|
for pos, delta in enumerate(move_delta):
|
||||||
self.last_position[pos] += delta
|
self.last_position[pos] += delta
|
||||||
self.move_with_transform(self.last_position, speed)
|
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"
|
cmd_SAVE_GCODE_STATE_help = "Save G-Code coordinate state"
|
||||||
def cmd_SAVE_GCODE_STATE(self, params):
|
def cmd_SAVE_GCODE_STATE(self, params):
|
||||||
state_name = self.get_str('NAME', params, 'default')
|
state_name = self.get_str('NAME', params, 'default')
|
||||||
|
|
Loading…
Reference in New Issue