Skip to content

Commit

Permalink
gcode: Use the same M117/M118 fixup for M23
Browse files Browse the repository at this point in the history
The M23 command has similar requirements for extracting the full
parameter string that M117/M118 have.  Use the same code for those
fixups.

Signed-off-by: Kevin O'Connor <[email protected]>
  • Loading branch information
KevinOConnor committed Dec 1, 2024
1 parent 03068b4 commit 62325d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions klippy/gcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def _handle_ready(self):
self._build_status_commands()
self._respond_state("Ready")
# Parse input into commands
args_r = re.compile('([A-Z_]+|[A-Z*/])')
args_r = re.compile('([A-Z_]+|[A-Z*])')
def _process_commands(self, commands, need_ack=True):
for line in commands:
# Ignore comments and leading/trailing spaces
Expand Down Expand Up @@ -289,7 +289,7 @@ def cmd_default(self, gcmd):
if ' ' in cmd:
# Handle M117/M118 gcode with numeric and special characters
realcmd = cmd.split()[0]
if realcmd in ["M117", "M118"]:
if realcmd in ["M117", "M118", "M23"]:
handler = self.gcode_handlers.get(realcmd, None)
if handler is not None:
gcmd._command = realcmd
Expand Down

0 comments on commit 62325d4

Please sign in to comment.