FIX: fix flow ratio calib bug for single extruder printer

2. modify the filament_flow_ratio to nullable
jira:none

Change-Id: I3f0569ee643cfe9473c6029ca0e04f4b80c8332e
(cherry picked from commit ed61d1d31bdc79f064567deacf35e05bd123880d)
This commit is contained in:
zhimin.zeng
2024-09-05 14:48:21 +08:00
committed by Noisyfox
parent e7d2c51326
commit 8eb0a59723
10 changed files with 63 additions and 38 deletions

View File

@@ -242,7 +242,7 @@ std::string CalibPressureAdvance::draw_line(
const double e_per_mm = CalibPressureAdvance::e_per_mm(line_width, layer_height,
m_config.option<ConfigOptionFloats>("nozzle_diameter")->get_at(0),
m_config.option<ConfigOptionFloats>("filament_diameter")->get_at(0),
m_config.option<ConfigOptionFloats>("filament_flow_ratio")->get_at(0));
m_config.option<ConfigOptionFloatsNullable>("filament_flow_ratio")->get_at(0));
const double length = get_distance(Vec2d(m_last_pos.x(), m_last_pos.y()), to_pt);
auto dE = e_per_mm * length;