Skip to content

fix(driver): sticky AMS compare accepts either RFID chip of a spool - #15

Open
wolfrage76 wants to merge 1 commit into
Fire-Devils:develfrom
wolfrage76:pr/sticky-rfid-uid-2
Open

fix(driver): sticky AMS compare accepts either RFID chip of a spool#15
wolfrage76 wants to merge 1 commit into
Fire-Devils:develfrom
wolfrage76:pr/sticky-rfid-uid-2

Conversation

@wolfrage76

Copy link
Copy Markdown
Contributor

Summary

FilaMan is gaining a second RFID slot per spool (spools.rfid_uid_2) so a spool can carry one chip per side, like Bambu spools do. The AMS reports whichever chip faces the reader, but the sticky-slot check compared the tray's tag_uid against spool.rfid_uid only — a spool re-inserted with its second side facing the reader was treated as a different spool and lost its assignment.

This builds the comparison set from both slots. getattr(spool, "rfid_uid_2", None) keeps the driver working unchanged against a FilaMan without the column.

The pending auto-assign path already matches on the chip the scale just scanned, so it needed no change.

Companion change

FilaMan side: second RFID slot per spool on wolfrage76/filaman-system devel (bef6b18, migration b3c7d1e9f402).

Test plan

  • Two chips on one spool, insert side A → sticky assignment kept.
  • Insert side B → sticky assignment kept (previously: "different spool").
  • Against a FilaMan without rfid_uid_2 → behaviour identical to before.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UMQU17mLkTakENnbYH1m8M

FilaMan spools can now carry two chips (spools.rfid_uid_2, one per side).
The sticky-slot check compared the tray's tag_uid against rfid_uid only,
so a spool re-inserted with its second side facing the reader was treated
as a different spool and lost its assignment. Match against both slots;
getattr keeps the driver compatible with a FilaMan without the column.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UMQU17mLkTakENnbYH1m8M
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant