- 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