Improve PA calibration Line method so it works for bed origin not in (0,0)

(cherry picked from commit f0522065d8162714c735205af71a35528cb621c8)
This commit is contained in:
SoftFever 2023-12-02 12:45:02 +08:00
parent cd1be11458
commit bfd8ac6e40

View File

@ -439,11 +439,8 @@ std::string CalibPressureAdvanceLine::generate_test(double start_pa /*= 0*/, dou
m_length_long = 40 + std::min(w - 120.0, 0.0); m_length_long = 40 + std::min(w - 120.0, 0.0);
auto startx = (w - m_length_short * 2 - m_length_long - 20) / 2; auto startx = bed_ext.min.x() + (w - m_length_short * 2 - m_length_long - 20) / 2;
auto starty = (h - count * m_space_y) / 2; auto starty = bed_ext.min.y() + (h - count * m_space_y) / 2;
if (is_delta()) {
CalibPressureAdvanceLine::delta_modify_start(startx, starty, count);
}
return print_pa_lines(startx, starty, start_pa, step_pa, count); return print_pa_lines(startx, starty, start_pa, step_pa, count);
} }