mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 11:12:35 +02:00
The reporter's A1 mini has nine Flow Dynamics calibrations, all of them saved under Generic PLA and named after the spool's colour — "Dark Brown", "Glow", "Marble". Bambu Studio lists all nine for that slot. Configure AMS Slot offered one: the profile already bound to the slot. After a slot reset it offered none, leaving the slicer as the only way to assign a K value. Two independent faults, both tripped by picking a built-in generic preset. The filament-id match discarded Bambu's generic GFx99 ids as too broad. But the comparison already requires both sides to carry the same id, so that exclusion could only ever fire when the selected preset was itself the generic one — precisely the case where the match is right. The printer keeps one calibration table per filament id, so a slot on Generic PLA should offer everything calibrated under Generic PLA. Equal ids now match, generic or not. The name fallback was dead for the same presets: parsePresetName reads the leading "Generic" in "Generic PLA" as a manufacturer, which put the matcher into brand-gated mode and demanded the word GENERIC appear in the profile name. No real profile has it. "Generic" is no longer treated as a brand, so profiles still match on material when a printer reports no filament_id with its calibrations. The one profile that did appear came from the #1689 safety net that always surfaces the slot's active cali_idx — which is also why a reset slot, having no active profile, showed an empty list. Neither fix can be complete on its own, because profile names are free text and nothing ties "Marble" to a material. The picker now also lists every remaining profile on the printer under "Other K profiles on this printer", so a profile that exists can always be selected. Applying one from that group needs no new backend work: configure_ams_slot already realigns the slot's filament context to the chosen profile's, which is what makes the cali_idx stick. Options are keyed by name+k_value rather than the bare name, so two profiles sharing a name are no longer indistinguishable in the select. Both render blocks carry the change — the modal duplicates the picker for its full-screen variant. isMatchingCalibration gets the same generic-id rule for the spool form's PA suggester, with two guards. A new generic-id-to-material table means a PETG spool can never claim GFL99 profiles just because both sides stored a generic id (Nylon and PA compare as one material). And a spool that names its own brand keeps the stricter name path, so its suggestions stay brand-specific rather than becoming the printer's whole generic table.
41 lines
1.8 KiB
HTML
41 lines
1.8 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
|
<!-- L-4: Restrict Referer header to origin-only on cross-origin navigation so
|
|
sensitive tokens in query parameters are not leaked to third-party servers. -->
|
|
<meta name="referrer" content="strict-origin-when-cross-origin" />
|
|
<title>Bambuddy</title>
|
|
|
|
<!-- PWA Meta Tags -->
|
|
<meta name="description" content="Monitor and manage your Bambu Lab 3D printers" />
|
|
<meta name="theme-color" content="#00ae42" />
|
|
<meta name="mobile-web-app-capable" content="yes" />
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
|
<meta name="apple-mobile-web-app-title" content="Bambuddy" />
|
|
|
|
<!-- Manifest -->
|
|
<link rel="manifest" href="/manifest.json" />
|
|
|
|
<!-- Favicons -->
|
|
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png" />
|
|
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon-16x16.png" />
|
|
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png" />
|
|
|
|
<!-- Splash screens for iOS -->
|
|
<link rel="apple-touch-startup-image" href="/img/android-chrome-512x512.png" />
|
|
<script type="module" crossorigin src="/assets/index-Bx2Rwvpi.js"></script>
|
|
<link rel="stylesheet" crossorigin href="/assets/index-oReXTzKG.css">
|
|
</head>
|
|
<body>
|
|
<div id="root"></div>
|
|
|
|
<!-- Service Worker Registration (skip on SpoolBuddy kiosk).
|
|
Kept as an external file so the CSP `script-src 'self'` covers it
|
|
without needing 'unsafe-inline' or per-build hashes. -->
|
|
<script src="/sw-register.js"></script>
|
|
</body>
|
|
</html>
|