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

Method FillBuffer

src/GCodes/GCodeQueue.cpp:140–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140bool GCodeQueue::FillBuffer(GCodeBuffer *gb) noexcept
141{
142 // Can this buffer be filled?
143 if (queuedItems == nullptr || queuedItems->executeAtMove > reprap.GetMove().GetCompletedMoves())
144 {
145 // No - stop here
146 return false;
147 }
148
149 // Yes - load it into the passed GCodeBuffer instance
150 QueuedCode * code = _ecv_not_null(queuedItems);
151 code->AssignTo(gb);
152
153 // Release this item again
154 queuedItems = queuedItems->next;
155 code->next = freeItems;
156 freeItems = code;
157 return true;
158}
159
160// These inherited virtual functions need to be defined but are not called
161void GCodeQueue::Reset() noexcept

Callers 2

StartNextGCodeMethod · 0.45
DoFilePrintMethod · 0.45

Calls 2

AssignToMethod · 0.80
GetCompletedMovesMethod · 0.45

Tested by

no test coverage detected