diff options
author | David Crocker <dcrocker@eschertech.com> | 2020-07-06 22:54:29 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2020-07-06 22:54:29 +0300 |
commit | 546c5d6081105c0623f0079affbcaee02f601f28 (patch) | |
tree | ad63ac7f8275c9085af05f8333a70ddec2d57a50 /src/GCodes/GCodeBuffer/StringParser.cpp | |
parent | 0ee716c72e5f72c885f9a511e349c60621b1af8a (diff) |
Two fixes
Pass M27 commands to SBC when in SBC mode. Meanwhile, when executig M27,
check that we ave a file before we try to find its length.
Don't queue G- and M-codes that contain expressions, because the
expresions may refer to 'iterations' or to values that change
Diffstat (limited to 'src/GCodes/GCodeBuffer/StringParser.cpp')
-rw-r--r-- | src/GCodes/GCodeBuffer/StringParser.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/GCodes/GCodeBuffer/StringParser.cpp b/src/GCodes/GCodeBuffer/StringParser.cpp index e6dd2797..c058b2c5 100644 --- a/src/GCodes/GCodeBuffer/StringParser.cpp +++ b/src/GCodes/GCodeBuffer/StringParser.cpp @@ -38,7 +38,7 @@ void StringParser::Init() noexcept gcodeLineEnd = 0; commandLength = 0; readPointer = -1; - hadLineNumber = hadChecksum = overflowed = false; + hadLineNumber = hadChecksum = overflowed = seenExpression = false; computedChecksum = 0; gb.bufferState = GCodeBufferState::parseNotStarted; commandIndent = 0; @@ -204,6 +204,7 @@ bool StringParser::Put(char c) noexcept case '{': ++braceCount; + seenExpression = true; StoreAndAddToChecksum(c); break; |