aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2024-12-01 13:48:35 -0500
committerKevin O'Connor <kevin@koconnor.net>2024-12-01 14:16:13 -0500
commit2165c900115a916956046c9520104503759e88dc (patch)
tree6e86e0113e99f4491c88da9baedeaf5e85d5b0e2
parenta6df5411042d859f4a0c8328df566189b9f71814 (diff)
downloadkutter-2165c900115a916956046c9520104503759e88dc.tar.gz
kutter-2165c900115a916956046c9520104503759e88dc.tar.xz
kutter-2165c900115a916956046c9520104503759e88dc.zip
gcode: Improve checksum detection in get_raw_command_parameters()
Only consider a trailing '*' to indicate a checksum if the remainder of the string is a number. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--klippy/gcode.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/klippy/gcode.py b/klippy/gcode.py
index ca176ed0..975da792 100644
--- a/klippy/gcode.py
+++ b/klippy/gcode.py
@@ -35,7 +35,7 @@ class GCodeCommand:
# Skip any gcode line-number and ignore any trailing checksum
param_start += origline.upper().find(command)
end = origline.rfind('*')
- if end >= 0:
+ if end >= 0 and origline[end+1:].isdigit():
param_end = end
if origline[param_start:param_start+1].isspace():
param_start += 1