tweak generator info and use local time stamp for better readability

This commit is contained in:
SoftFever 2023-03-14 22:12:33 +08:00
parent f914a36a7f
commit 2895477da4
4 changed files with 15 additions and 10 deletions

View file

@ -1499,7 +1499,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
file.write_format("; HEADER_BLOCK_START\n");
// Write information on the generator.
file.write_format("; %s\n", Slic3r::header_slic3r_generated().c_str());
file.write_format("; generated by %s on %s\n", Slic3r::header_slic3r_generated().c_str(), Slic3r::Utils::local_timestamp().c_str());
//BBS: total estimated printing time
file.write_format(";%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Estimated_Printing_Time_Placeholder).c_str());
//BBS: total layer number
@ -1531,13 +1531,10 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
file.write("; CONFIG_BLOCK_END\n\n");
} else {
file.write_format("; hack-fix: write fake slicer info here so that "
"Moonraker will extract thumbs.\n");
file.write_format(
"; %s\n\n",
std::string(
std::string("generated by SuperSlicer " SoftFever_VERSION " on ") +
Slic3r::Utils::utc_timestamp())
.c_str());
"preprocess_cancellation can process.\n");
file.write_format("; %s\n\n", std::string(std::string("generated by SuperSlicer " SoftFever_VERSION " on ") +
Slic3r::Utils::local_timestamp())
.c_str());
DoExport::export_thumbnails_to_file(
thumbnail_cb, print.get_plate_index(), print.full_print_config().option<ConfigOptionPoints>("thumbnails")->values,