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

Method IsHeaterAssignedToTool

src/Tools/Tool.cpp:411–427  ·  view source on GitHub ↗

Test whether the specified heater is used by any tool static*/

Source from the content-addressed store, hash-verified

409
410// Test whether the specified heater is used by any tool
411/*static*/ bool Tool::IsHeaterAssignedToTool(int8_t heater) noexcept
412{
413 ReadLocker lock(toolListLock);
414 for (Tool *_ecv_null tool = toolList; tool != nullptr; tool = tool->Next())
415 {
416 for (size_t i = 0; i < tool->HeaterCount(); i++)
417 {
418 if (tool->GetHeater(i) == heater)
419 {
420 // It's already in use by some tool
421 return true;
422 }
423 }
424 }
425
426 return false;
427}
428
429/*static*/ GCodeResult Tool::SetAllToolsFirmwareRetraction(GCodeBuffer& gb, const StringRef& reply, OutputBuffer *_ecv_null & outBuf) THROWS(GCodeException)
430{

Callers

nothing calls this directly

Calls 3

HeaterCountMethod · 0.80
GetHeaterMethod · 0.80
NextMethod · 0.45

Tested by

no test coverage detected