Commit Graph

15 Commits

Author SHA1 Message Date
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 67c9531600 Add quick-fill table for vehicle extra data
Shows previously-used combinations of lookup nomenclature values above
the Additional Data fields in both the new-vehicle and edit forms.
Clicking a row merges the combination into the current values, so
free-text fields the operator already typed are preserved.

NomenclatureContext now fans extra_combination events out to
subscribers; without that they hit the unknown-object warning and were
dropped, so deletes would not have reached other open tabs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-18 18:57:36 +03:00
gitea 183908cbab Add drag-to-reorder for nomenclatures
Nomenclatures can be reordered by dragging in the left-hand list, which
PATCHes sort_order on the rows that moved. PATCH rather than PUT, since a
full update recreates the nested fields collection.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-18 18:56:21 +03:00
gitea 19945dae19 Move dev servers to ports 8002 and 5172
Backend now runs on 8002 and the frontend dev server on 5172, with the
proxy, CORS origins and the run_*.bat launchers updated to match. The
launchers also activate the venv so they work from a clean shell.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-18 18:56:14 +03:00
gitea ac6b1f48b4 expression field added in document editor. a few plans in plans folder 2026-02-24 11:38:56 +02:00
gitea 574de2c32d added users management and permissions 2026-02-23 15:01:58 +02:00
gitea a993f8944d removed id and _vehicle objects from editor dropdown, json is made procramatically instead of hardcored, so when entity changed, json is auto updated 2026-02-22 21:21:05 +02:00
gitea 34769a84eb added net weight, user, date etc. generates new document number with year as a prefix, restarts numbering every year 2026-02-22 13:20:18 +02:00
gitea da17562c19 added docker-compose for linux fixed 2 2026-02-21 20:04:26 +02:00
gitea 58b1ae9a5e added docker-compose for linux 2026-02-21 19:53:04 +02:00
gitea be91231b05 added vehicle creation functionality 2026-02-10 17:50:49 +02:00
gitea 6a42099169 added vehicles and vehicles extra, dynamic tables for entities, dynamic dropdowns with overlay for selecting and manage data 2026-02-10 17:32:33 +02:00
gitea ed35a90cc0 report editor has db text and bands (detail, subdetails, summary, header, footer) detail/subdetail work ok. 2026-01-26 15:15:32 +02: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