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

Method SetM486Label

src/GCodes/ObjectTracker.cpp:100–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100void ObjectTracker::SetM486Label(unsigned int objectNumber, const char *_ecv_array objectName) noexcept
101{
102 usingM486Naming = true;
103
104 if (objectNumber >= numObjects) // if this is a new object
105 {
106 CreateObject(objectNumber, objectName);
107 }
108 else if (objectNumber < MaxTrackedObjects && objectName[0] != 0 && strcmp(objectName, objectDirectory[objectNumber].name.Get().Ptr()) != 0)
109 {
110 objectDirectory[objectNumber].SetName(objectName);
111 reprap.JobUpdated();
112 }
113}
114
115// Cancel an object, returning true if it was not already cancelled
116bool ObjectTracker::CancelObject(unsigned int objectNumber) noexcept

Callers 1

THROWSFunction · 0.80

Calls 3

JobUpdatedMethod · 0.80
GetMethod · 0.45
SetNameMethod · 0.45

Tested by

no test coverage detected