FIX: Prompt user when mix ams and vtslot in an extruder

jira: none
Change-Id: I9a1d4936056fc872c75bf0454e4ca89665ece2f8
(cherry picked from commit 65c00e00fe8709255c40e94679fa4ced6d3ae688)
This commit is contained in:
zhimin.zeng authored and Noisyfox committed 2025-08-24 23:18:18 +08:00
1 parent 9e05f88a36
commit ca6a3fe17b
4 files changed
+52 -4

No files matched your search

+17
View File
@@ -1161,6 +1161,23 @@ bool MachineObject::need_SD_card() const
return !is_multi_extruders();
}
int MachineObject::get_extruder_id_by_ams_id(const std::string &ams_id)
{
if (ams_id.empty())
return 0;
auto it = amsList.find(ams_id);
if (it != amsList.end())
return it->second->nozzle;
else if (stoi(ams_id) == VIRTUAL_TRAY_MAIN_ID)
return 0;
else if (stoi(ams_id) == VIRTUAL_TRAY_DEPUTY_ID)
return 1;
assert(false);
return 0;
}
bool MachineObject::is_bbl_filament(std::string tag_uid)
{
if (tag_uid.empty())