mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
FIX: only meature m29 once in machine start GCode
jira: NONE Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I3661159dd09f6d179eae3a0b1f2bbc14277be312 (cherry picked from commit 60492b7b0b57dc243cc8ac17f2cad638724aaca2) (cherry picked from commit 8555af21cacaa10e74715e771aa0866052a31bd6)
This commit is contained in:
@@ -1641,7 +1641,9 @@ void GCodeProcessor::register_commands()
|
|||||||
|
|
||||||
{"VG1", [this](const GCodeReader::GCodeLine& line) { process_VG1(line); }},
|
{"VG1", [this](const GCodeReader::GCodeLine& line) { process_VG1(line); }},
|
||||||
{"VM104", [this](const GCodeReader::GCodeLine& line) { process_VM104(line); }},
|
{"VM104", [this](const GCodeReader::GCodeLine& line) { process_VM104(line); }},
|
||||||
{"VM109", [this](const GCodeReader::GCodeLine& line) { process_VM109(line); }}
|
{"VM109", [this](const GCodeReader::GCodeLine& line) { process_VM109(line); }},
|
||||||
|
{"M622", [this](const GCodeReader::GCodeLine& line) { process_M622(line);}},
|
||||||
|
{"M623", [this](const GCodeReader::GCodeLine& line) { process_M623(line);}}
|
||||||
};
|
};
|
||||||
|
|
||||||
std::unordered_set<std::string>early_quit_commands = {
|
std::unordered_set<std::string>early_quit_commands = {
|
||||||
@@ -2128,7 +2130,7 @@ void GCodeProcessor::apply_config(const DynamicPrintConfig& config)
|
|||||||
if (machine_max_jerk_y != nullptr)
|
if (machine_max_jerk_y != nullptr)
|
||||||
m_time_processor.machine_limits.machine_max_jerk_y.values = machine_max_jerk_y->values;
|
m_time_processor.machine_limits.machine_max_jerk_y.values = machine_max_jerk_y->values;
|
||||||
|
|
||||||
const ConfigOptionFloats* machine_max_jerk_z = config.option<ConfigOptionFloats>("machine_max_jerkz");
|
const ConfigOptionFloats* machine_max_jerk_z = config.option<ConfigOptionFloats>("machine_max_jerk_z");
|
||||||
if (machine_max_jerk_z != nullptr)
|
if (machine_max_jerk_z != nullptr)
|
||||||
m_time_processor.machine_limits.machine_max_jerk_z.values = machine_max_jerk_z->values;
|
m_time_processor.machine_limits.machine_max_jerk_z.values = machine_max_jerk_z->values;
|
||||||
|
|
||||||
@@ -4860,7 +4862,13 @@ void GCodeProcessor::process_G29(const GCodeReader::GCodeLine& line)
|
|||||||
//BBS: hardcode 260 seconds for G29
|
//BBS: hardcode 260 seconds for G29
|
||||||
//Todo: use a machine related setting when we have second kind of BBL printer
|
//Todo: use a machine related setting when we have second kind of BBL printer
|
||||||
const float value_s = 260.0;
|
const float value_s = 260.0;
|
||||||
simulate_st_synchronize(value_s);
|
if (s_IsBBLPrinter){
|
||||||
|
if(m_measure_g29_time)
|
||||||
|
simulate_st_synchronize(value_s);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
simulate_st_synchronize(value_s);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GCodeProcessor::process_G10(const GCodeReader::GCodeLine& line)
|
void GCodeProcessor::process_G10(const GCodeReader::GCodeLine& line)
|
||||||
@@ -5285,6 +5293,24 @@ void GCodeProcessor::process_M221(const GCodeReader::GCodeLine& line)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GCodeProcessor::process_M622(const GCodeReader::GCodeLine& line)
|
||||||
|
{
|
||||||
|
float value_j;
|
||||||
|
if(line.has_value('J',value_j)){
|
||||||
|
int interger_j = (int)(std::round(value_j));
|
||||||
|
if(interger_j == 1 && !m_measure_g29_time)
|
||||||
|
m_measure_g29_time = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void GCodeProcessor::process_M623(const GCodeReader::GCodeLine& line)
|
||||||
|
{
|
||||||
|
if(m_measure_g29_time)
|
||||||
|
m_measure_g29_time = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void GCodeProcessor::process_M400(const GCodeReader::GCodeLine& line)
|
void GCodeProcessor::process_M400(const GCodeReader::GCodeLine& line)
|
||||||
{
|
{
|
||||||
float value_s = 0.0;
|
float value_s = 0.0;
|
||||||
|
|||||||
@@ -797,6 +797,7 @@ class Print;
|
|||||||
size_t m_last_default_color_id;
|
size_t m_last_default_color_id;
|
||||||
bool m_detect_layer_based_on_tag {false};
|
bool m_detect_layer_based_on_tag {false};
|
||||||
int m_seams_count;
|
int m_seams_count;
|
||||||
|
bool m_measure_g29_time {false};
|
||||||
bool m_single_extruder_multi_material;
|
bool m_single_extruder_multi_material;
|
||||||
float m_preheat_time;
|
float m_preheat_time;
|
||||||
int m_preheat_steps;
|
int m_preheat_steps;
|
||||||
@@ -1030,6 +1031,9 @@ class Print;
|
|||||||
void process_T(const std::string_view command);
|
void process_T(const std::string_view command);
|
||||||
void process_M1020(const GCodeReader::GCodeLine &line);
|
void process_M1020(const GCodeReader::GCodeLine &line);
|
||||||
|
|
||||||
|
void process_M622(const GCodeReader::GCodeLine &line);
|
||||||
|
void process_M623(const GCodeReader::GCodeLine &line);
|
||||||
|
|
||||||
void process_filament_change(int id);
|
void process_filament_change(int id);
|
||||||
|
|
||||||
// post process the file with the given filename to:
|
// post process the file with the given filename to:
|
||||||
|
|||||||
Reference in New Issue
Block a user