mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-14 11:04:29 +05:00
gcode_shell_command: Fix issue with partial lines being repeated (#118)
Without clearing the partial line on a full line being sent the self.partial_output was repeated for every subsequent line.
This commit is contained in:
@@ -40,6 +40,8 @@ class ShellCommand:
|
|||||||
split = data.rfind('\n') + 1
|
split = data.rfind('\n') + 1
|
||||||
self.partial_output = data[split:]
|
self.partial_output = data[split:]
|
||||||
data = data[:split]
|
data = data[:split]
|
||||||
|
else:
|
||||||
|
self.partial_output = ""
|
||||||
self.gcode.respond_info(data)
|
self.gcode.respond_info(data)
|
||||||
|
|
||||||
cmd_RUN_SHELL_COMMAND_help = "Run a linux shell command"
|
cmd_RUN_SHELL_COMMAND_help = "Run a linux shell command"
|
||||||
|
|||||||
Reference in New Issue
Block a user