Ignore Jerk values Warning if using JD (#13575)

* Ignore Jerk values if using JD

* add flavor check
This commit is contained in:
Ian Bassi
2026-05-19 09:42:44 -03:00
committed by GitHub
parent 46e47cec0a
commit ff68a2859d

View File

@@ -1754,7 +1754,11 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
}; };
std::string warning_key; std::string warning_key;
const auto max_junction_deviation = m_config.machine_max_junction_deviation.values[0];
const bool ignore_jerk_validation = m_config.gcode_flavor == gcfMarlinFirmware && max_junction_deviation > 0;
// check jerk // check jerk
if (!ignore_jerk_validation) {
if (m_default_object_config.default_jerk == 1 || m_default_object_config.outer_wall_jerk == 1 || if (m_default_object_config.default_jerk == 1 || m_default_object_config.outer_wall_jerk == 1 ||
m_default_object_config.inner_wall_jerk == 1) { m_default_object_config.inner_wall_jerk == 1) {
warning->string = L("Setting the jerk speed too low could lead to artifacts on curved surfaces"); warning->string = L("Setting the jerk speed too low could lead to artifacts on curved surfaces");
@@ -1773,27 +1777,24 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
"top_surface_jerk", "initial_layer_jerk", "travel_jerk"}; "top_surface_jerk", "initial_layer_jerk", "travel_jerk"};
const auto max_jerk = std::min(m_config.machine_max_jerk_x.values[0], m_config.machine_max_jerk_y.values[0]); const auto max_jerk = std::min(m_config.machine_max_jerk_x.values[0], m_config.machine_max_jerk_y.values[0]);
warning_key.clear(); warning_key.clear();
if (m_default_object_config.default_jerk > 0)
warning_key = check_motion_ability_object_setting(jerk_to_check, max_jerk); warning_key = check_motion_ability_object_setting(jerk_to_check, max_jerk);
if (!warning_key.empty()) { if (!warning_key.empty()) {
warning->string = L( warning->string = L(
"The jerk setting exceeds the printer's maximum jerk (machine_max_jerk_x/machine_max_jerk_y).\nOrca will " "The jerk setting exceeds the printer's maximum jerk (machine_max_jerk_x/machine_max_jerk_y).\n"
"automatically cap the jerk speed to ensure it doesn't surpass the printer's capabilities.\nYou can adjust the " "Orca will automatically cap the jerk speed to ensure it doesn't surpass the printer's capabilities.\n"
"maximum jerk setting in your printer's configuration to get higher speeds."); "You can adjust the maximum jerk setting in your printer's configuration to get higher speeds.");
warning->opt_key = warning_key; warning->opt_key = warning_key;
} }
} }
}
// Check junction deviation // Check junction deviation
const auto max_junction_deviation = m_config.machine_max_junction_deviation.values[0];
// Orca: Only marlin FW supports max junction deviation. Dont display warning if firmware is not supporting it. // Orca: Only marlin FW supports max junction deviation. Dont display warning if firmware is not supporting it.
const bool support_max_junction_deviation = ( m_config.gcode_flavor == gcfMarlinFirmware); const bool support_max_junction_deviation = ( m_config.gcode_flavor == gcfMarlinFirmware);
if (warning_key.empty() && m_default_object_config.default_junction_deviation.value > max_junction_deviation && support_max_junction_deviation) { if (warning_key.empty() && m_default_object_config.default_junction_deviation.value > max_junction_deviation && support_max_junction_deviation) {
warning->string = L( "Junction deviation setting exceeds the printer's maximum value " warning->string = L( "Junction deviation setting exceeds the printer's maximum value (machine_max_junction_deviation).\n"
"(machine_max_junction_deviation).\nOrca will " "Orca will automatically cap the junction deviation to ensure it doesn't surpass the printer's capabilities.\n"
"automatically cap the junction deviation to ensure it doesn't surpass the printer's " "You can adjust the machine_max_junction_deviation value in your printer's configuration to get higher limits.");
"capabilities.\nYou can adjust the "
"machine_max_junction_deviation value in your printer's configuration to get higher limits.");
warning->opt_key = warning_key; warning->opt_key = warning_key;
} }