Change end_program() to postamble()
This commit is contained in:
parent
1180a6d83f
commit
ba6ae12635
4 changed files with 12 additions and 12 deletions
|
@ -249,7 +249,7 @@ sub export {
|
||||||
print $fh $gcodegen->writer->set_fan(0);
|
print $fh $gcodegen->writer->set_fan(0);
|
||||||
printf $fh "%s\n", $gcodegen->placeholder_parser->process($self->config->end_gcode);
|
printf $fh "%s\n", $gcodegen->placeholder_parser->process($self->config->end_gcode);
|
||||||
print $fh $gcodegen->writer->update_progress($gcodegen->layer_count, $gcodegen->layer_count, 1); # 100%
|
print $fh $gcodegen->writer->update_progress($gcodegen->layer_count, $gcodegen->layer_count, 1); # 100%
|
||||||
print $fh $gcodegen->writer->end_program();
|
print $fh $gcodegen->writer->postamble;
|
||||||
|
|
||||||
$self->print->total_used_filament(0);
|
$self->print->total_used_filament(0);
|
||||||
$self->print->total_extruded_volume(0);
|
$self->print->total_extruded_volume(0);
|
||||||
|
|
|
@ -66,6 +66,15 @@ GCodeWriter::preamble()
|
||||||
return gcode.str();
|
return gcode.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string
|
||||||
|
GCodeWriter::postamble()
|
||||||
|
{
|
||||||
|
std::ostringstream gcode;
|
||||||
|
if (FLAVOR_IS(gcfMachinekit))
|
||||||
|
gcode << "M2 ; end of program\n";
|
||||||
|
return gcode.str();
|
||||||
|
}
|
||||||
|
|
||||||
std::string
|
std::string
|
||||||
GCodeWriter::set_temperature(unsigned int temperature, bool wait, int tool)
|
GCodeWriter::set_temperature(unsigned int temperature, bool wait, int tool)
|
||||||
{
|
{
|
||||||
|
@ -511,15 +520,6 @@ GCodeWriter::get_position() const
|
||||||
return this->_pos;
|
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
|
#ifdef SLIC3RXS
|
||||||
REGISTER_CLASS(GCodeWriter, "GCode::Writer");
|
REGISTER_CLASS(GCodeWriter, "GCode::Writer");
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,6 +24,7 @@ class GCodeWriter {
|
||||||
void apply_print_config(const PrintConfig &print_config);
|
void apply_print_config(const PrintConfig &print_config);
|
||||||
void set_extruders(const std::vector<unsigned int> &extruder_ids);
|
void set_extruders(const std::vector<unsigned int> &extruder_ids);
|
||||||
std::string preamble();
|
std::string preamble();
|
||||||
|
std::string postamble();
|
||||||
std::string set_temperature(unsigned int temperature, bool wait = false, int tool = -1);
|
std::string set_temperature(unsigned int temperature, bool wait = false, int tool = -1);
|
||||||
std::string set_bed_temperature(unsigned int temperature, bool wait = false);
|
std::string set_bed_temperature(unsigned int temperature, bool wait = false);
|
||||||
std::string set_fan(unsigned int speed, bool dont_save = false);
|
std::string set_fan(unsigned int speed, bool dont_save = false);
|
||||||
|
@ -46,7 +47,6 @@ class GCodeWriter {
|
||||||
std::string lift();
|
std::string lift();
|
||||||
std::string unlift();
|
std::string unlift();
|
||||||
Pointf3 get_position() const;
|
Pointf3 get_position() const;
|
||||||
std::string end_program();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string _extrusion_axis;
|
std::string _extrusion_axis;
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
%code{% THIS->apply_print_config(*print_config); %};
|
%code{% THIS->apply_print_config(*print_config); %};
|
||||||
void set_extruders(std::vector<unsigned int> extruder_ids);
|
void set_extruders(std::vector<unsigned int> extruder_ids);
|
||||||
std::string preamble();
|
std::string preamble();
|
||||||
|
std::string postamble();
|
||||||
std::string set_temperature(unsigned int temperature, bool wait = false, int tool = -1);
|
std::string set_temperature(unsigned int temperature, bool wait = false, int tool = -1);
|
||||||
std::string set_bed_temperature(unsigned int temperature, bool wait = false);
|
std::string set_bed_temperature(unsigned int temperature, bool wait = false);
|
||||||
std::string set_fan(unsigned int speed, bool dont_save = false);
|
std::string set_fan(unsigned int speed, bool dont_save = false);
|
||||||
|
@ -45,7 +46,6 @@
|
||||||
std::string lift();
|
std::string lift();
|
||||||
std::string unlift();
|
std::string unlift();
|
||||||
Clone<Pointf3> get_position() const;
|
Clone<Pointf3> get_position() const;
|
||||||
std::string end_program();
|
|
||||||
%{
|
%{
|
||||||
|
|
||||||
SV*
|
SV*
|
||||||
|
|
Loading…
Reference in a new issue