fix: use scalar config accessors in PA calibration for release/v2.4

#14447 backported main's array-based calib.hpp accessors, which call
DynamicPrintConfig::get_abs_value_at() — a coFloats/coFloatsOrPercents-only
method that does not exist on release/v2.4. Here outer_wall_speed,
outer_wall_acceleration and initial_layer_speed are still scalar coFloat,
so the method is undefined and, if backported, would throw at runtime on
these scalar options. This broke the build (calib.hpp is included widely
via AppConfig.hpp).

Revert speed_first_layer/speed_perimeter/accel_perimeter to the scalar
option<ConfigOptionFloat>()->value form used before #14447. The actual
#14447 crash fix (line_width_first_layer zero-width fallback in calib.cpp)
is unaffected.
This commit is contained in:
SoftFever
2026-07-05 15:11:30 +08:00
parent 07a87b4129
commit 6888f9d806

View File

@@ -312,9 +312,9 @@ public:
protected:
// todo multi_extruders:
double speed_first_layer() const { return m_config.get_abs_value_at("initial_layer_speed", m_params.extruder_id); };
double speed_perimeter() const { return m_config.get_abs_value_at("outer_wall_speed", m_params.extruder_id); };
double accel_perimeter() const { return m_config.get_abs_value_at("outer_wall_acceleration", m_params.extruder_id); }
double speed_first_layer() const { return m_config.option<ConfigOptionFloat>("initial_layer_speed")->value; };
double speed_perimeter() const { return m_config.option<ConfigOptionFloat>("outer_wall_speed")->value; };
double accel_perimeter() const { return m_config.option<ConfigOptionFloat>("outer_wall_acceleration")->value; }
double line_width_first_layer() const;
double line_width() const;
int wall_count() const { return m_config.option<ConfigOptionInt>("wall_loops")->value; };