gcode: Raise a gcode.error() from G20 command

It's important to raise an error (instead of calling respond_error() )
so that a G20 will stop a virtual_sdcard print.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2020-04-24 14:52:00 -04:00
parent 9730be8e17
commit ed3e6b42c7
1 changed files with 1 additions and 1 deletions

View File

@ -506,7 +506,7 @@ class GCodeParser:
# G-Code coordinate manipulation
def cmd_G20(self, params):
# Set units to inches
self.respond_error('Machine does not support G20 (inches) command')
raise self.error('Machine does not support G20 (inches) command')
def cmd_M82(self, params):
# Use absolute distances for extrusion
self.absolute_extrude = True