MCPcopy Create free account
hub / github.com/Duet3D/RepRapFirmware / Reset

Method Reset

src/GCodes/GCodeBuffer/GCodeBuffer.cpp:130–150  ·  view source on GitHub ↗

Reset it to its state after start-up

Source from the content-addressed store, hash-verified

128
129// Reset it to its state after start-up
130void GCodeBuffer::Reset() noexcept
131{
132#if HAS_SBC_INTERFACE
133 if (isWaitingForMacro)
134 {
135 ResolveMacroRequest(true, false);
136 }
137#endif
138
139 while (PopState(false)) { }
140
141#if HAS_SBC_INTERFACE
142 isBinaryBuffer = false;
143 requestedMacroFile.Clear();
144 isWaitingForMacro = macroFileClosed = false;
145 macroJustStarted = macroFileError = macroFileEmpty = abortFile = abortAllFiles = sendToSbc = messagePromptPending = messageAcknowledged = false;
146 machineState->lastCodeFromSbc = machineState->macroStartedByCode = false;
147#endif
148 cancelWait = false;
149 Init();
150}
151
152// Set it up to parse another G-code
153void GCodeBuffer::Init() noexcept

Callers 5

ForkFromMethod · 0.45
AbortFileMethod · 0.45
ClosePrintFileMethod · 0.45
RestartFromMethod · 0.45
PutMethod · 0.45

Calls 2

InitFunction · 0.50
ClearMethod · 0.45

Tested by

no test coverage detected