feat(inventory): Phase 1 - scan and validate UPC barcodes #1

Open
lyrathorpe wants to merge 54 commits from feat/inventory-phase1-scan into main
Owner

Phase 1 of the Workabout MX inventory demo: read UPC barcodes from the scanner and display them, flagging UPC-A validity. No database yet (that is Phase 2).

New module code/inventory/:

  • upc.c/.h - UPC-A check-digit validation. Pure C, no PLIB deps, unit-testable on any host.
  • bcode.c/.h - barcode input over the serial port. On the Workabout the module decodes in hardware and delivers RS232, so a scan is read from TTY:D (top internal slot = port D) with standard PLIB serial I/O. Includes a line assembler that accumulates bytes to a terminator.
  • scan.c - the demo. Asynchronous wait on the scanner (TTY:D) and keyboard (CON:) via p_ioc/p_iowait: a scan is validated and printed, Esc quits.
  • scan.pr - TopSpeed project (tsc /m scan), compiles the three modules and links scan.img.
  • README.md - build, design, and the on-device points to confirm.

Written against the SDK docs now in docs/ (Workabout Programming Guide, PLIB Reference); it could not be compiled or run here. The likely on-device tuning points are called out in the README and in comments: serial line settings, the barcode terminator (BCODE_TERM, default CR), the Esc key code, and CON: async-read behaviour.

Phase 2 (DBF inventory: UPC + quantity + name, add/consume) will follow once the scan path is confirmed on the device.

Phase 1 of the Workabout MX inventory demo: read UPC barcodes from the scanner and display them, flagging UPC-A validity. No database yet (that is Phase 2). New module `code/inventory/`: - `upc.c/.h` - UPC-A check-digit validation. Pure C, no PLIB deps, unit-testable on any host. - `bcode.c/.h` - barcode input over the serial port. On the Workabout the module decodes in hardware and delivers RS232, so a scan is read from `TTY:D` (top internal slot = port D) with standard PLIB serial I/O. Includes a line assembler that accumulates bytes to a terminator. - `scan.c` - the demo. Asynchronous wait on the scanner (`TTY:D`) and keyboard (`CON:`) via `p_ioc`/`p_iowait`: a scan is validated and printed, Esc quits. - `scan.pr` - TopSpeed project (`tsc /m scan`), compiles the three modules and links `scan.img`. - `README.md` - build, design, and the on-device points to confirm. Written against the SDK docs now in `docs/` (Workabout Programming Guide, PLIB Reference); it could not be compiled or run here. The likely on-device tuning points are called out in the README and in comments: serial line settings, the barcode terminator (`BCODE_TERM`, default CR), the Esc key code, and `CON:` async-read behaviour. Phase 2 (DBF inventory: UPC + quantity + name, add/consume) will follow once the scan path is confirmed on the device.
lyrathorpe added 7 commits 2026-07-06 17:41:46 +01:00
lyrathorpe added 1 commit 2026-07-06 17:41:47 +01:00
lyrathorpe added 1 commit 2026-07-06 17:51:20 +01:00
lyrathorpe added 1 commit 2026-07-06 17:51:21 +01:00
lyrathorpe added 1 commit 2026-07-06 18:01:42 +01:00
lyrathorpe added 1 commit 2026-07-06 18:13:57 +01:00
lyrathorpe added 1 commit 2026-07-06 18:13:57 +01:00
lyrathorpe added 1 commit 2026-07-06 18:13:59 +01:00
lyrathorpe added 1 commit 2026-07-06 18:19:56 +01:00
lyrathorpe added 1 commit 2026-07-06 18:23:39 +01:00
lyrathorpe added 1 commit 2026-07-06 18:28:24 +01:00
lyrathorpe added 2 commits 2026-07-06 18:30:36 +01:00
lyrathorpe added 1 commit 2026-07-06 18:33:37 +01:00
lyrathorpe added 1 commit 2026-07-06 18:41:32 +01:00
lyrathorpe added 1 commit 2026-07-06 18:46:39 +01:00
lyrathorpe added 1 commit 2026-07-06 18:51:33 +01:00
lyrathorpe added 1 commit 2026-07-06 19:04:44 +01:00
lyrathorpe added 1 commit 2026-07-06 20:14:57 +01:00
lyrathorpe added 1 commit 2026-07-06 20:21:04 +01:00
lyrathorpe added 1 commit 2026-07-06 20:39:19 +01:00
lyrathorpe added 1 commit 2026-07-06 20:54:15 +01:00
lyrathorpe added 1 commit 2026-07-06 21:14:58 +01:00
lyrathorpe added 1 commit 2026-07-06 21:23:20 +01:00
lyrathorpe added 1 commit 2026-07-06 21:35:09 +01:00
lyrathorpe added 1 commit 2026-07-06 21:42:38 +01:00
lyrathorpe added 1 commit 2026-07-06 21:44:11 +01:00
lyrathorpe added 1 commit 2026-07-06 21:52:27 +01:00
lyrathorpe added 1 commit 2026-07-06 21:56:24 +01:00
lyrathorpe added 1 commit 2026-07-06 22:08:41 +01:00
lyrathorpe added 1 commit 2026-07-06 22:19:19 +01:00
lyrathorpe added 1 commit 2026-07-06 22:29:44 +01:00
lyrathorpe added 1 commit 2026-07-06 22:29:45 +01:00
lyrathorpe added 1 commit 2026-07-06 22:29:47 +01:00
lyrathorpe added 1 commit 2026-07-06 22:29:47 +01:00
lyrathorpe added 1 commit 2026-07-06 22:29:48 +01:00
lyrathorpe added 1 commit 2026-07-06 22:29:49 +01:00
lyrathorpe added 1 commit 2026-07-06 22:29:50 +01:00
lyrathorpe added 1 commit 2026-07-06 22:29:51 +01:00
lyrathorpe added 1 commit 2026-07-06 22:36:56 +01:00
lyrathorpe added 1 commit 2026-07-06 22:49:52 +01:00
lyrathorpe added 1 commit 2026-07-06 23:20:57 +01:00
lyrathorpe added 1 commit 2026-07-06 23:20:58 +01:00
lyrathorpe added 1 commit 2026-07-06 23:25:49 +01:00
lyrathorpe added 1 commit 2026-07-06 23:36:17 +01:00
lyrathorpe added 1 commit 2026-07-06 23:36:17 +01:00
lyrathorpe added 1 commit 2026-07-06 23:36:56 +01:00
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/inventory-phase1-scan:feat/inventory-phase1-scan
git checkout feat/inventory-phase1-scan
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lyrathorpe/sibo-playground#1