Belt: write the belt header outside the optional file header block

The G-code viewer takes the belt tilt only from the belt header comments, but
they were written inside the header block that is left out when a BTT TFT
thumbnail is configured, so such a printer never got belt view. The comments
are not part of the header block; they go after it, and after the thumbnails
that firmware needs first.
This commit is contained in:
harrierpigeon
2026-10-03 13:12:41 -05:00
parent 0c3b7bc72e
commit 2782374d8d
+4 -2
View File
@@ -3093,8 +3093,6 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
file.write_format("; HEADER_BLOCK_START\n");
// Write information on the generator.
file.write_format("; generated by %s on %s\n", Slic3r::header_slic3r_generated().c_str(), Slic3r::Utils::local_timestamp().c_str());
// Belt printer: embed angle and transform configs in header via virtual hook.
this->write_belt_header(file, print);
if (is_bbl_printers)
file.write_format(";%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Estimated_Printing_Time_Placeholder).c_str());
//BBS: total layer number
@@ -3193,6 +3191,10 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
}
}
// Belt printer: the tilt and transform settings the G-code viewer reads back. They
// are comments outside the config block, so they go after the thumbnails that a
// BTT TFT firmware needs first, and are written whether or not that header block is.
this->write_belt_header(file, print);
// Write some terse information on the slicing parameters.
const PrintObject *first_object = print.objects().front();