Browse Source

Use sync_plan_position_e function elsewhere

pull/1/head
Scott Lahteine 9 years ago
parent
commit
1caa2628da
  1. 8
      Marlin/Marlin_main.cpp

8
Marlin/Marlin_main.cpp

@ -2321,7 +2321,7 @@ static void homeaxis(AxisEnum axis) {
feedrate = retract_feedrate * 60; feedrate = retract_feedrate * 60;
current_position[E_AXIS] += (swapping ? retract_length_swap : retract_length) / volumetric_multiplier[active_extruder]; current_position[E_AXIS] += (swapping ? retract_length_swap : retract_length) / volumetric_multiplier[active_extruder];
plan_set_e_position(current_position[E_AXIS]); sync_plan_position_e();
prepare_move(); prepare_move();
if (retract_zlift > 0.01) { if (retract_zlift > 0.01) {
@ -2349,7 +2349,7 @@ static void homeaxis(AxisEnum axis) {
feedrate = retract_recover_feedrate * 60; feedrate = retract_recover_feedrate * 60;
float move_e = swapping ? retract_length_swap + retract_recover_length_swap : retract_length + retract_recover_length; float move_e = swapping ? retract_length_swap + retract_recover_length_swap : retract_length + retract_recover_length;
current_position[E_AXIS] -= move_e / volumetric_multiplier[active_extruder]; current_position[E_AXIS] -= move_e / volumetric_multiplier[active_extruder];
plan_set_e_position(current_position[E_AXIS]); sync_plan_position_e();
prepare_move(); prepare_move();
} }
@ -2440,7 +2440,7 @@ inline void gcode_G0_G1() {
// Is this move an attempt to retract or recover? // Is this move an attempt to retract or recover?
if ((echange < -MIN_RETRACT && !retracted[active_extruder]) || (echange > MIN_RETRACT && retracted[active_extruder])) { if ((echange < -MIN_RETRACT && !retracted[active_extruder]) || (echange > MIN_RETRACT && retracted[active_extruder])) {
current_position[E_AXIS] = destination[E_AXIS]; // hide the slicer-generated retract/recover from calculations current_position[E_AXIS] = destination[E_AXIS]; // hide the slicer-generated retract/recover from calculations
plan_set_e_position(current_position[E_AXIS]); // AND from the planner sync_plan_position_e(); // AND from the planner
retract(!retracted[active_extruder]); retract(!retracted[active_extruder]);
return; return;
} }
@ -6108,7 +6108,7 @@ inline void gcode_M503() {
#endif #endif
current_position[E_AXIS] = destination[E_AXIS]; //the long retract of L is compensated by manual filament feeding current_position[E_AXIS] = destination[E_AXIS]; //the long retract of L is compensated by manual filament feeding
plan_set_e_position(current_position[E_AXIS]); sync_plan_position_e();
RUNPLAN; //should do nothing RUNPLAN; //should do nothing

Loading…
Cancel
Save