Allow XL for PrusaLink

This commit is contained in:
David Kocik 2023-03-01 12:53:25 +01:00
parent 8978b03df0
commit fcf9939e4f

View File

@ -522,16 +522,20 @@ void PhysicalPrinterDialog::update_host_type(bool printer_change)
{ {
if (m_presets.empty()) if (m_presets.empty())
return; return;
bool all_presets_are_from_mk3_family = true; bool all_presets_are_from_mk3_family = true;
for (PresetForPrinter* prstft : m_presets) { for (PresetForPrinter* prstft : m_presets) {
std::string preset_name = prstft->get_preset_name(); std::string preset_name = prstft->get_preset_name();
if (Preset* preset = wxGetApp().preset_bundle->printers.find_preset(preset_name)) { if (Preset* preset = wxGetApp().preset_bundle->printers.find_preset(preset_name)) {
std::string model_id = preset->config.opt_string("printer_model"); std::string model_id = preset->config.opt_string("printer_model");
auto model_supports_prusalink = [](const std::string &model) { auto model_supports_prusalink = [](const std::string& model) {
return model.size() >= 3 && return model.size() >= 2 &&
((boost::starts_with(model, "MK") && model[2] > '2' && model[2] <= '9') || ((boost::starts_with(model, "MK") && model[2] > '2' && model[2] <= '9')
boost::starts_with(model, "MINI")); || boost::starts_with(model, "MINI")
|| boost::starts_with(model, "MK2.5")
|| boost::starts_with(model, "XL")
);
}; };
if (preset->vendor) { if (preset->vendor) {
if (preset->vendor->name == "Prusa Research") { if (preset->vendor->name == "Prusa Research") {