2.0 IDEX Independent z offset and other fixes (#11862)
* Add Formbot Raptor board Co-Authored-By: InsanityAutomation <insanityautomation@users.noreply.github.com> * Add a second Z probe Z offset Co-Authored-By: InsanityAutomation <insanityautomation@users.noreply.github.com> * Modify method to utilize live adjustment of hotend z offset Should probably move config option to babystepping and rename as it may now apply to all multiextruder systems * Move config item and catchup other code to current method
This commit is contained in:
committed by
Roxy-3D
parent
217e0efd20
commit
1104054d73
@ -22,13 +22,12 @@
|
||||
|
||||
#include "tool_change.h"
|
||||
|
||||
#include "probe.h"
|
||||
#include "motion.h"
|
||||
#include "planner.h"
|
||||
|
||||
#include "../Marlin.h"
|
||||
|
||||
#include "../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(PARKING_EXTRUDER) && PARKING_EXTRUDER_SOLENOIDS_DELAY > 0
|
||||
#include "../gcode/gcode.h" // for dwell()
|
||||
#endif
|
||||
@ -57,6 +56,10 @@
|
||||
#include "../feature/fanmux.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(ULTIPANEL)
|
||||
#include "../lcd/ultralcd.h"
|
||||
#endif
|
||||
|
||||
#if DO_SWITCH_EXTRUDER
|
||||
|
||||
#if EXTRUDERS > 3
|
||||
@ -498,11 +501,24 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
|
||||
active_extruder = tmp_extruder;
|
||||
update_software_endstops(X_AXIS);
|
||||
active_extruder = !tmp_extruder;
|
||||
|
||||
// Don't move the new extruder out of bounds
|
||||
if (!WITHIN(current_position[X_AXIS], soft_endstop_min[X_AXIS], soft_endstop_max[X_AXIS]))
|
||||
no_move = true;
|
||||
|
||||
#else
|
||||
// No software endstops? Use the configured limits
|
||||
if (active_extruder == 0) {
|
||||
if (!WITHIN(current_position[X_AXIS], X2_MIN_POS, X2_MAX_POS))
|
||||
no_move = true;
|
||||
}
|
||||
else if (!WITHIN(current_position[X_AXIS], X1_MIN_POS, X1_MAX_POS))
|
||||
no_move = true;
|
||||
#endif
|
||||
|
||||
// Don't move the new extruder out of bounds
|
||||
if (!WITHIN(current_position[X_AXIS], soft_endstop_min[X_AXIS], soft_endstop_max[X_AXIS]))
|
||||
no_move = true;
|
||||
#if ENABLED(ULTIPANEL)
|
||||
lcd_return_to_status();
|
||||
#endif
|
||||
|
||||
if (!no_move) set_destination_from_current();
|
||||
dualx_tool_change(tmp_extruder, no_move); // Can modify no_move
|
||||
@ -569,6 +585,13 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Move back", destination);
|
||||
#endif
|
||||
#if ENABLED(DUAL_X_CARRIAGE)
|
||||
// Dual x carriage does not properly apply these to current position due to command ordering
|
||||
// So we apply the offsets for y and z to the destination here. X cannot have an offset in this mode
|
||||
// as it is utilized for X2 home position.
|
||||
destination[Y_AXIS] -= hotend_offset[Y_AXIS][active_extruder] - hotend_offset[Y_AXIS][tmp_extruder];
|
||||
destination[Z_AXIS] -= hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder];
|
||||
#endif
|
||||
// Move back to the original (or tweaked) position
|
||||
do_blocking_move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS]);
|
||||
#if ENABLED(DUAL_X_CARRIAGE)
|
||||
|
Reference in New Issue
Block a user