gcode: process_batch() should execute commands atomically

Update the process_batch() method so that it will not interleave
commands read from the input fd with the batched commands.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2018-10-18 11:51:35 -04:00
parent 37b9a2442f
commit a5e55c2acc
3 changed files with 26 additions and 23 deletions

View File

@@ -164,7 +164,7 @@ class VirtualSD:
continue
# Dispatch command
try:
res = self.gcode.process_batch(lines[-1])
res = self.gcode.process_batch([lines[-1]])
if not res:
self.reactor.pause(self.reactor.monotonic() + 0.100)
continue