Test whether the specified heater is used by any tool static*/
| 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 | { |
nothing calls this directly
no test coverage detected