mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 04:04:26 +08:00
[BUGFIX] Fix emitting Klipper SET_VELOCITY_LIMIT commands (#1598)
[BUGFIX] Fix Klipper SET_VELOCITY_LIMIT code - Always write out SET_VELOCITY_LIMTIT ACCEL=<acceleration> independently of the accel_to_decel setting - Append the ACCEL_TO_DECEL fragment if enabled in config
This commit is contained in:
parent
7f6f01c4c9
commit
b5d5b972fc
@ -176,11 +176,13 @@ 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 if (FLAVOR_IS(gcfKlipper) && this->config.accel_to_decel_enable) {
|
||||
gcode << "SET_VELOCITY_LIMIT ACCEL=" << acceleration
|
||||
<< " ACCEL_TO_DECEL=" << acceleration * this->config.accel_to_decel_factor / 100;
|
||||
} else if (FLAVOR_IS(gcfKlipper)) {
|
||||
gcode << "SET_VELOCITY_LIMIT ACCEL=" << acceleration;
|
||||
if (this->config.accel_to_decel_enable) {
|
||||
gcode << " ACCEL_TO_DECEL=" << acceleration * this->config.accel_to_decel_factor / 100;
|
||||
if (GCodeWriter::full_gcode_comment)
|
||||
gcode << " ; adjust ACCEL_TO_DECEL";
|
||||
}
|
||||
} else
|
||||
gcode << "M204 S" << acceleration;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user