ENH:supports new fields for flag3

jira:[none]

Change-Id: I013c7b843f3f7d5156a8d209572da2bc078e9191
(cherry picked from commit 106d9865c3e569b95519ae9bd9193d10bd991d1a)
This commit is contained in:
tao wang
2025-04-08 16:02:35 +08:00
committed by Noisyfox
parent 1908b39bb8
commit bb74ca8b63
4 changed files with 19 additions and 26 deletions

View File

@@ -1465,19 +1465,17 @@ bool AMSControl::Enable(bool enable)
return wxWindow::Enable(enable);
}
void AMSControl::SetExtruder(bool on_off, std::string ams_id, std::string slot_id)
void AMSControl::SetExtruder(bool on_off, int nozzle_id, std::string ams_id, std::string slot_id)
{
AmsItem *item = nullptr;
if (m_ams_item_list.find(ams_id) != m_ams_item_list.end()) { item = m_ams_item_list[ams_id]; }
if (!item) {
return;
}
if (!on_off) {
m_extruder->OnAmsLoading(false, item->get_nozzle_id());
} else {
if (on_off && item) {
auto col = item->GetTagColr(slot_id);
m_extruder->OnAmsLoading(true, item->get_nozzle_id(), col);
m_extruder->OnAmsLoading(true, nozzle_id, col);
}
else {
m_extruder->OnAmsLoading(false, nozzle_id);
}
}