3 Commits

Author SHA1 Message Date
DanielS
1b8e51fbb4 Fix double scans and make POS TCP target configurable
- Send EAN via TCP first; use keyboard emulation only as fallback when
  TCP fails (POS_KEYBOARD_FALLBACK=0 disables it), so the register never
  receives the same code twice
- Read POS host/port/timeout from POS_TCP_HOST, POS_TCP_PORT,
  POS_TCP_TIMEOUT; add GET /api/scanner_config
- /api/detect reports object_present from background subtraction
- Keep the scan lock until the scale is really empty (2 empty frames with
  calibrated background, 8 without) instead of releasing on one
  low-confidence frame
- Set the scan lock before awaiting the send to avoid duplicate sends
  from frames arriving while the request is in flight
- Keep HTTP status codes in /api/scan_ean (404/400, 502 on send failure)
  and run it in the thread pool since it does blocking I/O
2026-10-19 20:48:09 +02:00
DanielS
5462784c1f delete me 2026-05-29 14:14:04 +02:00
DanielS
bd1bd52c6c initial commit 2026-05-29 00:47:49 +02:00