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 2024-09-30 11:41:30 +08:00 committed by Noisyfox
parent 9e05f88a36
commit ca6a3fe17b
4 changed files with 52 additions and 4 deletions

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())