mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-18 03:54:17 +02:00
Frontend: Replace inline SpoolInfoCard/UnknownTagCard with full-screen TagDetectedModal that auto-opens on NFC tag detection. Known spools show remaining weight, fill bar, and offer "Assign to AMS" (new sub-modal with printer selector + AMS slot grid) and "Sync Weight". Unknown tags offer "Add to Inventory" and "Link to Spool". Modal stays open on tag removal, won't re-open for dismissed tags, reopens on re-place after removal. Daemon: Fix PN5180 NFC reader failing to maintain tag detection. After a successful SELECT the card stays in ACTIVE state and ignores subsequent WUPA/REQA. Added a conditional RF off/on cycle (13ms) before each poll, but only when a tag is present — resets card from ACTIVE to IDLE for re-selection. The cycle is skipped when idle to avoid degrading reader state with continuous RF toggling, which prevented new tags from being detected after removal. Also added a preventive full hardware reset every 60s when idle to recover from deeper stuck states, error-based recovery after 10 consecutive exceptions, and accurate heartbeat reporting of NFC/scale health.