NEW: Z hop restriction

Z hop will only come into effect when it is between retract_lift_above and retract_lift_below.
Signed-off-by: wenjie.guo <wenjie.guo@bambulab.com>
Change-Id: If43aea7024018eb8f532c6af5d8000973f2edee3
This commit is contained in:
wenjie.guo 2023-08-21 17:27:56 +08:00 committed by Lane.Wei
parent a15700e5de
commit c97a88069b
5 changed files with 29 additions and 3 deletions

View file

@ -652,7 +652,10 @@ std::string GCodeWriter::lift(LiftType lift_type, bool spiral_vase)
double target_lift = 0;
{
//BBS
target_lift = this->config.z_hop.get_at(m_extruder->id());
double above = this->config.retract_lift_above.get_at(m_extruder->id());
double below = this->config.retract_lift_below.get_at(m_extruder->id());
if (m_pos.z() >= above && (below == 0 || m_pos.z() <= below))
target_lift = this->config.z_hop.get_at(m_extruder->id());
}
// BBS
if (m_lifted == 0 && m_to_lift == 0 && target_lift > 0) {