Simpler Allen Key config. Fixes, cleanups from refactor (#15256)
This commit is contained in:
@ -1205,9 +1205,7 @@ void MarlinSettings::postprocess() {
|
||||
const float backlash_smoothing_mm = 3;
|
||||
#endif
|
||||
_FIELD_TEST(backlash_distance_mm);
|
||||
EEPROM_WRITE(backlash_distance_mm[X_AXIS]);
|
||||
EEPROM_WRITE(backlash_distance_mm[Y_AXIS]);
|
||||
EEPROM_WRITE(backlash_distance_mm[Z_AXIS]);
|
||||
EEPROM_WRITE(backlash_distance_mm);
|
||||
EEPROM_WRITE(backlash_correction);
|
||||
EEPROM_WRITE(backlash_smoothing_mm);
|
||||
}
|
||||
@ -2010,9 +2008,7 @@ void MarlinSettings::postprocess() {
|
||||
float backlash_smoothing_mm;
|
||||
#endif
|
||||
_FIELD_TEST(backlash_distance_mm);
|
||||
EEPROM_READ(backlash_distance_mm[X_AXIS]);
|
||||
EEPROM_READ(backlash_distance_mm[Y_AXIS]);
|
||||
EEPROM_READ(backlash_distance_mm[Z_AXIS]);
|
||||
EEPROM_READ(backlash_distance_mm);
|
||||
EEPROM_READ(backlash_correction);
|
||||
EEPROM_READ(backlash_smoothing_mm);
|
||||
}
|
||||
@ -2805,9 +2801,8 @@ void MarlinSettings::reset() {
|
||||
CONFIG_ECHO_START();
|
||||
for (uint8_t e = 1; e < HOTENDS; e++) {
|
||||
SERIAL_ECHOPAIR(
|
||||
" M218 T", (int)e
|
||||
, " X", LINEAR_UNIT(hotend_offset[X_AXIS][e])
|
||||
, " Y", LINEAR_UNIT(hotend_offset[Y_AXIS][e])
|
||||
" M218 T", (int)e,
|
||||
" X", LINEAR_UNIT(hotend_offset[X_AXIS][e]), " Y", LINEAR_UNIT(hotend_offset[Y_AXIS][e])
|
||||
);
|
||||
SERIAL_ECHOLNPAIR_F(" Z", LINEAR_UNIT(hotend_offset[Z_AXIS][e]), 3);
|
||||
}
|
||||
@ -2922,9 +2917,9 @@ void MarlinSettings::reset() {
|
||||
CONFIG_ECHO_HEADING("Endstop adjustment:");
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOLNPAIR(
|
||||
" M666 X", LINEAR_UNIT(delta_endstop_adj[X_AXIS])
|
||||
, " Y", LINEAR_UNIT(delta_endstop_adj[Y_AXIS])
|
||||
, " Z", LINEAR_UNIT(delta_endstop_adj[Z_AXIS])
|
||||
" M666 X", LINEAR_UNIT(delta_endstop_adj[A_AXIS])
|
||||
, " Y", LINEAR_UNIT(delta_endstop_adj[B_AXIS])
|
||||
, " Z", LINEAR_UNIT(delta_endstop_adj[C_AXIS])
|
||||
);
|
||||
|
||||
CONFIG_ECHO_HEADING("Delta settings: L<diagonal_rod> R<radius> H<height> S<segments_per_s> B<calibration radius> XYZ<tower angle corrections>");
|
||||
|
@ -101,12 +101,8 @@ void recalc_delta_settings() {
|
||||
*/
|
||||
|
||||
#define DELTA_DEBUG(VAR) do { \
|
||||
SERIAL_ECHOPAIR("cartesian X:", VAR[X_AXIS]); \
|
||||
SERIAL_ECHOPAIR(" Y:", VAR[Y_AXIS]); \
|
||||
SERIAL_ECHOLNPAIR(" Z:", VAR[Z_AXIS]); \
|
||||
SERIAL_ECHOPAIR("delta A:", delta[A_AXIS]); \
|
||||
SERIAL_ECHOPAIR(" B:", delta[B_AXIS]); \
|
||||
SERIAL_ECHOLNPAIR(" C:", delta[C_AXIS]); \
|
||||
SERIAL_ECHOLNPAIR("Cartesian X", VAR[X_AXIS], " Y", VAR[Y_AXIS], " Z", VAR[Z_AXIS]); \
|
||||
SERIAL_ECHOLNPAIR("Delta A", delta[A_AXIS], " B", delta[B_AXIS], " C", delta[C_AXIS]); \
|
||||
}while(0)
|
||||
|
||||
void inverse_kinematics(const float (&raw)[XYZ]) {
|
||||
|
@ -105,7 +105,7 @@ float current_position[XYZE] = { X_HOME_POS, Y_HOME_POS, Z_HOME_POS };
|
||||
* Cartesian Destination
|
||||
* The destination for a move, filled in by G-code movement commands,
|
||||
* and expected by functions like 'prepare_move_to_destination'.
|
||||
* Set with 'get_destination_from_command' or 'set_destination_from_current'.
|
||||
* G-codes can set destination using 'get_destination_from_command'
|
||||
*/
|
||||
float destination[XYZE]; // = { 0 }
|
||||
|
||||
@ -670,7 +670,7 @@ void clean_up_after_endstop_or_probe_move() {
|
||||
|
||||
// For SCARA enforce a minimum segment size
|
||||
#if IS_SCARA
|
||||
NOMORE(segments, cartesian_mm * (1.0f / float(SCARA_MIN_SEGMENT_LENGTH)));
|
||||
NOMORE(segments, cartesian_mm * RECIPROCAL(SCARA_MIN_SEGMENT_LENGTH));
|
||||
#endif
|
||||
|
||||
// At least one segment is required
|
||||
|
@ -1174,7 +1174,10 @@ void Planner::recalculate() {
|
||||
* Maintain fans, paste extruder pressure,
|
||||
*/
|
||||
void Planner::check_axes_activity() {
|
||||
uint8_t axis_active[NUM_AXIS] = { 0 };
|
||||
|
||||
#if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_E)
|
||||
uint8_t axis_active[NUM_AXIS] = { 0 };
|
||||
#endif
|
||||
|
||||
#if FAN_COUNT > 0
|
||||
uint8_t tail_fan_speed[FAN_COUNT];
|
||||
@ -1190,10 +1193,9 @@ void Planner::check_axes_activity() {
|
||||
#endif
|
||||
|
||||
if (has_blocks_queued()) {
|
||||
block_t* block;
|
||||
|
||||
#if FAN_COUNT > 0 || ENABLED(BARICUDA)
|
||||
block = &block_buffer[block_buffer_tail];
|
||||
block_t *block = &block_buffer[block_buffer_tail];
|
||||
#endif
|
||||
|
||||
#if FAN_COUNT > 0
|
||||
@ -1210,10 +1212,12 @@ void Planner::check_axes_activity() {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) {
|
||||
block = &block_buffer[b];
|
||||
LOOP_XYZE(i) if (block->steps[i]) axis_active[i]++;
|
||||
}
|
||||
#if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_E)
|
||||
for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) {
|
||||
block_t *block = &block_buffer[b];
|
||||
LOOP_XYZE(i) if (block->steps[i]) axis_active[i] = true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
#if FAN_COUNT > 0
|
||||
@ -1517,14 +1521,14 @@ float Planner::get_axis_position_mm(const AxisEnum axis) {
|
||||
const bool was_enabled = STEPPER_ISR_ENABLED();
|
||||
if (was_enabled) DISABLE_STEPPER_DRIVER_INTERRUPT();
|
||||
|
||||
// ((a1+a2)+(a1-a2))/2 -> (a1+a2+a1-a2)/2 -> (a1+a1)/2 -> a1
|
||||
// ((a1+a2)-(a1-a2))/2 -> (a1+a2-a1+a2)/2 -> (a2+a2)/2 -> a2
|
||||
axis_steps = 0.5f * (
|
||||
axis == CORE_AXIS_2 ? CORESIGN(stepper.position(CORE_AXIS_1) - stepper.position(CORE_AXIS_2))
|
||||
: stepper.position(CORE_AXIS_1) + stepper.position(CORE_AXIS_2)
|
||||
);
|
||||
const int32_t p1 = stepper.position(CORE_AXIS_1),
|
||||
p2 = stepper.position(CORE_AXIS_2);
|
||||
|
||||
if (was_enabled) ENABLE_STEPPER_DRIVER_INTERRUPT();
|
||||
|
||||
// ((a1+a2)+(a1-a2))/2 -> (a1+a2+a1-a2)/2 -> (a1+a1)/2 -> a1
|
||||
// ((a1+a2)-(a1-a2))/2 -> (a1+a2-a1+a2)/2 -> (a2+a2)/2 -> a2
|
||||
axis_steps = (axis == CORE_AXIS_2 ? CORESIGN(p1 - p2) : p1 + p2) * 0.5f;
|
||||
}
|
||||
else
|
||||
axis_steps = stepper.position(axis);
|
||||
@ -1551,11 +1555,11 @@ void Planner::synchronize() {
|
||||
*
|
||||
* Add a new linear movement to the planner queue (in terms of steps).
|
||||
*
|
||||
* target - target position in steps units
|
||||
* target_float - target position in direct (mm, degrees) units. optional
|
||||
* fr_mm_s - (target) speed of the move
|
||||
* extruder - target extruder
|
||||
* millimeters - the length of the movement, if known
|
||||
* target - target position in steps units
|
||||
* target_float - target position in direct (mm, degrees) units. optional
|
||||
* fr_mm_s - (target) speed of the move
|
||||
* extruder - target extruder
|
||||
* millimeters - the length of the movement, if known
|
||||
*
|
||||
* Returns true if movement was properly queued, false otherwise
|
||||
*/
|
||||
@ -1644,18 +1648,14 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
||||
#endif
|
||||
|
||||
/* <-- add a slash to enable
|
||||
SERIAL_ECHOPAIR(" _populate_block FR:", fr_mm_s);
|
||||
SERIAL_ECHOPAIR(" A:", target[A_AXIS]);
|
||||
SERIAL_ECHOPAIR(" (", da);
|
||||
SERIAL_ECHOPAIR(" steps) B:", target[B_AXIS]);
|
||||
SERIAL_ECHOPAIR(" (", db);
|
||||
SERIAL_ECHOPAIR(" steps) C:", target[C_AXIS]);
|
||||
SERIAL_ECHOPAIR(" (", dc);
|
||||
#if EXTRUDERS
|
||||
SERIAL_ECHOPAIR(" steps) E:", target[E_AXIS]);
|
||||
SERIAL_ECHOPAIR(" (", de);
|
||||
#endif
|
||||
SERIAL_ECHOLNPGM(" steps)");
|
||||
SERIAL_ECHOLNPAIR(" _populate_block FR:", fr_mm_s,
|
||||
" A:", target[A_AXIS], " (", da, " steps)"
|
||||
" B:", target[B_AXIS], " (", db, " steps)"
|
||||
" C:", target[C_AXIS], " (", dc, " steps)"
|
||||
#if EXTRUDERS
|
||||
" E:", target[E_AXIS], " (", de, " steps)"
|
||||
#endif
|
||||
);
|
||||
//*/
|
||||
|
||||
#if EITHER(PREVENT_COLD_EXTRUSION, PREVENT_LENGTHY_EXTRUDE)
|
||||
@ -2633,7 +2633,7 @@ bool Planner::buffer_segment(const float &a, const float &b, const float &c, con
|
||||
//*/
|
||||
|
||||
// Queue the movement
|
||||
if (
|
||||
if (
|
||||
!_buffer_steps(target
|
||||
#if HAS_POSITION_FLOAT
|
||||
, target_float
|
||||
|
@ -507,8 +507,7 @@ class Planner {
|
||||
skew(pos);
|
||||
#endif
|
||||
#if HAS_LEVELING
|
||||
if (leveling)
|
||||
apply_leveling(pos);
|
||||
if (leveling) apply_leveling(pos);
|
||||
#endif
|
||||
#if ENABLED(FWRETRACT)
|
||||
apply_retract(pos);
|
||||
@ -529,8 +528,7 @@ class Planner {
|
||||
unapply_retract(pos);
|
||||
#endif
|
||||
#if HAS_LEVELING
|
||||
if (leveling)
|
||||
unapply_leveling(pos);
|
||||
if (leveling) unapply_leveling(pos);
|
||||
#endif
|
||||
#if ENABLED(SKEW_CORRECTION)
|
||||
unskew(pos);
|
||||
|
@ -155,167 +155,77 @@ float zprobe_zoffset; // Initialized by settings.load()
|
||||
#elif ENABLED(Z_PROBE_ALLEN_KEY)
|
||||
|
||||
void run_deploy_moves_script() {
|
||||
#if defined(Z_PROBE_ALLEN_KEY_DEPLOY_1_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_1_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_1_Z)
|
||||
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_X
|
||||
#define Z_PROBE_ALLEN_KEY_DEPLOY_1_X current_position[X_AXIS]
|
||||
#endif
|
||||
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_Y
|
||||
#define Z_PROBE_ALLEN_KEY_DEPLOY_1_Y current_position[Y_AXIS]
|
||||
#endif
|
||||
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_Z
|
||||
#define Z_PROBE_ALLEN_KEY_DEPLOY_1_Z current_position[Z_AXIS]
|
||||
#endif
|
||||
#ifdef Z_PROBE_ALLEN_KEY_DEPLOY_1
|
||||
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE
|
||||
#define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE 0.0
|
||||
#endif
|
||||
const float deploy_1[] = { Z_PROBE_ALLEN_KEY_DEPLOY_1_X, Z_PROBE_ALLEN_KEY_DEPLOY_1_Y, Z_PROBE_ALLEN_KEY_DEPLOY_1_Z };
|
||||
constexpr float deploy_1[] = Z_PROBE_ALLEN_KEY_DEPLOY_1;
|
||||
do_blocking_move_to(deploy_1, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE));
|
||||
#endif
|
||||
#if defined(Z_PROBE_ALLEN_KEY_DEPLOY_2_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_2_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_2_Z)
|
||||
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_2_X
|
||||
#define Z_PROBE_ALLEN_KEY_DEPLOY_2_X current_position[X_AXIS]
|
||||
#endif
|
||||
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_2_Y
|
||||
#define Z_PROBE_ALLEN_KEY_DEPLOY_2_Y current_position[Y_AXIS]
|
||||
#endif
|
||||
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_2_Z
|
||||
#define Z_PROBE_ALLEN_KEY_DEPLOY_2_Z current_position[Z_AXIS]
|
||||
#endif
|
||||
#ifdef Z_PROBE_ALLEN_KEY_DEPLOY_2
|
||||
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE
|
||||
#define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE 0.0
|
||||
#endif
|
||||
const float deploy_2[] = { Z_PROBE_ALLEN_KEY_DEPLOY_2_X, Z_PROBE_ALLEN_KEY_DEPLOY_2_Y, Z_PROBE_ALLEN_KEY_DEPLOY_2_Z };
|
||||
constexpr float deploy_2[] = Z_PROBE_ALLEN_KEY_DEPLOY_2;
|
||||
do_blocking_move_to(deploy_2, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE));
|
||||
#endif
|
||||
#if defined(Z_PROBE_ALLEN_KEY_DEPLOY_3_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_3_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_3_Z)
|
||||
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_3_X
|
||||
#define Z_PROBE_ALLEN_KEY_DEPLOY_3_X current_position[X_AXIS]
|
||||
#endif
|
||||
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_3_Y
|
||||
#define Z_PROBE_ALLEN_KEY_DEPLOY_3_Y current_position[Y_AXIS]
|
||||
#endif
|
||||
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_3_Z
|
||||
#define Z_PROBE_ALLEN_KEY_DEPLOY_3_Z current_position[Z_AXIS]
|
||||
#endif
|
||||
#ifdef Z_PROBE_ALLEN_KEY_DEPLOY_3
|
||||
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE
|
||||
#define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE 0.0
|
||||
#endif
|
||||
const float deploy_3[] = { Z_PROBE_ALLEN_KEY_DEPLOY_3_X, Z_PROBE_ALLEN_KEY_DEPLOY_3_Y, Z_PROBE_ALLEN_KEY_DEPLOY_3_Z };
|
||||
constexpr float deploy_3[] = Z_PROBE_ALLEN_KEY_DEPLOY_3;
|
||||
do_blocking_move_to(deploy_3, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE));
|
||||
#endif
|
||||
#if defined(Z_PROBE_ALLEN_KEY_DEPLOY_4_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_4_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_4_Z)
|
||||
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_4_X
|
||||
#define Z_PROBE_ALLEN_KEY_DEPLOY_4_X current_position[X_AXIS]
|
||||
#endif
|
||||
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_4_Y
|
||||
#define Z_PROBE_ALLEN_KEY_DEPLOY_4_Y current_position[Y_AXIS]
|
||||
#endif
|
||||
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_4_Z
|
||||
#define Z_PROBE_ALLEN_KEY_DEPLOY_4_Z current_position[Z_AXIS]
|
||||
#endif
|
||||
#ifdef Z_PROBE_ALLEN_KEY_DEPLOY_4
|
||||
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE
|
||||
#define Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE 0.0
|
||||
#endif
|
||||
const float deploy_4[] = { Z_PROBE_ALLEN_KEY_DEPLOY_4_X, Z_PROBE_ALLEN_KEY_DEPLOY_4_Y, Z_PROBE_ALLEN_KEY_DEPLOY_4_Z };
|
||||
constexpr float deploy_4[] = Z_PROBE_ALLEN_KEY_DEPLOY_4;
|
||||
do_blocking_move_to(deploy_4, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE));
|
||||
#endif
|
||||
#if defined(Z_PROBE_ALLEN_KEY_DEPLOY_5_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_5_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_5_Z)
|
||||
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_5_X
|
||||
#define Z_PROBE_ALLEN_KEY_DEPLOY_5_X current_position[X_AXIS]
|
||||
#endif
|
||||
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_5_Y
|
||||
#define Z_PROBE_ALLEN_KEY_DEPLOY_5_Y current_position[Y_AXIS]
|
||||
#endif
|
||||
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_5_Z
|
||||
#define Z_PROBE_ALLEN_KEY_DEPLOY_5_Z current_position[Z_AXIS]
|
||||
#endif
|
||||
#ifdef Z_PROBE_ALLEN_KEY_DEPLOY_5
|
||||
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE
|
||||
#define Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE 0.0
|
||||
#endif
|
||||
const float deploy_5[] = { Z_PROBE_ALLEN_KEY_DEPLOY_5_X, Z_PROBE_ALLEN_KEY_DEPLOY_5_Y, Z_PROBE_ALLEN_KEY_DEPLOY_5_Z };
|
||||
constexpr float deploy_5[] = Z_PROBE_ALLEN_KEY_DEPLOY_5;
|
||||
do_blocking_move_to(deploy_5, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE));
|
||||
#endif
|
||||
}
|
||||
|
||||
void run_stow_moves_script() {
|
||||
#if defined(Z_PROBE_ALLEN_KEY_STOW_1_X) || defined(Z_PROBE_ALLEN_KEY_STOW_1_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_1_Z)
|
||||
#ifndef Z_PROBE_ALLEN_KEY_STOW_1_X
|
||||
#define Z_PROBE_ALLEN_KEY_STOW_1_X current_position[X_AXIS]
|
||||
#endif
|
||||
#ifndef Z_PROBE_ALLEN_KEY_STOW_1_Y
|
||||
#define Z_PROBE_ALLEN_KEY_STOW_1_Y current_position[Y_AXIS]
|
||||
#endif
|
||||
#ifndef Z_PROBE_ALLEN_KEY_STOW_1_Z
|
||||
#define Z_PROBE_ALLEN_KEY_STOW_1_Z current_position[Z_AXIS]
|
||||
#endif
|
||||
#ifdef Z_PROBE_ALLEN_KEY_STOW_1
|
||||
#ifndef Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE
|
||||
#define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE 0.0
|
||||
#endif
|
||||
const float stow_1[] = { Z_PROBE_ALLEN_KEY_STOW_1_X, Z_PROBE_ALLEN_KEY_STOW_1_Y, Z_PROBE_ALLEN_KEY_STOW_1_Z };
|
||||
constexpr float stow_1[] = Z_PROBE_ALLEN_KEY_STOW_1;
|
||||
do_blocking_move_to(stow_1, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE));
|
||||
#endif
|
||||
#if defined(Z_PROBE_ALLEN_KEY_STOW_2_X) || defined(Z_PROBE_ALLEN_KEY_STOW_2_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_2_Z)
|
||||
#ifndef Z_PROBE_ALLEN_KEY_STOW_2_X
|
||||
#define Z_PROBE_ALLEN_KEY_STOW_2_X current_position[X_AXIS]
|
||||
#endif
|
||||
#ifndef Z_PROBE_ALLEN_KEY_STOW_2_Y
|
||||
#define Z_PROBE_ALLEN_KEY_STOW_2_Y current_position[Y_AXIS]
|
||||
#endif
|
||||
#ifndef Z_PROBE_ALLEN_KEY_STOW_2_Z
|
||||
#define Z_PROBE_ALLEN_KEY_STOW_2_Z current_position[Z_AXIS]
|
||||
#endif
|
||||
#ifdef Z_PROBE_ALLEN_KEY_STOW_2
|
||||
#ifndef Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE
|
||||
#define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE 0.0
|
||||
#endif
|
||||
const float stow_2[] = { Z_PROBE_ALLEN_KEY_STOW_2_X, Z_PROBE_ALLEN_KEY_STOW_2_Y, Z_PROBE_ALLEN_KEY_STOW_2_Z };
|
||||
constexpr float stow_2[] = Z_PROBE_ALLEN_KEY_STOW_2;
|
||||
do_blocking_move_to(stow_2, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE));
|
||||
#endif
|
||||
#if defined(Z_PROBE_ALLEN_KEY_STOW_3_X) || defined(Z_PROBE_ALLEN_KEY_STOW_3_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_3_Z)
|
||||
#ifndef Z_PROBE_ALLEN_KEY_STOW_3_X
|
||||
#define Z_PROBE_ALLEN_KEY_STOW_3_X current_position[X_AXIS]
|
||||
#endif
|
||||
#ifndef Z_PROBE_ALLEN_KEY_STOW_3_Y
|
||||
#define Z_PROBE_ALLEN_KEY_STOW_3_Y current_position[Y_AXIS]
|
||||
#endif
|
||||
#ifndef Z_PROBE_ALLEN_KEY_STOW_3_Z
|
||||
#define Z_PROBE_ALLEN_KEY_STOW_3_Z current_position[Z_AXIS]
|
||||
#endif
|
||||
#ifdef Z_PROBE_ALLEN_KEY_STOW_3
|
||||
#ifndef Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE
|
||||
#define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE 0.0
|
||||
#endif
|
||||
const float stow_3[] = { Z_PROBE_ALLEN_KEY_STOW_3_X, Z_PROBE_ALLEN_KEY_STOW_3_Y, Z_PROBE_ALLEN_KEY_STOW_3_Z };
|
||||
constexpr float stow_3[] = Z_PROBE_ALLEN_KEY_STOW_3;
|
||||
do_blocking_move_to(stow_3, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE));
|
||||
#endif
|
||||
#if defined(Z_PROBE_ALLEN_KEY_STOW_4_X) || defined(Z_PROBE_ALLEN_KEY_STOW_4_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_4_Z)
|
||||
#ifndef Z_PROBE_ALLEN_KEY_STOW_4_X
|
||||
#define Z_PROBE_ALLEN_KEY_STOW_4_X current_position[X_AXIS]
|
||||
#endif
|
||||
#ifndef Z_PROBE_ALLEN_KEY_STOW_4_Y
|
||||
#define Z_PROBE_ALLEN_KEY_STOW_4_Y current_position[Y_AXIS]
|
||||
#endif
|
||||
#ifndef Z_PROBE_ALLEN_KEY_STOW_4_Z
|
||||
#define Z_PROBE_ALLEN_KEY_STOW_4_Z current_position[Z_AXIS]
|
||||
#endif
|
||||
#ifdef Z_PROBE_ALLEN_KEY_STOW_4
|
||||
#ifndef Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE
|
||||
#define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE 0.0
|
||||
#endif
|
||||
const float stow_4[] = { Z_PROBE_ALLEN_KEY_STOW_4_X, Z_PROBE_ALLEN_KEY_STOW_4_Y, Z_PROBE_ALLEN_KEY_STOW_4_Z };
|
||||
constexpr float stow_4[] = Z_PROBE_ALLEN_KEY_STOW_4;
|
||||
do_blocking_move_to(stow_4, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE));
|
||||
#endif
|
||||
#if defined(Z_PROBE_ALLEN_KEY_STOW_5_X) || defined(Z_PROBE_ALLEN_KEY_STOW_5_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_5_Z)
|
||||
#ifndef Z_PROBE_ALLEN_KEY_STOW_5_X
|
||||
#define Z_PROBE_ALLEN_KEY_STOW_5_X current_position[X_AXIS]
|
||||
#endif
|
||||
#ifndef Z_PROBE_ALLEN_KEY_STOW_5_Y
|
||||
#define Z_PROBE_ALLEN_KEY_STOW_5_Y current_position[Y_AXIS]
|
||||
#endif
|
||||
#ifndef Z_PROBE_ALLEN_KEY_STOW_5_Z
|
||||
#define Z_PROBE_ALLEN_KEY_STOW_5_Z current_position[Z_AXIS]
|
||||
#endif
|
||||
#ifdef Z_PROBE_ALLEN_KEY_STOW_5
|
||||
#ifndef Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE
|
||||
#define Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE 0.0
|
||||
#endif
|
||||
const float stow_5[] = { Z_PROBE_ALLEN_KEY_STOW_5_X, Z_PROBE_ALLEN_KEY_STOW_5_Y, Z_PROBE_ALLEN_KEY_STOW_5_Z };
|
||||
constexpr float stow_5[] = Z_PROBE_ALLEN_KEY_STOW_5;
|
||||
do_blocking_move_to(stow_5, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE));
|
||||
#endif
|
||||
}
|
||||
@ -741,7 +651,7 @@ static float run_z_probe() {
|
||||
|
||||
#endif
|
||||
|
||||
const float measured_z = probes_total * (1.0f / (MULTIPLE_PROBING));
|
||||
const float measured_z = probes_total * RECIPROCAL(MULTIPLE_PROBING);
|
||||
|
||||
#elif TOTAL_PROBING == 2
|
||||
|
||||
|
@ -174,8 +174,8 @@ int32_t Stepper::delta_error[XYZE] = { 0 };
|
||||
uint32_t Stepper::advance_dividend[XYZE] = { 0 },
|
||||
Stepper::advance_divisor = 0,
|
||||
Stepper::step_events_completed = 0, // The number of step events executed in the current block
|
||||
Stepper::accelerate_until, // The point from where we need to stop acceleration
|
||||
Stepper::decelerate_after, // The point from where we need to start decelerating
|
||||
Stepper::accelerate_until, // The count at which to stop accelerating
|
||||
Stepper::decelerate_after, // The count at which to start decelerating
|
||||
Stepper::step_event_count; // The total event count for the current block
|
||||
|
||||
#if EXTRUDERS > 1 || ENABLED(MIXING_EXTRUDER)
|
||||
@ -2239,19 +2239,16 @@ void Stepper::endstop_triggered(const AxisEnum axis) {
|
||||
|
||||
const bool was_enabled = STEPPER_ISR_ENABLED();
|
||||
if (was_enabled) DISABLE_STEPPER_DRIVER_INTERRUPT();
|
||||
|
||||
#if IS_CORE
|
||||
|
||||
endstops_trigsteps[axis] = 0.5f * (
|
||||
axis == CORE_AXIS_2 ? CORESIGN(count_position[CORE_AXIS_1] - count_position[CORE_AXIS_2])
|
||||
: count_position[CORE_AXIS_1] + count_position[CORE_AXIS_2]
|
||||
);
|
||||
|
||||
#else // !COREXY && !COREXZ && !COREYZ
|
||||
|
||||
endstops_trigsteps[axis] = count_position[axis];
|
||||
|
||||
#endif // !COREXY && !COREXZ && !COREYZ
|
||||
endstops_trigsteps[axis] = (
|
||||
#if IS_CORE
|
||||
(axis == CORE_AXIS_2
|
||||
? CORESIGN(count_position[CORE_AXIS_1] - count_position[CORE_AXIS_2])
|
||||
: count_position[CORE_AXIS_1] + count_position[CORE_AXIS_2]
|
||||
) * 0.5f
|
||||
#else // !IS_CORE
|
||||
count_position[axis]
|
||||
#endif
|
||||
);
|
||||
|
||||
// Discard the rest of the move if there is a current block
|
||||
quick_stop();
|
||||
@ -2279,15 +2276,19 @@ int32_t Stepper::triggered_position(const AxisEnum axis) {
|
||||
|
||||
void Stepper::report_positions() {
|
||||
|
||||
// Protect the access to the position.
|
||||
const bool was_enabled = STEPPER_ISR_ENABLED();
|
||||
if (was_enabled) DISABLE_STEPPER_DRIVER_INTERRUPT();
|
||||
#ifdef __AVR__
|
||||
// Protect the access to the position.
|
||||
const bool was_enabled = STEPPER_ISR_ENABLED();
|
||||
if (was_enabled) DISABLE_STEPPER_DRIVER_INTERRUPT();
|
||||
#endif
|
||||
|
||||
const int32_t xpos = count_position[X_AXIS],
|
||||
ypos = count_position[Y_AXIS],
|
||||
zpos = count_position[Z_AXIS];
|
||||
|
||||
if (was_enabled) ENABLE_STEPPER_DRIVER_INTERRUPT();
|
||||
#ifdef __AVR__
|
||||
if (was_enabled) ENABLE_STEPPER_DRIVER_INTERRUPT();
|
||||
#endif
|
||||
|
||||
#if CORE_IS_XY || CORE_IS_XZ || ENABLED(DELTA) || IS_SCARA
|
||||
SERIAL_ECHOPGM(MSG_COUNT_A);
|
||||
|
@ -321,6 +321,9 @@ class Stepper {
|
||||
static uint32_t acc_step_rate; // needed for deceleration start point
|
||||
#endif
|
||||
|
||||
//
|
||||
// Exact steps at which an endstop was triggered
|
||||
//
|
||||
static volatile int32_t endstops_trigsteps[XYZ];
|
||||
|
||||
//
|
||||
|
@ -1320,13 +1320,14 @@ void Temperature::manage_heater() {
|
||||
|
||||
if (!WITHIN(t_index, 0, COUNT(user_thermistor) - 1)) return 25;
|
||||
|
||||
if (user_thermistor[t_index].pre_calc) {
|
||||
// pre-calculate some variables
|
||||
user_thermistor[t_index].pre_calc = false;
|
||||
user_thermistor[t_index].res_25_recip = 1.0f / user_thermistor[t_index].res_25;
|
||||
user_thermistor[t_index].res_25_log = logf(user_thermistor[t_index].res_25);
|
||||
user_thermistor[t_index].beta_recip = 1.0f / user_thermistor[t_index].beta;
|
||||
user_thermistor[t_index].sh_alpha = (1.0f / (THERMISTOR_RESISTANCE_NOMINAL_C - THERMISTOR_ABS_ZERO_C)) - (user_thermistor[t_index].beta_recip * user_thermistor[t_index].res_25_log) - (user_thermistor[t_index].sh_c_coeff * user_thermistor[t_index].res_25_log * user_thermistor[t_index].res_25_log * user_thermistor[t_index].res_25_log);
|
||||
user_thermistor_t &t = user_thermistor[t_index];
|
||||
if (t.pre_calc) { // pre-calculate some variables
|
||||
t.pre_calc = false;
|
||||
t.res_25_recip = 1.0f / t.res_25;
|
||||
t.res_25_log = logf(t.res_25);
|
||||
t.beta_recip = 1.0f / t.beta;
|
||||
t.sh_alpha = RECIPROCAL(THERMISTOR_RESISTANCE_NOMINAL_C - (THERMISTOR_ABS_ZERO_C))
|
||||
- (t.beta_recip * t.res_25_log) - (t.sh_c_coeff * cu(t.res_25_log));
|
||||
}
|
||||
|
||||
// maximum adc value .. take into account the over sampling
|
||||
@ -1334,13 +1335,13 @@ void Temperature::manage_heater() {
|
||||
adc_raw = constrain(raw, 1, adc_max - 1); // constrain to prevent divide-by-zero
|
||||
|
||||
const float adc_inverse = (adc_max - adc_raw) - 0.5f,
|
||||
resistance = user_thermistor[t_index].series_res * (adc_raw + 0.5f) / adc_inverse,
|
||||
resistance = t.series_res * (adc_raw + 0.5f) / adc_inverse,
|
||||
log_resistance = logf(resistance);
|
||||
|
||||
float value = user_thermistor[t_index].sh_alpha;
|
||||
value += log_resistance * user_thermistor[t_index].beta_recip;
|
||||
if (user_thermistor[t_index].sh_c_coeff != 0)
|
||||
value += user_thermistor[t_index].sh_c_coeff * log_resistance * log_resistance * log_resistance;
|
||||
float value = t.sh_alpha;
|
||||
value += log_resistance * t.beta_recip;
|
||||
if (t.sh_c_coeff != 0)
|
||||
value += t.sh_c_coeff * cu(log_resistance);
|
||||
value = 1.0f / value;
|
||||
|
||||
//#if (MOTHERBOARD == BOARD_RAMPS_14_EFB)
|
||||
|
@ -133,9 +133,11 @@
|
||||
|
||||
#endif // SWITCHING_NOZZLE
|
||||
|
||||
inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[fr_axis], active_extruder);
|
||||
inline void _line_to_current(const AxisEnum fr_axis, const float fscale=1.0f) {
|
||||
planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[fr_axis] * fscale, active_extruder);
|
||||
}
|
||||
inline void slow_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.5f); }
|
||||
inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis); }
|
||||
|
||||
#if ENABLED(MAGNETIC_PARKING_EXTRUDER)
|
||||
|
||||
@ -150,13 +152,11 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
|
||||
const float oldx = current_position[X_AXIS],
|
||||
grabpos = mpe_settings.parking_xpos[new_tool] + (new_tool ? mpe_settings.grab_distance : -mpe_settings.grab_distance),
|
||||
offsetcompensation =
|
||||
offsetcompensation = (0
|
||||
#if HAS_HOTEND_OFFSET
|
||||
hotend_offset[X_AXIS][active_extruder] * mpe_settings.compensation_factor
|
||||
#else
|
||||
0
|
||||
+ hotend_offset[X_AXIS][active_extruder] * mpe_settings.compensation_factor
|
||||
#endif
|
||||
;
|
||||
);
|
||||
|
||||
if (axis_unhomed_error(true, false, false)) return;
|
||||
|
||||
@ -337,7 +337,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
planner.synchronize();
|
||||
DEBUG_POS("(5) Unpark extruder", current_position);
|
||||
}
|
||||
planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[X_AXIS] * 0.5, active_extruder);
|
||||
slow_line_to_current(X_AXIS);
|
||||
|
||||
// STEP 6
|
||||
|
||||
@ -411,7 +411,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
|
||||
current_position[Y_AXIS] = SWITCHING_TOOLHEAD_Y_POS;
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Move Y SwitchPos", current_position);
|
||||
planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS] * 0.5f, active_extruder);
|
||||
slow_line_to_current(Y_AXIS);
|
||||
|
||||
// Wait for move to complete, then another 0.2s
|
||||
planner.synchronize();
|
||||
@ -446,7 +446,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
DEBUG_ECHOLNPGM("(4) Grab and lock new toolhead");
|
||||
DEBUG_POS("Move Y SwitchPos", current_position);
|
||||
}
|
||||
planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS] * 0.5, active_extruder);
|
||||
slow_line_to_current(Y_AXIS);
|
||||
|
||||
// Wait for move to finish, pause 0.2s, move servo, pause 0.5s
|
||||
planner.synchronize();
|
||||
@ -491,21 +491,21 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
SERIAL_ECHOLNPAIR("(1) Place old tool ", int(active_extruder));
|
||||
DEBUG_POS("Move Y SwitchPos + Security", current_position);
|
||||
}
|
||||
planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS], active_extruder);
|
||||
fast_line_to_current(Y_AXIS);
|
||||
|
||||
current_position[X_AXIS] = placexclear;
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
planner.synchronize();
|
||||
DEBUG_POS("Move X SwitchPos + Security", current_position);
|
||||
}
|
||||
planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[X_AXIS], active_extruder);
|
||||
fast_line_to_current(X_AXIS);
|
||||
|
||||
current_position[Y_AXIS] = SWITCHING_TOOLHEAD_Y_POS;
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
planner.synchronize();
|
||||
DEBUG_POS("Move Y SwitchPos", current_position);
|
||||
}
|
||||
planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS], active_extruder);
|
||||
fast_line_to_current(Y_AXIS);
|
||||
|
||||
current_position[X_AXIS] = placexpos;
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
@ -541,7 +541,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
|
||||
current_position[X_AXIS] = grabxpos;
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Move to new toolhead X", current_position);
|
||||
planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[X_AXIS], active_extruder);
|
||||
fast_line_to_current(X_AXIS);
|
||||
|
||||
// 4. Grab the new toolhead and move to security position
|
||||
|
||||
@ -559,7 +559,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
planner.synchronize();
|
||||
DEBUG_POS("Move Y SwitchPos", current_position);
|
||||
}
|
||||
planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS] * 0.2, active_extruder);
|
||||
_line_to_current(Y_AXIS, 0.2f);
|
||||
|
||||
#if ENABLED(PRIME_BEFORE_REMOVE) && (SWITCHING_TOOLHEAD_PRIME_MM || SWITCHING_TOOLHEAD_RETRACT_MM)
|
||||
#if SWITCHING_TOOLHEAD_PRIME_MM
|
||||
@ -577,13 +577,13 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
|
||||
current_position[X_AXIS] = grabxclear;
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Move to new toolhead X + Security", current_position);
|
||||
planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[X_AXIS] * 0.1, active_extruder);
|
||||
_line_to_current(X_AXIS, 0.1f);
|
||||
planner.synchronize();
|
||||
safe_delay(100); // Give switch time to settle
|
||||
|
||||
current_position[Y_AXIS] += SWITCHING_TOOLHEAD_Y_CLEAR;
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Move back Y clear", current_position);
|
||||
planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS], active_extruder); // move away from docked toolhead
|
||||
fast_line_to_current(Y_AXIS); // move away from docked toolhead
|
||||
planner.synchronize(); // Always sync last tool-change move
|
||||
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("MST Tool-Change done.", current_position);
|
||||
@ -620,7 +620,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
|
||||
current_position[Z_AXIS] += SWITCHING_TOOLHEAD_Z_HOP;
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("(1) Raise Z-Axis ", current_position);
|
||||
planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Z_AXIS], active_extruder);
|
||||
fast_line_to_current(Z_AXIS);
|
||||
|
||||
// 2. Move to position near active extruder parking
|
||||
|
||||
@ -629,9 +629,9 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
SERIAL_ECHOLNPAIR("(2) Move near active extruder parking", active_extruder);
|
||||
DEBUG_POS("Moving ParkPos", current_position);
|
||||
}
|
||||
current_position[X_AXIS] = placexpos + hotend_offset[X_AXIS][active_extruder];
|
||||
current_position[Y_AXIS] = SWITCHING_TOOLHEAD_Y_POS + SWITCHING_TOOLHEAD_Y_CLEAR + hotend_offset[Y_AXIS][active_extruder];
|
||||
planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[X_AXIS], active_extruder);
|
||||
current_position[X_AXIS] = hotend_offset[X_AXIS][active_extruder] + placexpos;
|
||||
current_position[Y_AXIS] = hotend_offset[Y_AXIS][active_extruder] + SWITCHING_TOOLHEAD_Y_POS + SWITCHING_TOOLHEAD_Y_CLEAR;
|
||||
fast_line_to_current(X_AXIS);
|
||||
|
||||
// 3. Move gently to park position of active extruder
|
||||
|
||||
@ -642,7 +642,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
}
|
||||
|
||||
current_position[Y_AXIS] -= SWITCHING_TOOLHEAD_Y_CLEAR;
|
||||
planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS] * 0.5, active_extruder);
|
||||
slow_line_to_current(Y_AXIS);
|
||||
|
||||
// 4. Disengage magnetic field, wait for delay
|
||||
|
||||
@ -658,10 +658,11 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
}
|
||||
|
||||
current_position[Y_AXIS] += SWITCHING_TOOLHEAD_Y_CLEAR;
|
||||
planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS] * 0.5f, active_extruder);
|
||||
current_position[X_AXIS] = grabxpos + hotend_offset[X_AXIS][active_extruder];
|
||||
current_position[Y_AXIS] = SWITCHING_TOOLHEAD_Y_POS + SWITCHING_TOOLHEAD_Y_CLEAR + hotend_offset[Y_AXIS][active_extruder];
|
||||
planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[X_AXIS], active_extruder);
|
||||
slow_line_to_current(Y_AXIS);
|
||||
|
||||
current_position[X_AXIS] = hotend_offset[X_AXIS][active_extruder] + grabxpos;
|
||||
current_position[Y_AXIS] = hotend_offset[Y_AXIS][active_extruder] + SWITCHING_TOOLHEAD_Y_POS + SWITCHING_TOOLHEAD_Y_CLEAR;
|
||||
fast_line_to_current(X_AXIS);
|
||||
|
||||
// 6. Move gently to park position of new extruder
|
||||
|
||||
@ -670,7 +671,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
planner.synchronize();
|
||||
DEBUG_ECHOLNPGM("(6) Move near new extruder");
|
||||
}
|
||||
planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS] * 0.5f, active_extruder);
|
||||
slow_line_to_current(Y_AXIS);
|
||||
|
||||
// 7. Engage magnetic field for new extruder parking
|
||||
|
||||
@ -682,7 +683,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
|
||||
current_position[Y_AXIS] += SWITCHING_TOOLHEAD_Y_CLEAR;
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("(8) Unpark extruder");
|
||||
planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[X_AXIS] * 0.5f, active_extruder);
|
||||
slow_line_to_current(X_AXIS);
|
||||
planner.synchronize(); // Always sync the final move
|
||||
|
||||
// 9. Apply Z hotend offset to current position
|
||||
|
Reference in New Issue
Block a user