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>
This commit is contained in:
parent
a6df541104
commit
2165c90011
@ -35,7 +35,7 @@ class GCodeCommand:
|
|||||||
# Skip any gcode line-number and ignore any trailing checksum
|
# Skip any gcode line-number and ignore any trailing checksum
|
||||||
param_start += origline.upper().find(command)
|
param_start += origline.upper().find(command)
|
||||||
end = origline.rfind('*')
|
end = origline.rfind('*')
|
||||||
if end >= 0:
|
if end >= 0 and origline[end+1:].isdigit():
|
||||||
param_end = end
|
param_end = end
|
||||||
if origline[param_start:param_start+1].isspace():
|
if origline[param_start:param_start+1].isspace():
|
||||||
param_start += 1
|
param_start += 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user