Skip to content

Commit

Permalink
prusa3d#232 Do not auto-generate G-code when using Klipper
Browse files Browse the repository at this point in the history
  • Loading branch information
supermerill authored and n8bot committed Jul 21, 2020
1 parent 6fe1d44 commit 0e532ee
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/libslic3r/GCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1294,7 +1294,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.
Expand Down Expand Up @@ -1675,7 +1676,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);
}

Expand All @@ -1693,7 +1694,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.
Expand Down

0 comments on commit 0e532ee

Please sign in to comment.