FIX:User preset material settings dependent on firmware
JIRA: 5167 Change-Id: I82cf26848594b01155883ad0aa2e9ee77d371fb2
This commit is contained in:
parent
433a4b2a7f
commit
efedf8b319
|
@ -37,7 +37,8 @@
|
|||
"support_ai_monitoring":false,
|
||||
"support_first_layer_inspect":true,
|
||||
"support_chamber_temp_edit":false,
|
||||
"support_extrusion_cali":false
|
||||
"support_extrusion_cali":false,
|
||||
"support_user_preset":false
|
||||
},
|
||||
"model_id":"BL-P001",
|
||||
"compatible_machine":["BL-P002", "C11", "C12", "C13"],
|
||||
|
@ -78,5 +79,10 @@
|
|||
"print": {
|
||||
"support_tunnel_mqtt":true
|
||||
}
|
||||
},
|
||||
"01.06.06.00": {
|
||||
"print": {
|
||||
"support_user_preset":true
|
||||
}
|
||||
}
|
||||
}
|
|
@ -37,7 +37,8 @@
|
|||
"support_ai_monitoring":false,
|
||||
"support_first_layer_inspect":true,
|
||||
"support_chamber_temp_edit":false,
|
||||
"support_extrusion_cali":false
|
||||
"support_extrusion_cali":false,
|
||||
"support_user_preset":false
|
||||
},
|
||||
"model_id": "BL-P002",
|
||||
"compatible_machine":["BL-P001", "C11", "C12", "C13"],
|
||||
|
@ -78,5 +79,10 @@
|
|||
"print": {
|
||||
"support_tunnel_mqtt":true
|
||||
}
|
||||
},
|
||||
"01.06.06.00": {
|
||||
"print": {
|
||||
"support_user_preset":true
|
||||
}
|
||||
}
|
||||
}
|
|
@ -33,6 +33,7 @@
|
|||
"support_first_layer_inspect":false,
|
||||
"support_chamber_temp_edit":false,
|
||||
"support_extrusion_cali":true,
|
||||
"support_user_preset":false,
|
||||
"bed_temperature_limit": 100
|
||||
},
|
||||
"model_id": "C11",
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
"support_first_layer_inspect":false,
|
||||
"support_chamber_temp_edit":false,
|
||||
"support_extrusion_cali":true,
|
||||
"support_user_preset":false,
|
||||
"bed_temperature_limit": 100
|
||||
},
|
||||
"model_id": "C12",
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
"support_first_layer_inspect":true,
|
||||
"support_chamber_temp_edit":true,
|
||||
"support_extrusion_cali":false,
|
||||
"support_user_preset":false,
|
||||
"bed_temperature_limit": 110,
|
||||
"nozzle_max_temperature": 320
|
||||
},
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
"support_first_layer_inspect":false,
|
||||
"support_chamber_temp_edit":false,
|
||||
"support_extrusion_cali":true,
|
||||
"support_user_preset":false,
|
||||
"bed_temperature_limit": 100
|
||||
},
|
||||
"model_id": "N1",
|
||||
|
|
|
@ -1 +1 @@
|
|||
01.08.00.01
|
||||
01.08.00.02
|
|
@ -762,6 +762,7 @@ bool AMSMaterialsSetting::Show(bool show)
|
|||
|
||||
void AMSMaterialsSetting::Popup(wxString filament, wxString sn, wxString temp_min, wxString temp_max, wxString k, wxString n)
|
||||
{
|
||||
if (!obj) return;
|
||||
update_widgets();
|
||||
// set default value
|
||||
if (k.IsEmpty())
|
||||
|
@ -784,7 +785,10 @@ void AMSMaterialsSetting::Popup(wxString filament, wxString sn, wxString temp_mi
|
|||
for (auto filament_it = preset_bundle->filaments.begin(); filament_it != preset_bundle->filaments.end(); filament_it++) {
|
||||
//filter by system preset
|
||||
Preset& preset = *filament_it;
|
||||
if (preset_bundle->filaments.get_preset_base(*filament_it) != &preset) {
|
||||
/*The situation where the user preset is not displayed is as follows:
|
||||
1. Not a root preset
|
||||
2. Not system preset and the printer firmware does not support user preset */
|
||||
if (preset_bundle->filaments.get_preset_base(*filament_it) != &preset || (!filament_it->is_system && !obj->is_support_user_preset)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -794,7 +798,7 @@ void AMSMaterialsSetting::Popup(wxString filament, wxString sn, wxString temp_mi
|
|||
// get printer_model
|
||||
ConfigOption* printer_model_opt = printer_it->config.option("printer_model");
|
||||
ConfigOptionString* printer_model_str = dynamic_cast<ConfigOptionString*>(printer_model_opt);
|
||||
if (!printer_model_str || !obj)
|
||||
if (!printer_model_str )
|
||||
continue;
|
||||
|
||||
// use printer_model as printer type
|
||||
|
|
|
@ -2961,6 +2961,12 @@ int MachineObject::parse_json(std::string payload)
|
|||
}
|
||||
}
|
||||
|
||||
if (jj.contains("support_user_preset")) {
|
||||
if (jj["support_user_preset"].is_boolean()) {
|
||||
is_support_user_preset = jj["support_user_preset"].get<bool>();
|
||||
}
|
||||
}
|
||||
|
||||
if (jj.contains("nozzle_max_temperature")) {
|
||||
if (jj["nozzle_max_temperature"].is_number_integer()) {
|
||||
nozzle_max_temperature = jj["nozzle_max_temperature"].get<int>();
|
||||
|
|
|
@ -736,6 +736,7 @@ public:
|
|||
bool is_support_tunnel_mqtt{false};
|
||||
bool is_support_motor_noise_cali{false};
|
||||
bool is_support_wait_sending_finish{false};
|
||||
bool is_support_user_preset{false};
|
||||
|
||||
int nozzle_max_temperature = -1;
|
||||
int bed_temperature_limit = -1;
|
||||
|
|
Loading…
Reference in New Issue