Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2019-12-30 14:12:49 +0300
committerDavid Crocker <dcrocker@eschertech.com>2019-12-30 14:12:49 +0300
commit5aa282177cd89aefede643887f7a4faeb098491e (patch)
treed90ddfd1f2f1822b97bcd33bcd26c322679945ab /src/GCodes/GCodeInput.cpp
parented7b59293d0f035404c5e62b49aed33ccc2b07d6 (diff)
Refactored GCode command decoding for GCode meta command support
Diffstat (limited to 'src/GCodes/GCodeInput.cpp')
-rw-r--r--src/GCodes/GCodeInput.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/GCodes/GCodeInput.cpp b/src/GCodes/GCodeInput.cpp
index a02261ba..ea791712 100644
--- a/src/GCodes/GCodeInput.cpp
+++ b/src/GCodes/GCodeInput.cpp
@@ -11,6 +11,7 @@
#include "GCodes.h"
#include "GCodeBuffer/GCodeBuffer.h"
+// Read some input bytes into the GCode buffer. Return true if there is a line of GCode waiting to be processed.
bool StandardGCodeInput::FillBuffer(GCodeBuffer *gb)
{
const size_t bytesToPass = min<size_t>(BytesCached(), GCODE_LENGTH);
@@ -30,9 +31,10 @@ bool StandardGCodeInput::FillBuffer(GCodeBuffer *gb)
{
gb->WriteToFile();
}
-
- // Code is complete or has been written to file, so stop here
- return true;
+ else
+ {
+ return true;
+ }
}
#else
if (gb->Put(c))