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

Method CloseFile

src/GCodes/GCodeMachineState.cpp:222–247  ·  view source on GitHub ↗

Close the currently executing file

Source from the content-addressed store, hash-verified

220
221// Close the currently executing file
222void GCodeMachineState::CloseFile() noexcept
223{
224#if HAS_SBC_INTERFACE
225 if (reprap.UsingSbcInterface())
226 {
227 if (fileId != NoFileId)
228 {
229 const FileId lastFileId = fileId;
230 for (GCodeMachineState *ms = this; ms != nullptr; ms = ms->GetPrevious())
231 {
232 if (ms->fileId == lastFileId)
233 {
234 ms->fileId = NoFileId;
235 ms->fileFinished = false;
236 }
237 }
238 }
239 }
240 else
241#endif
242 {
243#if HAS_MASS_STORAGE || HAS_EMBEDDED_FILES
244 fileState.Close();
245#endif
246 }
247}
248
249void GCodeMachineState::WaitForAcknowledgement(uint32_t seq) noexcept
250{

Callers 2

AbortFileMethod · 0.45
MacroFileClosedMethod · 0.45

Calls 3

UsingSbcInterfaceMethod · 0.80
GetPreviousMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected