Custom G26 FR followup

This commit is contained in:
Scott Lahteine 2021-01-25 23:53:30 -06:00
parent 7f4c5b86db
commit ee93101b24

View File

@ -217,29 +217,26 @@ void move_to(const float &rx, const float &ry, const float &z, const float &e_de
const xy_pos_t dest = { rx, ry };
const bool has_xy_component = dest != current_position; // Check if X or Y is involved in the movement.
const bool has_xy_component = dest != current_position; // Check if X or Y is involved in the movement.
const bool has_e_component = e_delta != 0.0;
destination = current_position;
if (z != last_z) {
last_z = destination.z = z;
const feedRate_t feed_value = planner.settings.max_feedrate_mm_s[Z_AXIS] * 0.5f; // Use half of the Z_AXIS max feed rate
prepare_internal_move_to_destination(feed_value);
destination = current_position;
const feedRate_t fr_mm_s = planner.settings.max_feedrate_mm_s[Z_AXIS] * 0.5f; // Use half of the Z_AXIS max feed rate
prepare_internal_move_to_destination(fr_mm_s);
}
// If X or Y in combination with E is involved do a 'normal' move.
// If X or Y in combination with E is involved do a 'normal' move.
// If X or Y with no E is involved do a 'fast' move
// Otherwise retract/recover/hop.
destination = dest;
destination.e += e_delta;
const feedRate_t feed_value =
has_xy_component
? (has_e_component ? feedRate_t(G26_XY_FEEDRATE) : feedRate_t(G26_XY_FEEDRATE_TRAVEL))
const feedRate_t fr_mm_s = has_xy_component
? (has_e_component ? feedRate_t(G26_XY_FEEDRATE) : feedRate_t(G26_XY_FEEDRATE_TRAVEL))
: planner.settings.max_feedrate_mm_s[E_AXIS] * 0.666f;
prepare_internal_move_to_destination(feed_value);
destination = current_position;
prepare_internal_move_to_destination(fr_mm_s);
}
FORCE_INLINE void move_to(const xyz_pos_t &where, const float &de) { move_to(where.x, where.y, where.z, de); }