FIX:Fix the issue of extruder matching errors
jira:[for nozzle match] Change-Id: I6965500bfb7feef6d18d28bea8a53a3c477f5e36
This commit is contained in:
parent
4e387d4ace
commit
7bcf4b6cc5
|
@ -646,7 +646,6 @@ MachineObject::MachineObject(NetworkAgent* agent, std::string name, std::string
|
|||
is_ams_need_update = false;
|
||||
ams_insert_flag = false;
|
||||
ams_power_on_flag = false;
|
||||
ams_support_use_ams = false;
|
||||
ams_calibrate_remain_flag = false;
|
||||
ams_humidity = 5;
|
||||
|
||||
|
@ -4091,7 +4090,6 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
|
|||
}
|
||||
if (jj["ams"].contains("tray_reading_bits")) {
|
||||
tray_reading_bits = stol(jj["ams"]["tray_reading_bits"].get<std::string>(), nullptr, 16);
|
||||
ams_support_use_ams = true;
|
||||
}
|
||||
if (jj["ams"].contains("tray_is_bbl_bits")) {
|
||||
tray_is_bbl_bits = stol(jj["ams"]["tray_is_bbl_bits"].get<std::string>(), nullptr, 16);
|
||||
|
|
|
@ -640,7 +640,6 @@ public:
|
|||
bool ams_calibrate_remain_flag { false };
|
||||
bool ams_auto_switch_filament_flag { false };
|
||||
bool ams_air_print_status { false };
|
||||
bool ams_support_use_ams { false };
|
||||
bool ams_support_virtual_tray { true };
|
||||
int ams_humidity;
|
||||
int ams_user_setting_hold_count = 0;
|
||||
|
|
|
@ -2237,7 +2237,7 @@ bool SelectMachineDialog::is_nozzle_type_match(ExtderData data) {
|
|||
|
||||
// The default two extruders are left, right, but the order of the extruders on the machine is right, left.
|
||||
std::vector<std::string> flow_type_of_machine;
|
||||
for (auto it = data.extders.rbegin(); it != data.extders.rend(); it++) {
|
||||
for (auto it = data.extders.begin(); it != data.extders.end(); it++) {
|
||||
if (it->current_nozzle_flow_type == NozzleFlowType::H_FLOW) {
|
||||
flow_type_of_machine.push_back("Big Traffic");
|
||||
} else if (it->current_nozzle_flow_type == NozzleFlowType::S_FLOW){
|
||||
|
@ -3739,17 +3739,14 @@ void SelectMachineDialog::update_flow_cali_check(MachineObject* obj)
|
|||
|
||||
void SelectMachineDialog::update_ams_check(MachineObject *obj)
|
||||
{
|
||||
if (obj && obj->ams_support_use_ams && obj->has_ams() && !obj->is_enable_np) {
|
||||
if (obj && obj->has_ams() && !obj->is_enable_np) {
|
||||
select_use_ams->Show();
|
||||
if (obj->get_printer_ams_type() == "generic") {
|
||||
img_use_ams_tip->Show();
|
||||
} else {
|
||||
img_use_ams_tip->Hide();
|
||||
}
|
||||
} /* else {
|
||||
select_use_ams->Hide();
|
||||
}*/
|
||||
|
||||
}
|
||||
if (obj && obj->is_enable_np) { m_checkbox_list["use_ams"]->SetValue(true); }
|
||||
}
|
||||
|
||||
|
@ -3834,15 +3831,13 @@ void SelectMachineDialog::update_show_status()
|
|||
|
||||
// do ams mapping if no ams result
|
||||
bool clean_ams_mapping = false;
|
||||
if (obj_->has_ams() && m_ams_mapping_result.empty()) {
|
||||
if (obj_->ams_support_use_ams) {
|
||||
if (m_ams_mapping_result.empty()) {
|
||||
if (m_checkbox_list["use_ams"]->GetValue()) {
|
||||
do_ams_mapping(obj_);
|
||||
} else {
|
||||
clean_ams_mapping = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!obj_->has_ams() || !m_checkbox_list["use_ams"]->GetValue()) {
|
||||
clean_ams_mapping = true;
|
||||
|
@ -3908,21 +3903,18 @@ void SelectMachineDialog::update_show_status()
|
|||
return;
|
||||
}
|
||||
|
||||
if (obj_->ams_support_use_ams) {
|
||||
if (!m_checkbox_list["use_ams"]->GetValue()) {
|
||||
m_ams_mapping_result.clear();
|
||||
sync_ams_mapping_result(m_ams_mapping_result);
|
||||
|
||||
if (has_timelapse_warning()) {
|
||||
show_status(PrintDialogStatus::PrintStatusTimelapseWarning);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
show_status(PrintDialogStatus::PrintStatusDisableAms);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// do ams mapping if no ams result
|
||||
|
|
Loading…
Reference in New Issue