diff options
Diffstat (limited to 'src/GCodes/GCodeBuffer/GCodeBuffer.cpp')
-rw-r--r-- | src/GCodes/GCodeBuffer/GCodeBuffer.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/GCodes/GCodeBuffer/GCodeBuffer.cpp b/src/GCodes/GCodeBuffer/GCodeBuffer.cpp index 21e6c1f2..1feac192 100644 --- a/src/GCodes/GCodeBuffer/GCodeBuffer.cpp +++ b/src/GCodes/GCodeBuffer/GCodeBuffer.cpp @@ -1016,4 +1016,14 @@ void GCodeBuffer::SetParameters(int codeRunning) noexcept PARSER_OPERATION(SetParameters(machineState, codeRunning)); } +VariableSet& GCodeBuffer::GetVariables() const noexcept +{ + GCodeMachineState *mc = machineState; + while (mc->localPush && mc->GetPrevious() != nullptr) + { + mc = mc->GetPrevious(); + } + return mc->variables; +} + // End |