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

Method StartToolChange

src/GCodes/GCodes.cpp:5218–5222  ·  view source on GitHub ↗

Initiate a tool change. Caller has already checked that the correct tool isn't loaded and set up ms.newToolNumber.

Source from the content-addressed store, hash-verified

5216
5217// Initiate a tool change. Caller has already checked that the correct tool isn't loaded and set up ms.newToolNumber.
5218void GCodes::StartToolChange(GCodeBuffer& gb, MovementState& ms, uint8_t param) noexcept
5219{
5220 ms.toolChangeParam = (IsSimulating()) ? 0u : param;
5221 gb.SetState(GCodeState::toolChange0);
5222}
5223
5224// Set up some default values in the move buffer for special moves, e.g. for Z probing and firmware retraction
5225void GCodes::SetMoveBufferDefaults(MovementState& ms) noexcept

Callers 1

ResumePrintingMethod · 0.80

Calls 2

IsSimulatingFunction · 0.85
SetStateMethod · 0.45

Tested by

no test coverage detected