ui: the Source badge, and the source panels as slide-over pages

This commit is contained in:
Martino Ferrari committed 2026-11-02 20:19:47 +01:00
1 parent 5fb479bd69
commit 31ff778e07
6 files changed
+101 -28

No files matched your search

+11 -2
View File
@@ -439,6 +439,15 @@ precedent, not an exception.
a slide-over page**, so a probe that reads one of its widgets' *allocation* (a width, a height) must
`slideover_open(*a, "trigger")` and read after the 120 ms reveal, as `exit_probe_step1` and `force_probe` do;
a sensitivity, a visibility or a value needs no open page.
**The source kind's panels are slide-over pages too** (`source-<id>`: the E-1608's `source-ao` and
`source-dio`, Flat UDP's, the probe kind's), so the same rule holds for them. The probe appends a second
`[badges]` line for the Source badge: `[badges] source name=<kind> state=<connected|disconnected> pages=<n>
switch_visible=<0|1> can_target=<0|1> second_page=<id|-> second_ok=<0|1> open_marked=<0|1|-1>
closed_unmarked=1`. `pages` is the number of source pages, `switch_visible` is the segmented switch
being on screen after the first source page was opened (`1` for the E-1608's two pages, `0` for one page
or none), `second_page` is what `slideover_page()` read after the switch selected the second page
(`second_ok=1` when it is that page), `can_target=0` with `pages=0` is the UDPS badge being a read-out and
`open_marked=-1` is that no-page case (there is nothing to open).
- `UDPSCOPE_PROBE_SOURCE_KINDS=2000` with `UDPSCOPE_EXIT_AFTER_MS=5000`, run as `--source probe --source-opt rate=500`
-- the source-plugin path end to end. The variable's presence also registers the test-only `probe` kind (a
synthetic sine with one panel), so it is the only way a run sees that kind; its value is the delay in ms.
@@ -461,8 +470,8 @@ precedent, not an exception.
- `UDPSCOPE_PROBE_E1608_GEN=1500` with `UDPSCOPE_EXIT_AFTER_MS=5500`, run as `--source e1608 --source-opt
address=127.0.0.1 --source-opt port=54711 --source-opt ao0_init=0 --source-opt gen_rate=100` against
`tools/mock_e1608.py --port 54711 --log /tmp/e1608-gen100.log` -- the generator's update rate: it starts a Sine on
DAC 0 through the Analog out panel (and switches the side stack to that page, since the panel refreshes on its
frame clock, which does not tick for a page that is off screen), waits 2.5 s, reads the achieved rate and the
DAC 0 through the Analog out panel (and opens the `source-ao` slide-over page, since the panel refreshes on its
frame clock, which does not tick for a page that is off screen; the page is closed again at the end), waits 2.5 s, reads the achieved rate and the
panel's "Update rate" row, stops the generator and reads both again 400 ms later. Two lines, in
`probe-readings.md`. Then count the mock log's `AOUT` lines: about 250 with `gen_rate=100` (the generator ran
for about 2.5 s) and about 125 for a run without the option (default 50 Hz). Short and serial, the mock killed