fix: add calibration index to tray properties and update related logic

This commit is contained in:
2025-02-15 07:14:03 +01:00
parent d4348944fc
commit c21be92e98
3 changed files with 10 additions and 6 deletions

View File

@ -293,7 +293,8 @@ function displayAmsData(amsData) {
const trayProperties = [
{ key: 'tray_sub_brands', label: 'Sub Brands' },
{ key: 'tray_info_idx', label: 'Filament IDX' },
{ key: 'setting_id', label: 'Setting ID' }
{ key: 'setting_id', label: 'Setting ID' },
{ key: 'cali_idx', label: 'Calibration IDX' } // Add new property
];
// Nur gültige Felder anzeigen
@ -417,7 +418,8 @@ function handleSpoolIn(amsId, trayId) {
nozzle_temp_max: parseInt(maxTemp),
type: selectedSpool.filament.material,
brand: selectedSpool.filament.vendor.name,
tray_info_idx: selectedSpool.filament.extra.bambu_idx.replace(/['"]+/g, '').trim()
tray_info_idx: selectedSpool.filament.extra.bambu_idx.replace(/['"]+/g, '').trim(),
cali_idx: selectedSpool.filament.extra.bambu_setting_id.replace(/['"]+/g, '').trim()
}
};

View File

@ -86,6 +86,7 @@ function populateVendorDropdown(data, selectedSmId = null) {
});
// Nach der Schleife: Formatierung der Gesamtlänge
console.log("Total Lenght: ", totalLength);
const formattedLength = totalLength > 1000
? (totalLength / 1000).toFixed(2) + " km"
: totalLength.toFixed(2) + " m";