mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 11:12:35 +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 detect tags. Each activate_type_a() call returning None corrupts the PN5180 transceive state, silently preventing all subsequent tag detection. Fixed by performing a full hardware reset (RST pin toggle + RF re-init) before every idle poll (~240ms, ~1.8 Hz rate). When a tag is present, a light RF off/on cycle (13ms) resets the card from ACTIVE to IDLE state for continuous re-selection. Also added error-based recovery, periodic status logging, and accurate heartbeat NFC/scale health reporting.