Adaptive Pressure Advance Validation (#14198)

Co-authored-by: Wegerich <23041237+Wegerich@users.noreply.github.com>
This commit is contained in:
Ian Bassi
2026-06-19 15:46:00 -03:00
committed by GitHub
parent 17e2adc283
commit f4268a0eec
6 changed files with 160 additions and 0 deletions

View File

@@ -25,6 +25,7 @@
#include <limits>
#include <numeric>
#include <unordered_set>
#include <sstream>
#include <boost/filesystem/path.hpp>
#include <boost/format.hpp>
#include <boost/log/trivial.hpp>
@@ -1925,6 +1926,23 @@ StringObjectException Print::validate(std::vector<StringObjectException> *warnin
if (m_default_region_config.precise_outer_wall && m_default_region_config.wall_sequence != WallSequence::InnerOuter)
warn(L("The precise wall option will be ignored for outer-inner or inner-outer-inner wall sequences."), "precise_outer_wall");
// check adaptive pressure advance model
for (unsigned int extruder_id : extruders) {
if (m_config.adaptive_pressure_advance.get_at(extruder_id) &&
m_config.enable_pressure_advance.get_at(extruder_id)) {
const std::string pa_model = m_config.adaptive_pressure_advance_model.get_at(extruder_id);
if (!pa_model.empty()) {
std::string validation_error = AdaptivePAProcessor::validate_adaptive_pa_model(pa_model);
if (!validation_error.empty()) {
warn(L("The Adaptive Pressure Advance model for one or more extruders may contain invalid values."),
"adaptive_pressure_advance_model");
break;
}
}
}
}
} catch (std::exception& e) {
BOOST_LOG_TRIVIAL(warning) << "Orca: validate motion ability failed: " << e.what() << std::endl;
}