Fix overly persistent pressure advance pattern (#1591)

* Reset model's calib_pa_pattern as needed

* Add initial config for skirt and brim in PA pattern
This commit is contained in:
thewildmage 2023-07-26 05:23:41 -06:00 committed by GitHub
parent c0cb91bb8a
commit 910d79ae6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 5 deletions

View file

@ -71,6 +71,7 @@ Model& Model::assign_copy(const Model &rhs)
// BBS
this->plates_custom_gcodes = rhs.plates_custom_gcodes;
this->curr_plate_index = rhs.curr_plate_index;
this->calib_pa_pattern.reset();
if (rhs.calib_pa_pattern) {
this->calib_pa_pattern = std::make_unique<CalibPressureAdvancePattern>(
@ -106,7 +107,8 @@ Model& Model::assign_copy(Model &&rhs)
// BBS
this->plates_custom_gcodes = std::move(rhs.plates_custom_gcodes);
this->curr_plate_index = rhs.curr_plate_index;
this->calib_pa_pattern = std::move(rhs.calib_pa_pattern);
this->calib_pa_pattern.reset();
this->calib_pa_pattern.swap(rhs.calib_pa_pattern);
//BBS: add auxiliary path logic
// BBS: backup, all in one temp dir

View file

@ -116,7 +116,7 @@ private:
bool m_draw_numbers {true};
};
struct SuggestedCalibPressureAdvancePatternConfig {
struct SuggestedConfigCalibPAPattern {
const std::vector<std::pair<std::string, double>> float_pairs {
{"initial_layer_print_height", 0.25},
{"layer_height", 0.2},
@ -130,8 +130,11 @@ struct SuggestedCalibPressureAdvancePatternConfig {
};
const std::vector<std::pair<std::string, int>> int_pairs {
{"skirt_loops", 0},
{"wall_loops", 3}
};
const std::pair<std::string, BrimType> brim_pair {"brim_type", BrimType::btNoBrim};
};
class CalibPressureAdvancePattern : public CalibPressureAdvance {