Delta support for multiple hotends with offsets (#10118)

This commit is contained in:
Scott Lahteine
2018-03-16 00:46:42 -05:00
committed by GitHub
parent 899b4df7a3
commit a6feb58837
7 changed files with 46 additions and 15 deletions

View File

@ -191,7 +191,9 @@ void GcodeSuite::G28(const bool always_home_all) {
// Always home with tool 0 active
#if HOTENDS > 1
const uint8_t old_tool_index = active_extruder;
#if DISABLED(DELTA) || ENABLED(DELTA_HOME_TO_SAFE_ZONE)
const uint8_t old_tool_index = active_extruder;
#endif
tool_change(0, 0, true);
#endif
@ -331,7 +333,7 @@ void GcodeSuite::G28(const bool always_home_all) {
clean_up_after_endstop_or_probe_move();
// Restore the active tool after homing
#if HOTENDS > 1
#if HOTENDS > 1 && (DISABLED(DELTA) || ENABLED(DELTA_HOME_TO_SAFE_ZONE))
#if ENABLED(PARKING_EXTRUDER)
#define NO_FETCH false // fetch the previous toolhead
#else

View File

@ -70,6 +70,11 @@ void GcodeSuite::M218() {
}
SERIAL_EOL();
}
#if ENABLED(DELTA)
if (target_extruder == active_extruder)
do_blocking_move_to_xy(current_position[X_AXIS], current_position[Y_AXIS], planner.max_feedrate_mm_s[X_AXIS]);
#endif
}
#endif // HOTENDS > 1

View File

@ -65,7 +65,7 @@ void GcodeSuite::M125() {
// Lift Z axis
if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
#if HOTENDS > 1 && DISABLED(DUAL_X_CARRIAGE)
#if HOTENDS > 1 && DISABLED(DUAL_X_CARRIAGE) && DISABLED(DELTA)
park_point.x += (active_extruder ? hotend_offset[X_AXIS][active_extruder] : 0);
park_point.y += (active_extruder ? hotend_offset[Y_AXIS][active_extruder] : 0);
#endif

View File

@ -87,7 +87,7 @@ void GcodeSuite::M600() {
// Lift Z axis
if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
#if HOTENDS > 1 && DISABLED(DUAL_X_CARRIAGE)
#if HOTENDS > 1 && DISABLED(DUAL_X_CARRIAGE) && DISABLED(DELTA)
park_point.x += (active_extruder ? hotend_offset[X_AXIS][active_extruder] : 0);
park_point.y += (active_extruder ? hotend_offset[Y_AXIS][active_extruder] : 0);
#endif