added end_program() function to GCodeWriter

This commit is contained in:
Alexander Rössler 2015-02-07 12:36:29 +01:00
parent d6feec808c
commit f2fa8cb63f
3 changed files with 11 additions and 0 deletions

View file

@ -511,6 +511,15 @@ GCodeWriter::get_position() const
return this->_pos;
}
std::string
GCodeWriter::end_program()
{
std::ostringstream gcode;
if (FLAVOR_IS(gcfMachinekit))
gcode << "M2 ; end of program\n";
return gcode.str();
}
#ifdef SLIC3RXS
REGISTER_CLASS(GCodeWriter, "GCode::Writer");
#endif