Commit Graph

4 Commits

Author SHA1 Message Date
gitea c98c0eef4a Correct documented dev ports and ignore local tooling output
CLAUDE.md described the backend on 8000 and the frontend on 3000, but
frontend/.env has overridden these to 8002 and 5172 (matching .env.example
and the CORS defaults in settings.py). Following the documented ports leads
to checking servers that are not there.

Also records the CORS_ALLOWED_ORIGINS override and the real default origin
list, and notes that the frontend port comes from frontend/.env. The serial
bridge's BACKEND_URL is left at 8000 because that is what serial_bridge/.env
actually contains - it points at a port Django no longer listens on, which
is a config issue to fix separately, not a documentation error.

Adds .claude/screenshots/ and .playwright-mcp/ to .gitignore so local
verification output stays out of the repository.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-18 19:43:22 +03:00
gitea 5a8527e96e Add multi-protocol scale support and admin COM monitor
The bridge becomes pure transport: it opens the port, writes a poll
string it is given at runtime, and streams raw lines. Protocol
definitions live in Django and parsing happens in the browser, so a new
scale type never means a new binary on the station PCs. The poll loop
stays in the bridge because a browser cannot be the heartbeat - hidden
tabs get throttled and a closed tab would stop the scale.

Every payload now carries a hex field. Toledo Continuous sends STX and
bit-packed status, which UTF-8 decoding silently corrupts. Fixed-column
protocols need the opposite care: a space can mean balanced, so the
trailing whitespace must survive.

Parsers for the simulator, fixed-column, Toledo Continuous and SICS
return an explicit error rather than a guess on a frame that does not
match, since a silently wrong weight on a weighbridge is worse than no
weight. Toledo and SICS are written from documented structure and have
not been validated against real hardware.

The admin monitor shows the raw stream as text and hex, sends one-off
probe commands, and builds fixed-column protocols against captured
lines. Spaces render as middots because in some protocols a space is
the stability flag.

The test writer now simulates a weighing cycle - idle, ramp, balanced,
drop - alternating empty and loaded trucks, quantised to the 20kg and
50kg divisions real truck scales use.

Bridge logging rotates and per-reading lines drop to DEBUG; the old
config had grown two log files totalling 368MB.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-18 18:58:00 +03:00
gitea fb1d4ae7ad report editor with text field, lines, frames, and table draw. multiselect etc. 2026-01-25 09:58:55 +02:00
gitea 7f04566242 barebone app with django and react, sse, jwt token, comport reader, test comport writer, requires com0com, users with groups, sample table vehicles, tokens for access and refresh 2026-01-17 13:03:21 +02:00