ENH:optimize AMS information reset
jira:[none] Change-Id: I09f6f5048ca3517b49665d817319d7d57c82a0c5
This commit is contained in:
parent
5ae194be77
commit
2fa364e8b6
|
@ -474,24 +474,24 @@ void AMSMaterialsSetting::on_select_reset(wxCommandEvent& event) {
|
|||
}
|
||||
|
||||
if (obj) {
|
||||
// set filament
|
||||
if (is_virtual_tray()) {
|
||||
auto tar_tray = VIRTUAL_TRAY_DEPUTY_ID;
|
||||
|
||||
if (!obj->is_enable_np) {
|
||||
tar_tray = VIRTUAL_TRAY_DEPUTY_ID;
|
||||
}
|
||||
else {
|
||||
tar_tray = 0;
|
||||
}
|
||||
obj->command_ams_filament_settings(ams_id, tar_tray, ams_filament_id, ams_setting_id, color_str, m_filament_type, nozzle_temp_min_int, nozzle_temp_max_int);
|
||||
}
|
||||
else if(m_is_third){
|
||||
if(m_is_third){
|
||||
if (obj->is_enable_np) {
|
||||
obj->command_ams_filament_settings(ams_id, slot_id, ams_filament_id, ams_setting_id, color_str, m_filament_type, nozzle_temp_min_int, nozzle_temp_max_int);
|
||||
}
|
||||
else {
|
||||
obj->command_ams_filament_settings(ams_id, slot_id, ams_filament_id, ams_setting_id, color_str, m_filament_type, nozzle_temp_min_int, nozzle_temp_max_int);
|
||||
if (is_virtual_tray()) {
|
||||
obj->command_ams_filament_settings(ams_id, 0, ams_filament_id, ams_setting_id, std::string(col_buf), m_filament_type, nozzle_temp_min_int,
|
||||
nozzle_temp_max_int);
|
||||
} else {
|
||||
obj->command_ams_filament_settings(ams_id, slot_id, ams_filament_id, ams_setting_id, std::string(col_buf), m_filament_type, nozzle_temp_min_int,
|
||||
nozzle_temp_max_int);
|
||||
}
|
||||
|
||||
} else {
|
||||
if (is_virtual_tray()) {
|
||||
obj->command_ams_filament_settings(VIRTUAL_TRAY_MAIN_ID, VIRTUAL_TRAY_DEPUTY_ID, ams_filament_id, ams_setting_id, std::string(col_buf), m_filament_type,
|
||||
nozzle_temp_min_int, nozzle_temp_max_int);
|
||||
} else {
|
||||
obj->command_ams_filament_settings(ams_id, slot_id, ams_filament_id, ams_setting_id, std::string(col_buf), m_filament_type, nozzle_temp_min_int,
|
||||
nozzle_temp_max_int);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -610,25 +610,21 @@ void AMSMaterialsSetting::on_select_ok(wxCommandEvent &event)
|
|||
|
||||
// set filament
|
||||
if (m_is_third) {
|
||||
if (is_virtual_tray()) {
|
||||
|
||||
auto tar_tray = VIRTUAL_TRAY_DEPUTY_ID;
|
||||
|
||||
if (!obj->is_enable_np) {
|
||||
tar_tray = VIRTUAL_TRAY_DEPUTY_ID;
|
||||
}
|
||||
else {
|
||||
//todo
|
||||
tar_tray = 0;
|
||||
}
|
||||
|
||||
obj->command_ams_filament_settings(ams_id, tar_tray, ams_filament_id, ams_setting_id, std::string(col_buf), m_filament_type, nozzle_temp_min_int, nozzle_temp_max_int);
|
||||
}
|
||||
else {
|
||||
if (obj->is_enable_np) {
|
||||
obj->command_ams_filament_settings(ams_id, slot_id, ams_filament_id, ams_setting_id, std::string(col_buf), m_filament_type, nozzle_temp_min_int, nozzle_temp_max_int);
|
||||
if (obj->is_enable_np) {
|
||||
if (is_virtual_tray()) {
|
||||
obj->command_ams_filament_settings(ams_id, 0, ams_filament_id, ams_setting_id, std::string(col_buf), m_filament_type, nozzle_temp_min_int, nozzle_temp_max_int);
|
||||
} else {
|
||||
obj->command_ams_filament_settings(ams_id, slot_id, ams_filament_id, ams_setting_id, std::string(col_buf), m_filament_type, nozzle_temp_min_int, nozzle_temp_max_int);
|
||||
obj->command_ams_filament_settings(ams_id, slot_id, ams_filament_id, ams_setting_id, std::string(col_buf), m_filament_type, nozzle_temp_min_int,
|
||||
nozzle_temp_max_int);
|
||||
}
|
||||
|
||||
} else {
|
||||
if (is_virtual_tray()) {
|
||||
obj->command_ams_filament_settings(VIRTUAL_TRAY_MAIN_ID, VIRTUAL_TRAY_DEPUTY_ID, ams_filament_id, ams_setting_id, std::string(col_buf), m_filament_type,
|
||||
nozzle_temp_min_int, nozzle_temp_max_int);
|
||||
} else {
|
||||
obj->command_ams_filament_settings(ams_id, slot_id, ams_filament_id, ams_setting_id, std::string(col_buf), m_filament_type, nozzle_temp_min_int,
|
||||
nozzle_temp_max_int);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2030,6 +2030,7 @@ int MachineObject::command_ams_filament_settings(int ams_id, int tray_id, std::s
|
|||
j["print"]["command"] = "ams_filament_setting";
|
||||
j["print"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++);
|
||||
j["print"]["ams_id"] = ams_id;
|
||||
j["print"]["slot_id"] = tray_id;
|
||||
j["print"]["tray_id"] = tray_id;
|
||||
j["print"]["tray_info_idx"] = filament_id;
|
||||
j["print"]["setting_id"] = setting_id;
|
||||
|
|
Loading…
Reference in New Issue