Cooling buffer works in cppgui

This commit is contained in:
Joseph Lenox 2018-08-05 22:27:36 -05:00
parent 1f6440f7bb
commit 5baee8a1cb
2 changed files with 5 additions and 0 deletions

View File

@ -45,6 +45,9 @@ SCENARIO( "PrintGCode basic functionality") {
REQUIRE(exported.find("; support material extrusion width") == std::string::npos);
REQUIRE(exported.find("; first layer extrusion width") == std::string::npos);
}
THEN("Exported text does not contain cooling markers (they were consumed)") {
REQUIRE(exported.find(";_EXTRUDE_SET_SPEED") == std::string::npos);
}
THEN("GCode preamble is emitted.") {
REQUIRE(exported.find("G21 ; set units to millimeters") != std::string::npos);

View File

@ -659,6 +659,8 @@ PrintGCode::process_layer(size_t idx, const Layer* layer, const Points& copies)
copy_idx++;
}
// write the resulting gcode
gcode = this->_cooling_buffer.append(gcode, std::to_string(reinterpret_cast<long long unsigned int>(layer->object())) + std::string(typeid(layer).name()),
layer->id(), layer->print_z);
fh << this->filter(gcode);
}