From cdb10c97e0244587e530829b65e2ff0bb555fb0f Mon Sep 17 00:00:00 2001 From: supermerill Date: Mon, 11 May 2020 17:42:18 +0200 Subject: [PATCH] #232 Do not auto-generate G-code when using Klipper --- src/libslic3r/GCode.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index e74235666ac..9e191259a21 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -1293,7 +1293,8 @@ void GCode::_do_export(Print& print, FILE* file, ThumbnailsGeneratorCallback thu this->print_machine_envelope(file, print); // Disable fan. - if (! print.config().cooling.get_at(initial_extruder_id) || print.config().disable_fan_first_layers.get_at(initial_extruder_id)) + if ( (! print.config().cooling.get_at(initial_extruder_id) || print.config().disable_fan_first_layers.get_at(initial_extruder_id)) + && config().gcode_flavor != gcfKlipper) _write(file, m_writer.set_fan(0, true)); // Let the start-up script prime the 1st printing tool. @@ -1674,7 +1675,7 @@ void GCode::_print_first_layer_bed_temperature(FILE *file, Print &print, const s // Always call m_writer.set_bed_temperature() so it will set the internal "current" state of the bed temp as if // the custom start G-code emited these. std::string set_temp_gcode = m_writer.set_bed_temperature(temp, wait); - if (! temp_set_by_gcode) + if ( !temp_set_by_gcode && this->config().gcode_flavor != gcfKlipper) _write(file, set_temp_gcode); } @@ -1692,7 +1693,7 @@ void GCode::_print_first_layer_extruder_temperatures(FILE *file, Print &print, c if (temp_by_gcode >= 0 && temp_by_gcode < 1000) temp = temp_by_gcode; m_writer.set_temperature(temp, wait, first_printing_extruder_id); - } else { + } else if(this->config().gcode_flavor != gcfKlipper){ // Custom G-code does not set the extruder temperature. Do it now. if (print.config().single_extruder_multi_material.value) { // Set temperature of the first printing extruder only.