MCPcopy Create free account
hub / github.com/MarlinFirmware/Marlin / use_probing_tool

Method use_probing_tool

Marlin/src/module/probe.cpp:940–949  ·  view source on GitHub ↗

* Switches to the appropriate tool (PROBING_TOOL) for probing (probing = true), and switches * back to the old tool when probing = false. Uses statics to avoid unnecessary checks and to * cache the previous tool, so always call with false after calling with true. */

Source from the content-addressed store, hash-verified

938 * cache the previous tool, so always call with false after calling with true.
939 */
940 void Probe::use_probing_tool(const bool probing/*=true*/) {
941 static uint8_t old_tool;
942 static bool old_state = false;
943 if (probing == old_state) return;
944 old_state = probing;
945 if (probing) old_tool = active_extruder;
946 const uint8_t tool = probing ? PROBING_TOOL : old_tool;
947 if (tool != active_extruder)
948 tool_change(tool, ENABLED(PROBE_TOOLCHANGE_NO_MOVE));
949 }
950
951#endif
952

Callers 7

G34Method · 0.80
ac_setupFunction · 0.80
ac_cleanupFunction · 0.80
G30Method · 0.80
G35Method · 0.80
G29Method · 0.80
ubl_G29.cppFile · 0.80

Calls 1

tool_changeFunction · 0.85

Tested by

no test coverage detected