Drop the Redundant Lift Type Alias in eager_lift

effective_type was a plain copy of the parameter.
This commit is contained in:
Hanif Koh
2026-09-11 16:01:48 +08:00
parent 4a5494a07a
commit 330d8b1d06

View File

@@ -836,7 +836,6 @@ std::string GCodeWriter::lazy_lift(LiftType lift_type, bool spiral_vase)
// BBS: immediately execute an undelayed lift move with a spiral lift pattern // BBS: immediately execute an undelayed lift move with a spiral lift pattern
// designed specifically for subsequent gcode injection (e.g. timelapse) // designed specifically for subsequent gcode injection (e.g. timelapse)
std::string GCodeWriter::eager_lift(const LiftType type) { std::string GCodeWriter::eager_lift(const LiftType type) {
const LiftType effective_type = type;
std::string lift_move; std::string lift_move;
double target_lift = 0; double target_lift = 0;
{ {
@@ -850,7 +849,7 @@ std::string GCodeWriter::eager_lift(const LiftType type) {
} }
// BBS: spiral lift only safe with known position // BBS: spiral lift only safe with known position
if (effective_type == LiftType::SpiralLift && this->is_current_position_clear()) { if (type == LiftType::SpiralLift && this->is_current_position_clear()) {
double radius = target_lift / (2 * PI * atan(filament()->travel_slope())); double radius = target_lift / (2 * PI * atan(filament()->travel_slope()));
// static spiral alignment when no move in x,y plane. // static spiral alignment when no move in x,y plane.
// spiral centra is a radius distance to the right (y=0) // spiral centra is a radius distance to the right (y=0)