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:
yogihybo
2026-05-10 23:27:09 +10:00
committed by GitHub
parent 86e74f3f48
commit c4c133475f
12 changed files with 370 additions and 14 deletions

View File

@@ -1253,9 +1253,19 @@ PageFirmware::PageFirmware(ConfigWizard *parent)
void PageFirmware::apply_custom_config(DynamicPrintConfig &config)
{
auto sel = gcode_picker->GetSelection();
if (sel >= 0 && (size_t)sel < gcode_opt.enum_labels.size()) {
auto *opt = new ConfigOptionEnum<GCodeFlavor>(static_cast<GCodeFlavor>(sel));
config.set_key_value("gcode_flavor", opt);
// Safety check: ensure selection index is within bounds
if (sel >= 0 && (size_t) sel < gcode_opt.enum_values.size()) {
std::string selected_flavor_str = gcode_opt.enum_values[sel];
// Ensure the default value exists to prevent null pointer crashes
if (gcode_opt.default_value) {
//Clone the fully initialized option (preserves the dictionary map)
ConfigOption* opt = gcode_opt.default_value->clone();
// Deserialize the string safely
opt->deserialize(selected_flavor_str);
// Save it to the printer configuration
config.set_key_value("gcode_flavor", opt);
}
}
}