mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-08 15:11:21 +02:00
feat: dual external spool support, AMS slot model filtering & pre-population
Backend: - Add dual external spool support for H2D (vt_tray as list: Ext-L/Ext-R) - Add cloud filament ID map endpoint (/cloud/filament-id-map) - Fix RFID spool data erased by periodic AMS updates (skip tag matcher for RFID-tagged trays) - Fix AMS slot config overwrites RFID spool state - Fix K-profile selection corrupts existing profiles on X1C/P1S - Resolve K-profiles filament name via cloud filament ID map - Update print scheduler and usage tracker for dual external spools Frontend: - Add printer model filtering to ConfigureAmsSlotModal (cloud/local/builtin presets filtered by @BBL model suffix and compatible_printers) - Add pre-population for configured slots (preset, color, K-profile) - Add K-Profiles view with accurate filament name resolution - Internationalize all ConfigureAmsSlotModal strings (en/de/fr/it/ja — 21 keys) - Add 5 new ConfigureAmsSlotModal tests (model filtering, pre-selection, color pre-population, i18n) - Update PrintersPage for dual external spool rendering Docs: - Update CHANGELOG, README, website features, and wiki AMS docs
This commit is contained in:
@@ -41,22 +41,26 @@ export function buildLoadedFilaments(printerStatus: PrinterStatus | undefined):
|
||||
});
|
||||
});
|
||||
|
||||
// Add external spool if loaded
|
||||
if (printerStatus?.vt_tray?.tray_type) {
|
||||
const color = normalizeColor(printerStatus.vt_tray.tray_color);
|
||||
filaments.push({
|
||||
type: printerStatus.vt_tray.tray_type,
|
||||
color,
|
||||
colorName: getColorName(color),
|
||||
amsId: -1,
|
||||
trayId: 0,
|
||||
isHt: false,
|
||||
isExternal: true,
|
||||
label: 'External',
|
||||
globalTrayId: 254,
|
||||
trayInfoIdx: printerStatus.vt_tray.tray_info_idx || '',
|
||||
extruderId: hasDualNozzle ? 0 : undefined,
|
||||
});
|
||||
// Add external spool(s) if loaded
|
||||
for (const extTray of printerStatus?.vt_tray ?? []) {
|
||||
if (extTray.tray_type) {
|
||||
const color = normalizeColor(extTray.tray_color);
|
||||
const trayId = extTray.id ?? 254;
|
||||
const hasDualExternal = (printerStatus?.vt_tray?.length ?? 0) > 1;
|
||||
filaments.push({
|
||||
type: extTray.tray_type,
|
||||
color,
|
||||
colorName: getColorName(color),
|
||||
amsId: -1,
|
||||
trayId: trayId - 254,
|
||||
isHt: false,
|
||||
isExternal: true,
|
||||
label: hasDualExternal ? (trayId === 254 ? 'Ext-L' : 'Ext-R') : 'External',
|
||||
globalTrayId: trayId,
|
||||
trayInfoIdx: extTray.tray_info_idx || '',
|
||||
extruderId: hasDualNozzle ? (trayId - 254) : undefined,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return filaments;
|
||||
|
||||
Reference in New Issue
Block a user