#645 fix temperature for reprap & first layer temp for multiextruders

This commit is contained in:
supermerill 2020-11-10 13:59:24 +01:00
parent 77f9280646
commit 78f193787f
2 changed files with 5 additions and 10 deletions

View File

@ -222,11 +222,10 @@ void AvoidCrossingPerimeters::init_external_mp(const Print &print)
std::string();
}
int
OozePrevention::_get_temp(GCode& gcodegen)
int OozePrevention::_get_temp(GCode& gcodegen)
{
if (gcodegen.writer().tool_is_extruder())
return (gcodegen.layer() != NULL && gcodegen.layer()->id() == 0)
return (gcodegen.layer() == NULL || gcodegen.layer()->id() == 0)
? gcodegen.config().first_layer_temperature.get_at(gcodegen.writer().tool()->id())
: gcodegen.config().temperature.get_at(gcodegen.writer().tool()->id());
else

View File

@ -166,13 +166,9 @@ std::string GCodeWriter::set_temperature(const unsigned int temperature, bool wa
}
gcode << temp_w_offset;
bool multiple_tools = this->multiple_extruders && ! m_single_extruder_multi_material;
if (tool != -1 && (multiple_tools || FLAVOR_IS(gcfMakerWare) || FLAVOR_IS(gcfSailfish)) ) {
if (FLAVOR_IS(gcfRepRap)) {
gcode << " P" << tool;
} else {
if (tool != -1 && (multiple_tools || FLAVOR_IS(gcfMakerWare) || FLAVOR_IS(gcfSailfish)) && FLAVOR_IS_NOT(gcfRepRap)) {
gcode << " T" << tool;
}
}
gcode << " ; " << comment << "\n";
if ((FLAVOR_IS(gcfTeacup) || FLAVOR_IS(gcfRepRap)) && wait)