mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-11 14:33:04 +00:00
Add Repetier Gcode Flavor as option (#13126)
* Fixed PrintConfig.hpp order so Repetier outputs, updated ConfigWizard to use gcode_flavor value rather than static Add Repetier to enum values and labels Update to add Repetier base profile to the setup wizard Re-order gcode_flavors in PrintConfig.hpp and PrintConfig.cpp to match Revise ConfigWizard.cpp to use gcode_flavor rather than list order Add Repetier profiles and include in custom.json (profile disables m73 and stop emit machine limits which Repetier doesn't use) * Fix JSON formatting in Custom.json * Add support for pressure advance in Repetier flavor * Add Repetier flavor show motion ability tab is visible * Refactor jerk handling for Repetier flavor * Update resources/profiles/Custom/machine/MyRepetier 0.4 nozzle.json Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update resources/profiles/Custom/machine/fdm_repetier_common.json Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/libslic3r/PrintConfig.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * add back localisation flag for Klipper * tidy up indentation and braces * Space indentation for Repetier profiles changed to tab * Fix space indentation in Custom.json file for Repetier profiles --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Ian Bassi <ian.bassi@outlook.com> Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
@@ -267,6 +267,21 @@ std::string GCodeWriter::set_jerk_xy(double jerk)
|
||||
jerk = m_max_jerk_y;
|
||||
|
||||
gcode << "SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY=" << jerk;
|
||||
|
||||
} else if (FLAVOR_IS(gcfRepetier)) {
|
||||
// Repetier uses M207 for temporary Jerk and combines X/Y into a single 'X' parameter.
|
||||
double jerk_xy = jerk;
|
||||
|
||||
// Clamp against the X machine limit
|
||||
if (m_max_jerk_x > 0 && jerk_xy > m_max_jerk_x)
|
||||
jerk_xy = m_max_jerk_x;
|
||||
|
||||
// Clamp against the Y machine limit as well to be safe
|
||||
if (m_max_jerk_y > 0 && jerk_xy > m_max_jerk_y)
|
||||
jerk_xy = m_max_jerk_y;
|
||||
|
||||
// Output the lowest safe limit using ONLY the X parameter
|
||||
gcode << "M207 X" << jerk_xy;
|
||||
} else {
|
||||
double jerk_x = jerk;
|
||||
double jerk_y = jerk;
|
||||
@@ -278,7 +293,7 @@ std::string GCodeWriter::set_jerk_xy(double jerk)
|
||||
|
||||
gcode << "M205 X" << jerk_x << " Y" << jerk_y;
|
||||
}
|
||||
|
||||
//the is_bbl check should be in the else statement above so that it doesn't inadverently added Z & E to klipper
|
||||
if (m_is_bbl_printers)
|
||||
gcode << std::setprecision(2) << " Z" << m_max_jerk_z << " E" << m_max_jerk_e;
|
||||
|
||||
@@ -365,6 +380,10 @@ std::string GCodeWriter::set_pressure_advance(double pa) const
|
||||
gcode << "SET_PRESSURE_ADVANCE ADVANCE=" << std::setprecision(4) << pa << "; Override pressure advance value\n";
|
||||
else if(FLAVOR_IS(gcfRepRapFirmware))
|
||||
gcode << ("M572 D0 S") << std::setprecision(4) << pa << "; Override pressure advance value\n";
|
||||
else if (FLAVOR_IS(gcfRepetier))
|
||||
// Repetier M233: X is quadratic (K), Y is linear (L).
|
||||
// Applying the value to both parameters simultaneously.
|
||||
gcode << "M233 X" << std::setprecision(4) << pa << " Y" << std::setprecision(4) << pa << " ; Override pressure advance value\n";
|
||||
else
|
||||
gcode << "M900 K" <<std::setprecision(4)<< pa << "; Override pressure advance value\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user