plasma: ESC P bitmap rows through the feedback endpoint (plasma row)
PlasmaCommands.GraphicsWrite/GraphicsRow port the display firmware graphics command (ESC P s y x w h, MSB-left); PlasmaDisplay.RowAsync writes a locked whole-row update; the line protocol gains `plasma row <y> <hex32>`. The router plasma slot becomes a bounded FIFO queue: rows stream in order (a frame must not tear), texts still coalesce to the newest, clear flushes, cap 128 with counted drops. Docs updated; 442 tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+14
-3
@@ -47,6 +47,7 @@ lamp <addr> <state> set one lamp
|
||||
lamp-all <state> set every lamp
|
||||
plasma text [x y] <text> write text to the plasma display
|
||||
plasma clear clear the plasma display
|
||||
plasma row <y> <hex32> write one full 128-px bitmap row
|
||||
```
|
||||
|
||||
- **`<addr>`** — RIO lamp address, decimal or `0x` hex. Valid: `0x00–0x47`
|
||||
@@ -63,6 +64,15 @@ plasma clear clear the plasma display
|
||||
(`PlasmaPosText`). To display something that starts with two numbers, quote
|
||||
it. Encoding is **Latin-1** (one byte = one char, the plasma's wire
|
||||
encoding) — do not send UTF-8 for accented characters.
|
||||
- **`plasma row`** — one full bitmap row: `<y>` 0–31 (decimal or `0x` hex),
|
||||
then exactly **32 hex digits** = 16 bytes = 128 pixels, **MSB = leftmost**.
|
||||
Rows are written strictly in arrival order (unlike `plasma text`, which
|
||||
coalesces to the newest — a bitmap frame is many rows and must not tear);
|
||||
`plasma clear` discards any queued rows/text. Up to 128 commands queue;
|
||||
beyond that incoming rows are dropped and counted — pace full-frame pushes
|
||||
(a 32-row frame is ~0.77 s of wire time at 9600 baud; stream changed rows,
|
||||
as the native games did). See
|
||||
[OUTPUT-INTEGRATION.md](OUTPUT-INTEGRATION.md#bitmap-graphics-esc-p).
|
||||
|
||||
Malformed lines are dropped and counted (first few are logged); they **never**
|
||||
cost a client its connection. The endpoint sends no replies.
|
||||
@@ -99,9 +109,10 @@ Such drops are logged once per address. `lamp-all` silently skips owned lamps.
|
||||
**Rate:** lamp commands share the 9600-baud RIO link with the ~55 ms analog
|
||||
poll, so RIOJoy coalesces per-lamp state (latest wins) and sends at most one
|
||||
*changed* lamp per 25 ms. Spam freely — identical states cost nothing — but a
|
||||
`lamp-all` sweep takes ~3 s to fully land. Plasma writes are single-flight,
|
||||
latest-pending-wins: flood-updating a score means only the newest pending text
|
||||
is written.
|
||||
`lamp-all` sweep takes ~3 s to fully land. Plasma writes are single-flight
|
||||
over a bounded queue: flooded `text` updates coalesce to the newest value,
|
||||
`clear` flushes everything queued before it, and bitmap `row`s stream in
|
||||
order.
|
||||
|
||||
## Rumble → lamps
|
||||
|
||||
|
||||
Reference in New Issue
Block a user