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:
Diffstat (limited to 'src/GCodes/GCodeBuffer/GCodeBuffer.cpp')
-rw-r--r--src/GCodes/GCodeBuffer/GCodeBuffer.cpp10
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