Commit Graph

23 Commits

Author SHA1 Message Date
jack 87cfbabb4a fix(serialcomm): support dynamic family sensor count in binary parser
Previously, parse_binary_data() hardcoded P-family's sensor count (244)
for all non-X wafers, causing misalignment when parsing A/B/C/D/E/F
wafers. Now passes family_code to _parse_p_binary().
2026-07-13 13:38:45 -07:00
jack c4cbc02a15 fix(stream_reader): add ASCII hex path + binary resync guard
Family-A wafers never send 0xAA 0x88 framing — _run() now routes
to _run_ascii() on first byte dispatch instead of treating the whole
stream as corrupt binary.

Binary path gets a 16 KB give-up cap (bytes, not attempts) so a
permanently-corrupt port can't stall the reader indefinitely. Raw
wire bytes go to DEBUG only; the ERROR line that surfaces in the
Activity Log is kept free of internal buffer content.

- add family_code param to StreamReader for ASCII decode routing
- add _run_binary give-up cap + DEBUG-only hex diagnostic
- fix stop(): close transport on wedged thread (binary + ASCII paths)
- refactor test_stream_reader: consolidate ASCII regression + resync
  give-up + DEBUG-vs-ERROR log split tests; drop redundant parse_line
- extend test_session_controller: live-stream gate for non-X family
- StreamControlPanel.qml: thread-safe stop on tab leave
2026-07-13 12:26:33 -07:00
jack 425f3731cd fix(stream): payload-length cap, quiet-port resync, main-thread error teardown 2026-07-13 11:54:11 -07:00
jack 92ff6fbd14 fix(wafer): derive family sensor counts from YAML layouts, bound frame decode to layout 2026-07-13 11:52:56 -07:00
jack 9e3bec9031 feat(debug): add debug read with CSV export
- Parse F1 debug data via family-independent temp formula
  (bits 4-14 scaled by 2**(i-8), sign at bit 0)
- Save sensor+debug temps side-by-side to debug_info.csv
- Wire READ DEBUG button in StatusActionsPanel
- Rename ReplayChart → RunChart; move into GraphTab
- Extract PanelBox/SectionTitle/PanelSlider in ReadoutPanel
  to cut ~300 lines of duplicated styling
- Add rightRailWidth token to Theme for consistent rail sizing
- Wrap ReadoutPanel in ScrollView so Thresholds card stays
  reachable when E-C delta rows appear
2026-07-11 18:39:29 -07:00
jack ac4448ed44 refactor(backend): clean up package re-exports, settings model properties, and unused signals 2026-07-09 12:49:33 -07:00
jack b6903af625 feat: redesign StatusTab UI with bento-grid layout and add CSV metadata editing capabilities 2026-07-07 16:41:40 -07:00
jack 915720085b refactor: StreamReader ASCII decoder uses shared sensor_count_for() 2026-07-06 13:26:03 -07:00
jack e2d71662ff refactor: data_parser binary parsers use shared sensor_count_for() 2026-07-06 13:24:46 -07:00
jack 52cc747536 chore: remove dead, contradictory EXPECTED_HEX_LENGTHS from DeviceService 2026-07-06 13:21:00 -07:00
jack 6996df73f8 feat: add recording toggle, stream stats UI 2026-07-06 12:44:43 -07:00
jack ecab3d81b1 fix: resolve CSV data truncation in save_to_csv by correctly identifying column widths and remove redundant logic in ZWaferParser 2026-07-04 16:46:44 -07:00
jack 9e28a25695 refactor: implement thread-safe hardware operations, port caching, and refined state management in the device controller 2026-07-02 22:33:44 -07:00
jack 470f8acba3 feat(core): migrate to src/ package layout and refactor serial transport
Bootstrap PySide6 using a clean src/ layout and refactor stream_reader to parse binary data packets asynchronously.
2026-06-25 13:46:54 -07:00
jack 5514653b94 refactor: prune orphaned attic modules and standardize project configurations
- Move orphaned modules (data_segment.py, contour_models.py, marching_squares.py) to attic/.
- Standardize local settings logic, serial port parameters, and graph view plots.
- Update pyproject.toml pyside6-project dependencies and configure gitignore.
2026-06-18 17:09:24 -07:00
jack 66942d250d refactor: standardize codebase formatting, optimize import orders, and update GUI resolution to 1080p 2026-06-18 13:13:47 -07:00
jack 7d32fb4b65 refactor: normalize data directory naming, and consolidate serial connection handling 2026-06-15 12:39:16 -07:00
jack 5b1c924d35 feat(stream_reader): optimize serial stream protocol detection. reduce CPU busy-spins 2026-06-15 11:56:09 -07:00
jack b34b920759 refactor: standardize timing with monotonic clocks, remove redundant stream parsing 2026-06-15 11:37:51 -07:00
jack 5b186df888 feat(serialcomm): implement stream auto-detection, fallback baudrate, and virtual port discovery
- Add automatic format detection (binary, ASCII hex dump, or text line) in StreamReader based on stream preambles.
- Implement fallback to 115200 baudrate when 888888 ioctl fails (critical for macOS PTYs).
- Parse binary streams (X family) with little-endian sequence/length headers and Modbus CRC-16 checks.
- Discover and prioritize virtual serial ports (from running socat instances) in enumerate_ports using lsof.
- Update FakeTransport to mock read() and readline() calls for unit test compatibility.
2026-06-15 11:11:00 -07:00
jack 72334795da refactor: reorganize backend modules into sub-packages for models, data, visualization, wafer, and controllers 2026-06-11 12:15:00 -07:00
jack ca1a514f23 feat: Wafer Map integration
## Backend — Session & playback
- Add SessionController (QML-facing live/review controller) with
  loadedFile property for active-file highlight binding
- Add SessionModel, FramePlayer, and CsvRecorder for state machine,
  frame seek/step/speed, and CSV recording
- Add SensorEditor for per-sensor value overrides (replace + offset)
2026-06-11 11:55:34 -07:00
jack 9779baa468 Restructure into src/ layout under pygui package
Move all application source under src/pygui/ and rewire imports,
build config, and QML module path to match.
- Relocate backend/, serialcomm/, and the ISC QML module into
  src/pygui/; convert main.py into pygui/__main__.py with a main()
  entry point (run via `python -m pygui` or the new `isc` script)
- Rewrite absolute imports: backend.* -> pygui.backend.*,
  serialcomm.* -> pygui.serialcomm.* (source + tests)
- Move app icons (isc.ico/icns) into packaging/
- Update README and ISC.qmlproject to the new paths
2026-06-03 11:41:45 -07:00