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>2021-03-10 12:19:35 +0300
committerDavid Crocker <dcrocker@eschertech.com>2021-03-10 12:19:35 +0300
commit8b89aab7455a870574fed653738af5566e82beb3 (patch)
treecf76a26591d12b45f629cff8c3b025fd64ea53db /src/GCodes/GCodeMachineState.cpp
parentdd4939d6c393fba1ba1c101ad848562998b5ea09 (diff)
Implemented variables
Diffstat (limited to 'src/GCodes/GCodeMachineState.cpp')
-rw-r--r--src/GCodes/GCodeMachineState.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/GCodes/GCodeMachineState.cpp b/src/GCodes/GCodeMachineState.cpp
index bae9873b..b3fc004a 100644
--- a/src/GCodes/GCodeMachineState.cpp
+++ b/src/GCodes/GCodeMachineState.cpp
@@ -24,9 +24,9 @@ GCodeMachineState::GCodeMachineState() noexcept
#if HAS_LINUX_INTERFACE
lastCodeFromSbc(false), macroStartedByCode(false), fileFinished(false),
#endif
- compatibility(Compatibility::RepRapFirmware), blockNesting(0),
+ compatibility(Compatibility::RepRapFirmware),
previous(nullptr), errorMessage(nullptr),
- state(GCodeState::normal), stateMachineResult(GCodeResult::ok)
+ blockNesting(0), state(GCodeState::normal), stateMachineResult(GCodeResult::ok)
{
blockStates[0].SetPlainBlock(0);
}
@@ -41,7 +41,7 @@ GCodeMachineState::GCodeMachineState(GCodeMachineState& prev, bool withinSameFil
fileId(prev.fileId),
#endif
lockedResources(prev.lockedResources),
- lineNumber((withinSameFile) ? prev.lineNumber : 0),
+ lineNumber(0),
selectedPlane(prev.selectedPlane), drivesRelative(prev.drivesRelative), axesRelative(prev.axesRelative),
doingFileMacro(prev.doingFileMacro), waitWhileCooling(prev.waitWhileCooling), runningM501(prev.runningM501), runningM502(prev.runningM502),
volumetricExtrusion(false), g53Active(false), runningSystemMacro(prev.runningSystemMacro), usingInches(prev.usingInches),
@@ -49,9 +49,9 @@ GCodeMachineState::GCodeMachineState(GCodeMachineState& prev, bool withinSameFil
#if HAS_LINUX_INTERFACE
lastCodeFromSbc(prev.lastCodeFromSbc), macroStartedByCode(prev.macroStartedByCode), fileFinished(prev.fileFinished),
#endif
- compatibility(prev.compatibility), blockNesting((withinSameFile) ? prev.blockNesting : 0),
+ compatibility(prev.compatibility),
previous(&prev), errorMessage(nullptr),
- state(GCodeState::normal), stateMachineResult(GCodeResult::ok)
+ blockNesting((withinSameFile) ? prev.blockNesting : 0), state(GCodeState::normal), stateMachineResult(GCodeResult::ok)
{
if (withinSameFile)
{
@@ -245,6 +245,7 @@ void GCodeMachineState::EndBlock() noexcept
if (blockNesting != 0)
{
--blockNesting;
+ variables.EndScope(blockNesting);
}
}