mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-17 14:02:35 +00:00
Merge branch 'main' of https://github.com/OrcaSlicer/OrcaSlicer_priv into feat/printer-agent-impl
This commit is contained in:
@@ -2180,7 +2180,7 @@ void SelectMachineDialog::on_reselect_dialog_btn_clicked(wxMouseEvent&)
|
||||
best_pos_map[slot.id] = pos.value();
|
||||
}
|
||||
}
|
||||
m_best_pos_dialog->Update(obj, best_pos_map, m_ams_mapping_result, text);
|
||||
m_best_pos_dialog->UpdateInfo(obj, best_pos_map, m_ams_mapping_result, text);
|
||||
m_best_pos_dialog->ShowModal();
|
||||
}
|
||||
|
||||
@@ -2205,7 +2205,7 @@ void SelectMachineDialog::update_best_pos_dialog(wxCommandEvent& evt)
|
||||
best_pos_map[slot.id] = pos.value();
|
||||
}
|
||||
}
|
||||
m_best_pos_dialog->Update(obj_, best_pos_map, m_ams_mapping_result, text);
|
||||
m_best_pos_dialog->UpdateInfo(obj_, best_pos_map, m_ams_mapping_result, text);
|
||||
}
|
||||
|
||||
void SelectMachineDialog::show_status(PrintDialogStatus status, std::vector<wxString> params, wxString wiki_url)
|
||||
@@ -3092,7 +3092,7 @@ static bool _HasExt(const std::vector<FilamentInfo> &ams_mapping_result) {
|
||||
};
|
||||
|
||||
for (const auto &info : ams_mapping_result) {
|
||||
if (info.ams_id == VIRTUAL_AMS_MAIN_ID_STR || info.ams_id == VIRTUAL_AMS_DEPUTY_ID_STR && !info.ams_id.empty()) {
|
||||
if (info.ams_id == VIRTUAL_AMS_MAIN_ID_STR || (info.ams_id == VIRTUAL_AMS_DEPUTY_ID_STR && !info.ams_id.empty())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -3886,8 +3886,12 @@ int SelectMachineDialog::update_print_required_data(Slic3r::DynamicPrintConfig c
|
||||
m_required_data_config = config;
|
||||
m_required_data_model = model;
|
||||
//m_required_data_plate_data_list = plate_data_list;
|
||||
auto* agent = wxGetApp().getAgent();
|
||||
for (auto i = 0; i < plate_data_list.size(); i++) {
|
||||
if (!plate_data_list[i]->gcode_file.empty()) {
|
||||
if (agent)
|
||||
for (auto& info : plate_data_list[i]->slice_filaments_info)
|
||||
info.filament_id = agent->to_orca_filament_id(info.filament_id);
|
||||
m_required_data_plate_data_list.push_back(plate_data_list[i]);
|
||||
}
|
||||
}
|
||||
@@ -5113,8 +5117,11 @@ void SelectMachineDialog::update_show_status(MachineObject* obj_)
|
||||
const auto& warning_tpu_filaments =
|
||||
DevPrinterConfigUtil::get_value_from_config<std::vector<std::string>>(obj_->printer_type, "auto_on_cali_warning_tpu_filaments");
|
||||
if (!warning_tpu_filaments.empty()) {
|
||||
auto* agent = wxGetApp().getAgent();
|
||||
for (const auto& fila : m_ams_mapping_result) {
|
||||
if (std::find(warning_tpu_filaments.begin(), warning_tpu_filaments.end(), fila.filament_id) != warning_tpu_filaments.end()) {
|
||||
// fila.filament_id is our OF id; the printer config list holds the printer's own.
|
||||
const std::string printer_filament_id = agent ? agent->from_orca_filament_id(fila.filament_id) : fila.filament_id;
|
||||
if (std::find(warning_tpu_filaments.begin(), warning_tpu_filaments.end(), printer_filament_id) != warning_tpu_filaments.end()) {
|
||||
show_status(PrintDialogStatus::PrintStatusTPUUnsuggestCali,
|
||||
{ _L("If 'Dynamic Flow Calibration' is set to Auto/On, the system will use the manual calibration value or the default value and skip the flow calibration process. You can perform a manual flow calibration for TPU filament on the 'Calibration' page.") });
|
||||
break;
|
||||
@@ -5270,9 +5277,12 @@ bool SelectMachineDialog::can_support_pa_auto_cali()
|
||||
|
||||
std::vector<std::string> unsupport_auto_cali_filaments = DevPrinterConfigUtil::get_unsupport_auto_cali_filaments(obj->printer_type);
|
||||
if (!unsupport_auto_cali_filaments.empty()) {
|
||||
auto* agent = wxGetApp().getAgent();
|
||||
auto iter = std::find_if(m_filaments.begin(), m_filaments.end(),
|
||||
[&unsupport_auto_cali_filaments](const FilamentInfo &item) {
|
||||
auto iter = std::find(unsupport_auto_cali_filaments.begin(), unsupport_auto_cali_filaments.end(), item.filament_id);
|
||||
[&unsupport_auto_cali_filaments, agent](const FilamentInfo &item) {
|
||||
// item.filament_id is our OF id; the printer config list holds the printer's own.
|
||||
const std::string printer_filament_id = agent ? agent->from_orca_filament_id(item.filament_id) : item.filament_id;
|
||||
auto iter = std::find(unsupport_auto_cali_filaments.begin(), unsupport_auto_cali_filaments.end(), printer_filament_id);
|
||||
return iter != unsupport_auto_cali_filaments.end();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user