Drop SCARA_FEEDRATE_SCALING
The updated planner takes the length of the move, so this pre-calculation is no longer needed.
This commit is contained in:
		@@ -141,14 +141,6 @@ void plan_arc(
 | 
			
		||||
    int8_t arc_recalc_count = N_ARC_CORRECTION;
 | 
			
		||||
  #endif
 | 
			
		||||
 | 
			
		||||
  #if ENABLED(SCARA_FEEDRATE_SCALING)
 | 
			
		||||
    // SCARA needs to scale the feed rate from mm/s to degrees/s
 | 
			
		||||
    const float inv_segment_length = 1.0 / (MM_PER_ARC_SEGMENT),
 | 
			
		||||
                inverse_secs = inv_segment_length * fr_mm_s;
 | 
			
		||||
    float oldA = stepper.get_axis_position_degrees(A_AXIS),
 | 
			
		||||
          oldB = stepper.get_axis_position_degrees(B_AXIS);
 | 
			
		||||
  #endif
 | 
			
		||||
 | 
			
		||||
  for (uint16_t i = 1; i < segments; i++) { // Iterate (segments-1) times
 | 
			
		||||
 | 
			
		||||
    thermalManager.manage_heater();
 | 
			
		||||
@@ -188,26 +180,11 @@ void plan_arc(
 | 
			
		||||
 | 
			
		||||
    clamp_to_software_endstops(raw);
 | 
			
		||||
 | 
			
		||||
    #if ENABLED(SCARA_FEEDRATE_SCALING)
 | 
			
		||||
      // For SCARA scale the feed rate from mm/s to degrees/s.
 | 
			
		||||
      // i.e., Complete the angular vector in the given time.
 | 
			
		||||
      inverse_kinematics(raw);
 | 
			
		||||
      ADJUST_DELTA(raw);
 | 
			
		||||
      planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], raw[Z_AXIS], raw[E_AXIS], HYPOT(delta[A_AXIS] - oldA, delta[B_AXIS] - oldB) * inverse_secs, active_extruder);
 | 
			
		||||
      oldA = delta[A_AXIS]; oldB = delta[B_AXIS];
 | 
			
		||||
    #else
 | 
			
		||||
      planner.buffer_line_kinematic(raw, fr_mm_s, active_extruder);
 | 
			
		||||
    #endif
 | 
			
		||||
    planner.buffer_line_kinematic(raw, fr_mm_s, active_extruder);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // Ensure last segment arrives at target location.
 | 
			
		||||
  #if ENABLED(SCARA_FEEDRATE_SCALING)
 | 
			
		||||
    inverse_kinematics(cart);
 | 
			
		||||
    ADJUST_DELTA(cart);
 | 
			
		||||
    planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], cart[Z_AXIS], cart[E_AXIS], HYPOT(delta[A_AXIS] - oldA, delta[B_AXIS] - oldB) * inverse_secs, active_extruder);
 | 
			
		||||
  #else
 | 
			
		||||
    planner.buffer_line_kinematic(cart, fr_mm_s, active_extruder);
 | 
			
		||||
  #endif
 | 
			
		||||
  planner.buffer_line_kinematic(cart, fr_mm_s, active_extruder);
 | 
			
		||||
 | 
			
		||||
  // As far as the parser is concerned, the position is now == target. In reality the
 | 
			
		||||
  // motion control system might still be processing the action and the real tool position
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user