mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-04 12:34:05 -06:00
Option for klipper only: Adjustment of "accel_to_decel" (#220)
* Klipper option: Adjustment of "accel_to_decel" Add option to automatically adjust accel_to_decel to 50% of chosen acceleration. * allow variable accel_to_decel percentage allow variable accel_to_decel percentage for klipper firmware
This commit is contained in:
parent
cdd9c51949
commit
bf782028ac
7 changed files with 42 additions and 9 deletions
|
@ -174,10 +174,15 @@ std::string GCodeWriter::set_acceleration(unsigned int acceleration)
|
|||
// This is new MarlinFirmware with separated print/retraction/travel acceleration.
|
||||
// Use M204 P, we don't want to override travel acc by M204 S (which is deprecated anyway).
|
||||
gcode << "M204 P" << acceleration;
|
||||
} else {
|
||||
// M204: Set default acceleration
|
||||
} else if (FLAVOR_IS(gcfKlipper) && this->config.accel_to_decel_enable) {
|
||||
gcode << "SET_VELOCITY_LIMIT ACCEL_TO_DECEL=" << acceleration * this->config.accel_to_decel_factor / 100;
|
||||
if (GCodeWriter::full_gcode_comment)
|
||||
gcode << " ; adjust max_accel_to_decel to chosen % of new accel value\n";
|
||||
gcode << "M204 S" << acceleration;
|
||||
}
|
||||
// Set max accel to decel to half of acceleration
|
||||
} else
|
||||
gcode << "M204 S" << acceleration;
|
||||
|
||||
//BBS
|
||||
if (GCodeWriter::full_gcode_comment) gcode << " ; adjust acceleration";
|
||||
gcode << "\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue