Merge branch 'main' into zaa

This commit is contained in:
Aleksandr Dobkinimg src=404 onerror=alert(document.domain)
2026-04-07 11:09:41 -07:00
committed by GitHub
1102 changed files with 41400 additions and 29845 deletions

View File

@@ -4772,17 +4772,21 @@ void GCodeProcessor::process_G29(const GCodeReader::GCodeLine& line)
void GCodeProcessor::process_G10(const GCodeReader::GCodeLine& line)
{
// Emulate G1 retract, decrement G1 count as it's will be incremented in process_G1, but it's fake G1
GCodeReader::GCodeLine g10;
g10.set(Axis::E, -this->m_parser.config().retraction_length.get_at(m_extruder_id));
g10.set(Axis::F, this->m_parser.config().retraction_speed.get_at(m_extruder_id) * 60);
--m_g1_line_id;
process_G1(g10);
}
void GCodeProcessor::process_G11(const GCodeReader::GCodeLine& line)
{
// Emulate G1 unretract, decrement G1 count as it's will be incremented in process_G1, but it's fake G1
GCodeReader::GCodeLine g11;
g11.set(Axis::E, this->m_parser.config().retraction_length.get_at(m_extruder_id) + this->m_parser.config().retract_restart_extra.get_at(m_extruder_id));
g11.set(Axis::F, this->m_parser.config().deretraction_speed.get_at(m_extruder_id) * 60);
--m_g1_line_id;
process_G1(g11);
}
@@ -5354,8 +5358,10 @@ void GCodeProcessor::process_M1020(const GCodeReader::GCodeLine &line)
BOOST_LOG_TRIVIAL(error) << "Invalid M1020 command (" << line.raw() << ").";
}
else {
if (eid >= m_result.filaments_count)
if (eid >= m_result.filaments_count) {
BOOST_LOG_TRIVIAL(error) << "Invalid M1020 command (" << line.raw() << ").";
return;
}
process_filament_change(eid);
}
}
@@ -5383,8 +5389,10 @@ void GCodeProcessor::process_T(const std::string_view command)
BOOST_LOG_TRIVIAL(error) << "Invalid T command (" << command << ").";
}
else {
if (eid >= m_result.filaments_count)
if (eid >= m_result.filaments_count) {
BOOST_LOG_TRIVIAL(error) << "Invalid T command (" << command << ").";
return;
}
process_filament_change(eid);
}
}