Skip to content

Commit

Permalink
Event Gcode Always Available
Browse files Browse the repository at this point in the history
  • Loading branch information
InsanityAutomation committed Oct 14, 2021
1 parent 5d665d5 commit 9369591
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2314,6 +2314,8 @@
//#define EVENT_GCODE_TOOLCHANGE_T0 "G28 A\nG1 A0" // Extra G-code to run while executing tool-change command T0
//#define EVENT_GCODE_TOOLCHANGE_T1 "G1 A10" // Extra G-code to run while executing tool-change command T1

//#define EVENT_GCODE_TOOLCHANGE_ALWAYS_RUN // Force Event Gcode sequences above to always be executed. Use with caution!

/**
* Tool Sensors detect when tools have been picked up or dropped.
* Requires the pins TOOL_SENSOR1_PIN, TOOL_SENSOR2_PIN, etc.
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/module/tool_change.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {

TERN_(HAS_FANMUX, fanmux_switch(active_extruder));

if (!no_move) {
if (!no_move || TERN0(EVENT_GCODE_TOOLCHANGE_ALWAYS_RUN, true)) {
#ifdef EVENT_GCODE_TOOLCHANGE_T0
if (new_tool == 0)
gcode.process_subcommands_now(F(EVENT_GCODE_TOOLCHANGE_T0));
Expand Down

0 comments on commit 9369591

Please sign in to comment.