make initial layer travel move acceleration and jerk configurable (#11674)

* make initial layer travel move acceleration and jerk configurable

* Update spelling to match UI pattern

* Update min integer and re-order to match patterns

---------

Co-authored-by: Thomas Scheiblauer <tom@sharkbay.at>
Co-authored-by: Ioannis Giannakas <59056762+igiannakas@users.noreply.github.com>
This commit is contained in:
Richard Copra
2026-04-22 03:55:24 +02:00
committed by GitHub
parent 6328f5abe9
commit 478f2fe546
9 changed files with 68 additions and 6 deletions

View File

@@ -7084,12 +7084,14 @@ std::string GCode::travel_to(const Point& point, ExtrusionRole role, std::string
unsigned int acceleration_to_set = 0;
if (this->on_first_layer()) {
if (m_config.default_acceleration.value > 0 && m_config.initial_layer_acceleration.value > 0) {
acceleration_to_set = (unsigned int) floor(m_config.initial_layer_acceleration.value + 0.5);
unsigned int initial_layer_travel_acceleration = m_config.get_abs_value("initial_layer_travel_acceleration");
double initial_layer_travel_jerk = m_config.get_abs_value("initial_layer_travel_jerk");
if (m_config.default_acceleration.value > 0 && initial_layer_travel_acceleration > 0) {
acceleration_to_set = (unsigned int) floor(initial_layer_travel_acceleration + 0.5);
}
if (m_config.default_jerk.value > 0 && m_config.initial_layer_jerk.value > 0) {
jerk_to_set = m_config.initial_layer_jerk.value;
if (m_config.default_jerk.value > 0 && initial_layer_travel_jerk > 0) {
jerk_to_set = initial_layer_travel_jerk;
}
} else { // ORCA: Handle short-travel acceleration and jerk for outer perimeters (if applicable)
const bool is_short_travel = travel.length() < scale_(EXTRUDER_CONFIG(retraction_minimum_travel));