feat(device): H2C/A2L device layer

Nozzle rack data model and device-tab panel, multi-nozzle sync, per-nozzle filament blacklist, and print-dispatch nozzle mapping (DevNozzleMappingCtrl V0/V1).
This commit is contained in:
SoftFever
2026-07-09 01:16:25 +08:00
parent 15412cd812
commit a098b483f6
24 changed files with 2511 additions and 136 deletions
+13
View File
@@ -95,6 +95,10 @@ namespace Slic3r
{
result.id = ams_id + slot_id;
}
else if (type == DevAms::AMS_LITE_MIXED)
{
result.id = AMS_LITE_MIXED_TRAY_INDEX_OFFSET + slot_id;
}
else
{
result.id = ams_id * 4 + slot_id;
@@ -117,6 +121,11 @@ namespace Slic3r
{
std::string ams_id = ams->second->GetAmsId();
auto ams_type = ams->second->GetAmsType();
// GetAmsType() maps mixed -> AMS_LITE; recover the mixed type so N9 trays index at 24+slot.
if (ams_type == DevAms::AMS_LITE && ams->second->IsAmsLiteMixed())
{
ams_type = DevAms::AMS_LITE_MIXED;
}
for (auto tray = ams->second->GetTrays().begin(); tray != ams->second->GetTrays().end(); tray++)
{
int ams_id = atoi(ams->first.c_str());
@@ -126,6 +135,10 @@ namespace Slic3r
{
tray_index = ams_id * 4 + tray_id;
}
else if (ams_type == DevAms::AMS_LITE_MIXED)
{
tray_index = AMS_LITE_MIXED_TRAY_INDEX_OFFSET + tray_id;
}
else if (ams_type == DevAms::N3S)
{
tray_index = ams_id + tray_id;