bff6d70b17
Aplicatie Flask + SQLite pentru productie alimentara: cantarirea componentelor unui produs finit si tiparirea etichetei prin QZ Tray. - produse finite (retete) formate din componente cantarite - designer vizual de etichete (mm/px, zona sigura, campuri variabile, cod QR cu continut din mai multe bucati) - legare produs finit -> sablon de eticheta - navigare pe doua taburi: Cantarire / Setari - administrare: componente, produse finite, sabloane, campuri, istoric - backup, resetare baza de date, checklist de pregatire, /healthz - CLI de administrare si serviciu systemd pentru productie - vendor/syncpulse-scale-bridge (GPL-3.0-or-later) pentru citirea cantarului
1.6 KiB
1.6 KiB
Contributing
Thank you for helping more scales work out of the box.
Reporting a scale that is not recognised
Open an issue with:
- the brand and model of the indicator, and its serial settings menu if you know it;
- what Manual & monitor shows (hex and text) at the speed and framing that gives readable data;
- what the display showed at that moment (e.g.
0.550 kg, stable).
Adding a protocol
- In
scale_bridge/protocols.py, write aProtocolsubclass whosereadings(data)returnsReadings from raw bytes — value, unit, andstable/net/overload/checksum_okwhen the format carries them. Never raise on bad input; skip what does not match. - Add it to
_catalogue()withkind, the read-onlyrequest(if any),families,referenceandspecificity(3 = strictly framed or checksummed, 2 = distinctive text, 1 = loose). - Add its id to
CONTINUOUS_IDSand/orPOLL_IDSso detection tries it. - Teach
scale_bridge/simulator.pyto produce it (frame_for, andREQUESTSorCONTINUOUS). - Add tests in
tests/test_protocols.pywith sample frames from the manufacturer's document, and a case intests/test_detect.py. - Run
python -m pytest.
Never add a request that changes the scale (zero, tare, reset, print, display off, configuration) to detection.
Code
- Python 3.9+, standard library plus
pyserialonly. - Keep the source headers (SPDX line and copyright) and the author attribution described in NOTICE.md.
- Contributions are accepted under the project's licence (GPL-3.0-or-later with the section 7(b) attribution term).