mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
Fix build
This commit is contained in:
@@ -782,7 +782,7 @@ void CalibrationPresetPage::create_multi_extruder_filament_list_panel(wxWindow *
|
|||||||
m_main_ams_preview_list.push_back(preview_ams_item);
|
m_main_ams_preview_list.push_back(preview_ams_item);
|
||||||
size_t index = m_main_ams_preview_list.size() - 1;
|
size_t index = m_main_ams_preview_list.size() - 1;
|
||||||
preview_ams_item->Bind(wxEVT_LEFT_DOWN, [this, index](wxMouseEvent &e) {
|
preview_ams_item->Bind(wxEVT_LEFT_DOWN, [this, index](wxMouseEvent &e) {
|
||||||
update_multi_extruder_filament_combobox(m_main_ams_preview_list[index]->m_amsinfo.ams_id, 0);
|
update_multi_extruder_filament_combobox(m_main_ams_preview_list[index]->get_ams_id(), 0);
|
||||||
e.Skip();
|
e.Skip();
|
||||||
});
|
});
|
||||||
ams_items_sizer->Add(preview_ams_item, 0, wxALIGN_CENTER | wxRIGHT, FromDIP(6));
|
ams_items_sizer->Add(preview_ams_item, 0, wxALIGN_CENTER | wxRIGHT, FromDIP(6));
|
||||||
@@ -841,7 +841,7 @@ void CalibrationPresetPage::create_multi_extruder_filament_list_panel(wxWindow *
|
|||||||
m_deputy_ams_preview_list.push_back(preview_ams_item);
|
m_deputy_ams_preview_list.push_back(preview_ams_item);
|
||||||
size_t index = m_deputy_ams_preview_list.size() - 1;
|
size_t index = m_deputy_ams_preview_list.size() - 1;
|
||||||
preview_ams_item->Bind(wxEVT_LEFT_DOWN, [this, index](wxMouseEvent &e) {
|
preview_ams_item->Bind(wxEVT_LEFT_DOWN, [this, index](wxMouseEvent &e) {
|
||||||
update_multi_extruder_filament_combobox(m_deputy_ams_preview_list[index]->m_amsinfo.ams_id, 1);
|
update_multi_extruder_filament_combobox(m_deputy_ams_preview_list[index]->get_ams_id(), 1);
|
||||||
e.Skip();
|
e.Skip();
|
||||||
});
|
});
|
||||||
ams_items_sizer->Add(preview_ams_item, 0, wxALIGN_CENTER | wxRIGHT, FromDIP(6));
|
ams_items_sizer->Add(preview_ams_item, 0, wxALIGN_CENTER | wxRIGHT, FromDIP(6));
|
||||||
@@ -1780,7 +1780,7 @@ void CalibrationPresetPage::init_with_machine(MachineObject* obj)
|
|||||||
if (obj->is_multi_extruders()) {
|
if (obj->is_multi_extruders()) {
|
||||||
for (int i = 0; i < m_comboBox_nozzle_volume_types.size(); ++i) {
|
for (int i = 0; i < m_comboBox_nozzle_volume_types.size(); ++i) {
|
||||||
m_comboBox_nozzle_volume_types[i]->Show();
|
m_comboBox_nozzle_volume_types[i]->Show();
|
||||||
m_comboBox_nozzle_volume_types[i]->SetSelection(obj->m_nozzle_data.nozzles[i].flow_type);
|
m_comboBox_nozzle_volume_types[i]->SetSelection(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (obj->printer_type.find("O1D") != std::string::npos && m_main_extruder_on_left) {
|
if (obj->printer_type.find("O1D") != std::string::npos && m_main_extruder_on_left) {
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ bool AMSinfo::parse_ams_info(MachineObject *obj, Ams *ams, bool remain_flag, boo
|
|||||||
this->current_temperature = ams->current_temperature;
|
this->current_temperature = ams->current_temperature;
|
||||||
this->ams_type = AMSModel(ams->type);
|
this->ams_type = AMSModel(ams->type);
|
||||||
|
|
||||||
|
nozzle_id = ams->nozzle;
|
||||||
cans.clear();
|
cans.clear();
|
||||||
for (int i = 0; i < ams->trayList.size(); i++) {
|
for (int i = 0; i < ams->trayList.size(); i++) {
|
||||||
auto it = ams->trayList.find(std::to_string(i));
|
auto it = ams->trayList.find(std::to_string(i));
|
||||||
@@ -119,6 +120,25 @@ bool AMSinfo::parse_ams_info(MachineObject *obj, Ams *ams, bool remain_flag, boo
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AMSinfo::ReadExtInfo(AmsTray tray) {
|
||||||
|
this->ams_id = tray.id;
|
||||||
|
this->ams_type = AMSModel::EXT_AMS;
|
||||||
|
Caninfo can;
|
||||||
|
can.can_id = std::to_string(0);
|
||||||
|
can.material_name = tray.filament_setting_id;
|
||||||
|
this->cans.push_back(can);
|
||||||
|
if (tray.id == std::to_string(VIRTUAL_TRAY_MAIN_ID)) {
|
||||||
|
this->nozzle_id = 0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this->nozzle_id = 1;
|
||||||
|
}
|
||||||
|
this->cans[0].material_state = AMSCanType::AMS_CAN_TYPE_VIRTUAL;
|
||||||
|
this->cans[0].material_colour = tray.decode_color(tray.color);
|
||||||
|
this->cans[0].material_remain = tray.remain;
|
||||||
|
this->cans[0].material_name = tray.type;
|
||||||
|
}
|
||||||
|
|
||||||
/*************************************************
|
/*************************************************
|
||||||
Description:AMSrefresh
|
Description:AMSrefresh
|
||||||
**************************************************/
|
**************************************************/
|
||||||
|
|||||||
@@ -176,6 +176,7 @@ struct AMSinfo
|
|||||||
public:
|
public:
|
||||||
std::string ams_id;
|
std::string ams_id;
|
||||||
std::vector<Caninfo> cans;
|
std::vector<Caninfo> cans;
|
||||||
|
int nozzle_id = 0;
|
||||||
std::string current_can_id;
|
std::string current_can_id;
|
||||||
AMSPassRoadSTEP current_step;
|
AMSPassRoadSTEP current_step;
|
||||||
AMSAction current_action;
|
AMSAction current_action;
|
||||||
@@ -191,6 +192,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (ams_id == other.ams_id &&
|
if (ams_id == other.ams_id &&
|
||||||
cans == other.cans &&
|
cans == other.cans &&
|
||||||
|
nozzle_id == other.nozzle_id &&
|
||||||
current_can_id == other.current_can_id &&
|
current_can_id == other.current_can_id &&
|
||||||
current_step == other.current_step &&
|
current_step == other.current_step &&
|
||||||
current_action == other.current_action &&
|
current_action == other.current_action &&
|
||||||
@@ -217,7 +219,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
bool parse_ams_info(MachineObject* obj, Ams *ams, bool remain_flag = false, bool humidity_flag = false);
|
bool parse_ams_info(MachineObject* obj, Ams *ams, bool remain_flag = false, bool humidity_flag = false);
|
||||||
|
void ReadExtInfo(AmsTray tray);
|
||||||
bool support_drying() const { return (ams_type == AMSModel::N3S_AMS) || (ams_type == AMSModel::N3F_AMS); };
|
bool support_drying() const { return (ams_type == AMSModel::N3S_AMS) || (ams_type == AMSModel::N3F_AMS); };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user