Use correct M204 command for acceleration

M204 S is not supported for RepRapFrimware (https://duet3d.dozuki.com/Wiki/Gcode#Section_M204_Set_printing_and_travel_accelerations).
This commit is contained in:
Raphael Sobik 2021-01-11 10:50:18 +01:00 committed by GitHub
parent b7bfaea1ba
commit 2db704917a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -204,6 +204,9 @@ std::string GCodeWriter::set_acceleration(unsigned int acceleration)
gcode << "\n";
// M202: Set max travel acceleration
gcode << "M202 X" << acceleration << " Y" << acceleration;
} else if (FLAVOR_IS(gcfRepRapFirmware)) {
// M204: Set default acceleration
gcode << "M204 P" << acceleration;
} else {
// M204: Set default acceleration
gcode << "M204 S" << acceleration;