NEW: Add Ellis' pattern method for pressure advance calibration

Add a new calibration pattern method for pressure advance calibration, which can better test the influence of k value on the corner. The changes of this patch are picked from OrcaSlicer by thewildmage, thanks to thewildmage for the great work!

github issue: https://github.com/bambulab/BambuStudio/issues/2222

Change-Id: Icc8fd4d52b20c1668bfa08716b48549dfada515b
(cherry picked from commit eb72d8b681bef270906406a2d10a36d4efbce900)
(cherry picked from commit 2b07c1154f4a009612f951938e7865dc338b2d9b)
This commit is contained in:
thewildmage 2023-08-10 12:19:15 +08:00 committed by lane.wei
parent d3785577ef
commit 047015fa5e
12 changed files with 1131 additions and 279 deletions

View file

@ -677,6 +677,25 @@ std::string Preset::get_current_printer_type(PresetBundle *preset_bundle)
return "";
}
bool Preset::has_lidar(PresetBundle *preset_bundle)
{
bool has_lidar = false;
if (preset_bundle) {
auto config = &preset_bundle->printers.get_edited_preset().config;
std::string vendor_name;
for (auto vendor_profile : preset_bundle->vendors) {
for (auto vendor_model : vendor_profile.second.models)
if (vendor_model.name == config->opt_string("printer_model")) {
vendor_name = vendor_profile.first;
break;
}
}
if (!vendor_name.empty())
has_lidar = vendor_name.compare("BBL") == 0 ? true : false;
}
return has_lidar;
}
bool Preset::is_custom_defined()
{
if (custom_defined == "1")