Implemented new acceleration control behaviour for the new Marlin firmware flavor:
- show extra travel acceleration settings in 'Machine limits' page in Printer Settings when the new firmware flavor is selected - updated tooltips on the config values (they were basically wrong even in the current version) - 'Marlin (legacy)' firmware flavor behaviour should not change: it exports M204 Pa Rb Ta (where a, b are the values from machine limits) at the beginning of gcode and it uses M204 S... for feature type dependent acceleration settings (legacy variant of M204 P.. T..) - new Marlin Firmware exports M204 Pa Rb Tc (where a,b,c are the values from machine limits). Feature type dependent acceleration is set using M204 P..., not overriding the travel acceleration.
This commit is contained in:
parent
f0e9ad46ec
commit
8c89bf748b
7 changed files with 57 additions and 11 deletions
src/libslic3r
|
@ -1571,10 +1571,20 @@ void GCode::print_machine_envelope(FILE *file, Print &print)
|
|||
int(print.config().machine_max_feedrate_y.values.front() + 0.5),
|
||||
int(print.config().machine_max_feedrate_z.values.front() + 0.5),
|
||||
int(print.config().machine_max_feedrate_e.values.front() + 0.5));
|
||||
|
||||
// Now M204 - acceleration. This one is quite hairy thanks to how Marlin guys care about
|
||||
// backwards compatibility: https://github.com/prusa3d/PrusaSlicer/issues/1089
|
||||
// Legacy Marlin should export travel acceleration the same as printing acceleration.
|
||||
// MarlinFirmware has the two separated.
|
||||
int travel_acc = print.config().gcode_flavor == gcfMarlinLegacy
|
||||
? int(print.config().machine_max_acceleration_extruding.values.front() + 0.5)
|
||||
: int(print.config().machine_max_acceleration_travel.values.front() + 0.5);
|
||||
fprintf(file, "M204 P%d R%d T%d ; sets acceleration (P, T) and retract acceleration (R), mm/sec^2\n",
|
||||
int(print.config().machine_max_acceleration_extruding.values.front() + 0.5),
|
||||
int(print.config().machine_max_acceleration_retracting.values.front() + 0.5),
|
||||
int(print.config().machine_max_acceleration_extruding.values.front() + 0.5));
|
||||
travel_acc);
|
||||
|
||||
|
||||
fprintf(file, "M205 X%.2lf Y%.2lf Z%.2lf E%.2lf ; sets the jerk limits, mm/sec\n",
|
||||
print.config().machine_max_jerk_x.values.front(),
|
||||
print.config().machine_max_jerk_y.values.front(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue