Label objects: List of objects moved before custom start gcode, quotes added for M486 A on RRF

This commit is contained in:
Lukas Matena 2023-09-06 09:33:41 +02:00
parent ef31e4f487
commit 37dc3378ec

View File

@ -121,7 +121,8 @@ namespace Slic3r {
else if (label_object_style == LabelObjects::Firmware) {
if (flavor == GCodeFlavor::gcfMarlinFirmware || flavor == GCodeFlavor::gcfMarlinLegacy || flavor == GCodeFlavor::gcfRepRapFirmware) {
out += std::string("M486 S") + std::to_string(unique_id) + "\n";
out += std::string("M486 A") + name + "\n";
out += std::string("M486 A");
out += (flavor == GCodeFlavor::gcfRepRapFirmware ? (std::string("\"") + name + "\"") : name) + "\n";
} else {
// Not supported by / implemented for the other firmware flavors.
}
@ -1205,6 +1206,9 @@ void GCodeGenerator::_do_export(Print& print, GCodeOutputStream &file, Thumbnail
// Emit machine envelope limits for the Marlin firmware.
this->print_machine_envelope(file, print);
// Label all objects so printer knows about them since the start.
file.write(label_all_objects(config().gcode_label_objects, config().gcode_flavor, print));
// Update output variables after the extruders were initialized.
m_placeholder_parser_integration.init(m_writer);
// Let the start-up script prime the 1st printing tool.
@ -1276,9 +1280,6 @@ void GCodeGenerator::_do_export(Print& print, GCodeOutputStream &file, Thumbnail
// Set other general things.
file.write(this->preamble());
// Label all objects so printer knows about them since the start.
file.write(label_all_objects(config().gcode_label_objects, config().gcode_flavor, print));
print.throw_if_canceled();
// Collect custom seam data from all objects.