Fixed a minor bug where the maximum volumetric speed cap was slightly… (#5629)

Fixed a minor bug where the maximum volumetric speed cap was slightly off for the PA pattern calibration.
This commit is contained in:
SoftFever 2024-06-08 10:55:32 +08:00 committed by GitHub
parent ff53f401be
commit 68d2a9eedf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 6 deletions

View file

@ -9360,11 +9360,6 @@ void Plater::_calib_pa_pattern(const Calib_Params& params)
new ConfigOptionFloat(opt.second)
);
}
print_config.set_key_value(
"outer_wall_speed",
new ConfigOptionFloat(CalibPressureAdvance::find_optimal_PA_speed(
wxGetApp().preset_bundle->full_config(), (fabs(print_config.get_abs_value("line_width", nozzle_diameter)) <= DBL_EPSILON)? (nozzle_diameter*1.125) : print_config.get_abs_value("line_width", nozzle_diameter),
print_config.get_abs_value("layer_height"), 0)));
for (const auto opt : SuggestedConfigCalibPAPattern().nozzle_ratio_pairs) {
print_config.set_key_value(
@ -9385,6 +9380,14 @@ void Plater::_calib_pa_pattern(const Calib_Params& params)
new ConfigOptionEnum<BrimType>(SuggestedConfigCalibPAPattern().brim_pair.second)
);
// Orca: Set the outer wall speed to the optimal speed for the test, cap it with max volumetric speed
print_config.set_key_value("outer_wall_speed", new ConfigOptionFloat(CalibPressureAdvance::find_optimal_PA_speed(
wxGetApp().preset_bundle->full_config(),
(fabs(print_config.get_abs_value("line_width", nozzle_diameter)) <= DBL_EPSILON) ?
(nozzle_diameter * 1.125) :
print_config.get_abs_value("line_width", nozzle_diameter),
print_config.get_abs_value("layer_height"), 0)));
wxGetApp().get_tab(Preset::TYPE_PRINT)->update_dirty();
wxGetApp().get_tab(Preset::TYPE_FILAMENT)->update_dirty();
wxGetApp().get_tab(Preset::TYPE_PRINTER)->update_dirty();