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

Method CreateObject

src/GCodes/ObjectTracker.cpp:284–296  ·  view source on GitHub ↗

This is called when we need to create a new named object

Source from the content-addressed store, hash-verified

282
283// This is called when we need to create a new named object
284void ObjectTracker::CreateObject(unsigned int number, const char *_ecv_array label) noexcept
285{
286 if (number < MaxTrackedObjects)
287 {
288 while (numObjects <= number)
289 {
290 objectDirectory[numObjects].Init("");
291 ++numObjects;
292 }
293 objectDirectory[number].SetName(label);
294 reprap.JobUpdated();
295 }
296}
297
298// This is called when we have found an object label in a comment
299size_t ObjectTracker::GetObjectNumber(const char *_ecv_array label) noexcept

Callers

nothing calls this directly

Calls 3

JobUpdatedMethod · 0.80
InitMethod · 0.45
SetNameMethod · 0.45

Tested by

no test coverage detected