|
@@ -5932,10 +5932,31 @@ Sigma_Exit:
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
- case 204: // M204 acclereration S normal moves T filmanent only moves
|
|
|
+ case 204:
|
|
|
+ // M204 acclereration settings.
|
|
|
+ // Supporting old format: M204 S[normal moves] T[filmanent only moves]
|
|
|
+ // and new format: M204 P[printing moves] R[filmanent only moves] T[travel moves] (as of now T is ignored)
|
|
|
{
|
|
|
- if(code_seen('S')) acceleration = code_value() ;
|
|
|
- if(code_seen('T')) retract_acceleration = code_value() ;
|
|
|
+ if(code_seen('S')) {
|
|
|
+ // Legacy acceleration format. This format is used by the legacy Marlin, MK2 or MK3 firmware,
|
|
|
+ // and it is also generated by Slic3r to control acceleration per extrusion type
|
|
|
+ // (there is a separate acceleration settings in Slicer for perimeter, first layer etc).
|
|
|
+ acceleration = code_value();
|
|
|
+ // Interpret the T value as retract acceleration in the old Marlin format.
|
|
|
+ if(code_seen('T'))
|
|
|
+ retract_acceleration = code_value();
|
|
|
+ } else {
|
|
|
+ // New acceleration format, compatible with the upstream Marlin.
|
|
|
+ if(code_seen('P'))
|
|
|
+ acceleration = code_value();
|
|
|
+ if(code_seen('R'))
|
|
|
+ retract_acceleration = code_value();
|
|
|
+ if(code_seen('T')) {
|
|
|
+ // Interpret the T value as the travel acceleration in the new Marlin format.
|
|
|
+ //FIXME Prusa3D firmware currently does not support travel acceleration value independent from the extruding acceleration value.
|
|
|
+ // travel_acceleration = code_value();
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
break;
|
|
|
case 205: //M205 advanced settings: minimum travel speed S=while printing T=travel only, B=minimum segment time X= maximum xy jerk, Z=maximum Z jerk
|