Browse Source

Keep FWRETRACT values in terms of millimeters when using M200 for volumetric E units

whosawhatsis 11 years ago
parent
commit
3f6d44d40b
1 changed files with 8 additions and 4 deletions
  1. 8
    4
      Marlin/Marlin_main.cpp

+ 8
- 4
Marlin/Marlin_main.cpp View File

@@ -137,7 +137,7 @@
137 137
 // M204 - Set default acceleration: S normal moves T filament only moves (M204 S3000 T7000) im mm/sec^2  also sets minimum segment time in ms (B20000) to prevent buffer underruns and M20 minimum feedrate
138 138
 // M205 -  advanced settings:  minimum travel speed S=while printing T=travel only,  B=minimum segment time X= maximum xy jerk, Z=maximum Z jerk, E=maximum E jerk
139 139
 // M206 - set additional homeing offset
140
-// M207 - set retract length S[positive mm] F[feedrate mm/sec] Z[additional zlift/hop]
140
+// M207 - set retract length S[positive mm] F[feedrate mm/sec] Z[additional zlift/hop], stays in mm regardless of M200 setting
141 141
 // M208 - set recover=unretract length S[positive mm surplus to the M207 S*] F[feedrate mm/sec]
142 142
 // M209 - S<1=true/0=false> enable automatic retract detect if the slicer did not support G10/11: every normal extrude-only move will be classified as retract depending on the direction.
143 143
 // M218 - set hotend offset (in mm): T<extruder_number> X<offset_on_X> Y<offset_on_Y>
@@ -1109,11 +1109,13 @@ void process_commands()
1109 1109
         destination[X_AXIS]=current_position[X_AXIS];
1110 1110
         destination[Y_AXIS]=current_position[Y_AXIS];
1111 1111
         destination[Z_AXIS]=current_position[Z_AXIS];
1112
-        current_position[Z_AXIS]+=-retract_zlift;
1113
-        destination[E_AXIS]=current_position[E_AXIS]-retract_length;
1112
+        current_position[Z_AXIS]-=retract_zlift;
1113
+        destination[E_AXIS]=current_position[E_AXIS]-retract_length/volumetric_multiplier[active_extruder];
1114
+        float oldFeedrate = feedrate;
1114 1115
         feedrate=retract_feedrate;
1115 1116
         retracted=true;
1116 1117
         prepare_move();
1118
+        feedrate = oldFeedrate;
1117 1119
       }
1118 1120
 
1119 1121
       break;
@@ -1124,10 +1126,12 @@ void process_commands()
1124 1126
         destination[Y_AXIS]=current_position[Y_AXIS];
1125 1127
         destination[Z_AXIS]=current_position[Z_AXIS];
1126 1128
         current_position[Z_AXIS]+=retract_zlift;
1127
-        destination[E_AXIS]=current_position[E_AXIS]+retract_length+retract_recover_length; 
1129
+        destination[E_AXIS]=current_position[E_AXIS]+(retract_length+retract_recover_length)/volumetric_multiplier[active_extruder]; 
1130
+        float oldFeedrate = feedrate;
1128 1131
         feedrate=retract_recover_feedrate;
1129 1132
         retracted=false;
1130 1133
         prepare_move();
1134
+        feedrate = oldFeedrate;
1131 1135
       }
1132 1136
       break;
1133 1137
       #endif //FWRETRACT

Loading…
Cancel
Save