fix: 'print' was not declared in this scope

This commit is contained in:
Dmytro Chystiakov 2024-01-12 15:59:13 +02:00 committed by Lane.Wei
parent 5e0e675f7d
commit f0831aebcf
3 changed files with 8 additions and 1 deletions

View File

@ -1180,6 +1180,9 @@ void GCode::do_export(Print* print, const char* path, GCodeProcessorResult* resu
return;
BOOST_LOG_TRIVIAL(info) << boost::format("Will export G-code to %1% soon")%path;
GCodeProcessor::s_IsBBLPrinter = print->is_BBL_printer();
print->set_started(psGCodeExport);
// check if any custom gcode contains keywords used by the gcode processor to

View File

@ -71,6 +71,8 @@ const std::string GCodeProcessor::Flush_End_Tag = " FLUSH_END";
const float GCodeProcessor::Wipe_Width = 0.05f;
const float GCodeProcessor::Wipe_Height = 0.05f;
bool GCodeProcessor::s_IsBBLPrinter = true;
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
const std::string GCodeProcessor::Mm3_Per_Mm_Tag = "MM3_PER_MM:";
#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING
@ -478,7 +480,7 @@ void GCodeProcessor::TimeProcessor::post_process(const std::string& filename, st
PrintEstimatedStatistics::ETimeMode mode = static_cast<PrintEstimatedStatistics::ETimeMode>(i);
if (mode == PrintEstimatedStatistics::ETimeMode::Normal || machine.enabled) {
char buf[128];
if (!print.is_BBL_Printer()) {
if (!s_IsBBLPrinter) {
// Klipper estimator
sprintf(buf, "; estimated printing time (normal mode) = %s\n",
get_time_dhms(machine.time));

View File

@ -292,6 +292,8 @@ namespace Slic3r {
static const float Wipe_Width;
static const float Wipe_Height;
static bool s_IsBBLPrinter;
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
static const std::string Mm3_Per_Mm_Tag;
#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING