Remove hidden dependency from plan_arc() and plan_cubic_move() (#10690)

This commit is contained in:
ManuelMcLure 2018-05-10 22:34:33 -07:00 committed by Scott Lahteine
parent 0b8af93d1e
commit bbd584bc14

View File

@ -751,7 +751,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis);
#endif #endif
#if ENABLED(BEZIER_CURVE_SUPPORT) #if ENABLED(BEZIER_CURVE_SUPPORT)
void plan_cubic_move(const float (&offset)[4]); void plan_cubic_move(const float (&cart)[XYZE], const float (&offset)[4]);
#endif #endif
void tool_change(const uint8_t tmp_extruder, const float fr_mm_s=0.0, bool no_move=false); void tool_change(const uint8_t tmp_extruder, const float fr_mm_s=0.0, bool no_move=false);
@ -3520,7 +3520,7 @@ inline void gcode_G4() {
parser.linearval('Q') parser.linearval('Q')
}; };
plan_cubic_move(offset); plan_cubic_move(destination, offset);
} }
} }
@ -13693,23 +13693,16 @@ void prepare_move_to_destination() {
planner.buffer_line_kinematic(cart, fr_mm_s, active_extruder); planner.buffer_line_kinematic(cart, fr_mm_s, active_extruder);
#endif #endif
// As far as the parser is concerned, the position is now == target. In reality the COPY(current_position, cart);
// motion control system might still be processing the action and the real tool position
// in any intermediate location.
set_current_from_destination();
} // plan_arc } // plan_arc
#endif // ARC_SUPPORT #endif // ARC_SUPPORT
#if ENABLED(BEZIER_CURVE_SUPPORT) #if ENABLED(BEZIER_CURVE_SUPPORT)
void plan_cubic_move(const float (&offset)[4]) { void plan_cubic_move(const float (&cart)[XYZE], const float (&offset)[4]) {
cubic_b_spline(current_position, destination, offset, MMS_SCALED(feedrate_mm_s), active_extruder); cubic_b_spline(current_position, cart, offset, MMS_SCALED(feedrate_mm_s), active_extruder);
COPY(current_position, cart);
// As far as the parser is concerned, the position is now == destination. In reality the
// motion control system might still be processing the action and the real tool position
// in any intermediate location.
set_current_from_destination();
} }
#endif // BEZIER_CURVE_SUPPORT #endif // BEZIER_CURVE_SUPPORT