Debug of G2-G3 for UBL (#12386)
Changes only affect UBL. Everything else is left alone.
This commit is contained in:
parent
9ad3aed0ef
commit
cda5ef08fa
|
@ -227,11 +227,11 @@ void move_to(const float &rx, const float &ry, const float &z, const float &e_de
|
|||
|
||||
if (z != last_z) {
|
||||
last_z = z;
|
||||
feed_value = planner.settings.max_feedrate_mm_s[Z_AXIS]/(3.0); // Base the feed rate off of the configured Z_AXIS feed rate
|
||||
feed_value = planner.settings.max_feedrate_mm_s[Z_AXIS]/(2.0); // Base the feed rate off of the configured Z_AXIS feed rate
|
||||
|
||||
destination[X_AXIS] = current_position[X_AXIS];
|
||||
destination[Y_AXIS] = current_position[Y_AXIS];
|
||||
destination[Z_AXIS] = z; // We know the last_z==z or we wouldn't be in this block of code.
|
||||
destination[Z_AXIS] = z; // We know the last_z!=z or we wouldn't be in this block of code.
|
||||
destination[E_AXIS] = current_position[E_AXIS];
|
||||
|
||||
G26_line_to_destination(feed_value);
|
||||
|
@ -240,7 +240,7 @@ void move_to(const float &rx, const float &ry, const float &z, const float &e_de
|
|||
|
||||
// Check if X or Y is involved in the movement.
|
||||
// Yes: a 'normal' movement. No: a retract() or recover()
|
||||
feed_value = has_xy_component ? PLANNER_XY_FEEDRATE() / 10.0 : planner.settings.max_feedrate_mm_s[E_AXIS] / 1.5;
|
||||
feed_value = has_xy_component ? PLANNER_XY_FEEDRATE() / 3.0 : planner.settings.max_feedrate_mm_s[E_AXIS] / 1.5;
|
||||
|
||||
if (g26_debug_flag) SERIAL_ECHOLNPAIR("in move_to() feed_value for XY:", feed_value);
|
||||
|
||||
|
@ -819,6 +819,19 @@ void GcodeSuite::G26() {
|
|||
recover_filament(destination);
|
||||
const float save_feedrate = feedrate_mm_s;
|
||||
feedrate_mm_s = PLANNER_XY_FEEDRATE() / 10.0;
|
||||
|
||||
if (g26_debug_flag) {
|
||||
SERIAL_ECHOPAIR(" plan_arc(ex=", endpoint[X_AXIS]);
|
||||
SERIAL_ECHOPAIR(", ey=", endpoint[Y_AXIS]);
|
||||
SERIAL_ECHOPAIR(", ez=", endpoint[Z_AXIS]);
|
||||
SERIAL_ECHOPAIR(", len=", arc_offset);
|
||||
SERIAL_ECHOPAIR(") -> (ex=", current_position[X_AXIS]);
|
||||
SERIAL_ECHOPAIR(", ey=", current_position[Y_AXIS]);
|
||||
SERIAL_ECHOPAIR(", ez=", current_position[Z_AXIS]);
|
||||
SERIAL_CHAR(')');
|
||||
SERIAL_EOL();
|
||||
}
|
||||
|
||||
plan_arc(endpoint, arc_offset, false); // Draw a counter-clockwise arc
|
||||
feedrate_mm_s = save_feedrate;
|
||||
set_destination_from_current();
|
||||
|
|
|
@ -70,6 +70,9 @@ void plan_arc(
|
|||
float r_P = -offset[0], r_Q = -offset[1];
|
||||
|
||||
const float radius = HYPOT(r_P, r_Q),
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
start_L = current_position[l_axis],
|
||||
#endif
|
||||
center_P = current_position[p_axis] - r_P,
|
||||
center_Q = current_position[q_axis] - r_Q,
|
||||
rt_X = cart[p_axis] - center_P,
|
||||
|
@ -179,7 +182,11 @@ void plan_arc(
|
|||
// Update raw location
|
||||
raw[p_axis] = center_P + r_P;
|
||||
raw[q_axis] = center_Q + r_Q;
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
raw[l_axis] = start_L;
|
||||
#else
|
||||
raw[l_axis] += linear_per_segment;
|
||||
#endif
|
||||
raw[E_AXIS] += extruder_per_segment;
|
||||
|
||||
clamp_to_software_endstops(raw);
|
||||
|
@ -198,6 +205,9 @@ void plan_arc(
|
|||
|
||||
// Ensure last segment arrives at target location.
|
||||
COPY(raw, cart);
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
raw[l_axis] = start_L;
|
||||
#endif
|
||||
|
||||
#if HAS_LEVELING && !PLANNER_LEVELING
|
||||
planner.apply_leveling(raw);
|
||||
|
@ -209,6 +219,9 @@ void plan_arc(
|
|||
#endif
|
||||
);
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
raw[l_axis] = start_L;
|
||||
#endif
|
||||
COPY(current_position, raw);
|
||||
} // plan_arc
|
||||
|
||||
|
|
Loading…
Reference in a new issue