Recognise rolls put back, use CC2 Control's log for bookings
CI / test (push) Successful in 1m13s
CI / image (push) Successful in 48s

- A roll put back into the slot it left, with the tag data unchanged, is
  mapped again and CC2 Control's question answered; if the touchscreen then
  replaces the id, it was another roll and goes to storage.
- A touchscreen edit of a scanned roll keeps the mapping and re-answers
  CC2 Control's question so its use is counted.
- Bookings name the print and its result from CC2 Control's log.
- A weigh-in in CC2 Control sets Spoolman's remaining weight instead of
  being booked as use.
- After "Take out" with the roll still in the tray, the tray's logged use
  is booked to that roll until it leaves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014GcEk5tkfFSYD6NTF66NkC
This commit is contained in:
Jonas MenzelandClaude Opus 5.5 committed 2026-10-25 10:29:33 +01:00
1 parent a9041eb538
commit 67c3b54903
7 files changed
+607 -40

No files matched your search

+4
View File
@@ -240,6 +240,10 @@ class StateStore:
p.setdefault("booked", {})
p.setdefault("last_record", None)
p.setdefault("scans", [])
p.setdefault("last", {}) # slot -> roll that last left it (for putting it back)
p.setdefault("takeout", []) # windows in which a tray prints for a roll taken out in CC2 Control
p.setdefault("log_seen", None) # CC2 Control log entries already looked at
p.setdefault("extra", []) # bookings from CC2 Control's log still to make
return p
def save(self) -> None: