docs: document per-signal calibration and config save/reload
Update Docs/StreamHub-API.md (new setCalibration/reloadConfig commands, calibration/configSaved/configReloaded events, §4 config file format), ARCHITECTURE.md §6 (updated command/event tables and Config File Format subsection), Docs/WebUI.md (Cal row in V-Scale Toolbar, Sources & Config sidebar section). Also corrects the spec's Validation sentence to match the shipped cal-invalid border behaviour instead of silent field revert. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
e37eec0276
commit
d26b78b7f6
@@ -80,6 +80,21 @@ Signals received in the CONFIG packet are listed in the sidebar:
|
||||
- **Spatial arrays** — `TimeMode = PacketTime` arrays are shown as an expandable
|
||||
group; individual elements (`Ch1[0]`, `Ch1[1]`, …) can be dragged independently.
|
||||
|
||||
The unit badge next to each signal shows the calibration's unit override when one
|
||||
is set, and the streamer's own unit otherwise.
|
||||
|
||||
At the bottom of the sidebar, the collapsible **Sources & Config** section holds:
|
||||
|
||||
- the `host:port`, label, multicast group and data port inputs plus **Connect**,
|
||||
which adds a source at runtime;
|
||||
- **Save** — writes the source list and the whole calibration table to the hub's
|
||||
config file;
|
||||
- **Reload** — re-reads that file. Calibration is replaced wholesale (so unsaved
|
||||
edits are discarded), sources present in the file but not running are added,
|
||||
and no running source is stopped or reconnected;
|
||||
- a status line showing the written path on success or the hub's error text on
|
||||
failure.
|
||||
|
||||
Click the sidebar toggle button (☰) to collapse/expand the signal list.
|
||||
|
||||
### Adding Plots
|
||||
@@ -143,11 +158,31 @@ plot header showing per-signal vertical scale controls:
|
||||
| **V/div** | Volts (or units) per division |
|
||||
| **Pos (div)** | Screen position in divisions (draggable offset marker on Y axis) |
|
||||
| **Type** (Mixed mode only) | Toggle between **Analog** and **Digital** for this signal |
|
||||
| **Cal · Scale** | Data calibration gain. `value = raw × Scale + Offset` |
|
||||
| **Cal · Offset** | Data calibration bias, in calibrated units |
|
||||
| **Cal · Unit** | Overrides the unit reported by the streamer (max 16 chars) |
|
||||
| **Reset** | Clears this signal's calibration (`Scale = 1`, `Offset = 0`, no unit override) |
|
||||
| **✕** | Close the toolbar and deselect the signal |
|
||||
|
||||
Offset markers (small triangles on the Y axis) show each signal's position and can
|
||||
be dragged to reposition signals without opening the toolbar.
|
||||
|
||||
**Calibration vs. V/div and Offset.** They are different things. V/div and Offset
|
||||
are a *display* transform: they move and stretch the trace on screen. Calibration
|
||||
changes *the value itself* — the plot, the Y-axis tick labels, the cursor and
|
||||
hover readouts, the CSV export and the trigger threshold all report
|
||||
`raw × Scale + Offset` in the calibrated unit. V/div is then read as "calibrated
|
||||
units per division" and Offset as "the calibrated value at screen centre".
|
||||
|
||||
The calibration header names the **base** signal and its element count, because
|
||||
one entry covers every element of an array — opening the toolbar on `Adc[3]` and
|
||||
editing the calibration moves all of `Adc`.
|
||||
|
||||
Calibration is keyed by the source's **label**, is shared with every other
|
||||
browser connected to the same hub, and is not persisted until you press **Save**
|
||||
in the Sources & Config section. It is mirrored to `localStorage` so it survives
|
||||
a page reload even against a hub with no config file.
|
||||
|
||||
### Plot Controls
|
||||
|
||||
| Control | Action |
|
||||
|
||||
Reference in New Issue
Block a user